@aotter/mantle-admin-ui 0.0.11-alpha.70 → 0.0.11-alpha.71
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index-html.js +1 -1
- package/dist/index.html +1 -1
- package/package.json +1 -1
package/dist/index.html
CHANGED
|
@@ -132,7 +132,7 @@ Error generating stack: `+e.message+`
|
|
|
132
132
|
`},po=function(){var e=parseInt(document.body.getAttribute(`data-scroll-locked`)||`0`,10);return isFinite(e)?e:0},mo=function(){F.useEffect(function(){return document.body.setAttribute(uo,(po()+1).toString()),function(){var e=po()-1;e<=0?document.body.removeAttribute(uo):document.body.setAttribute(uo,e.toString())}},[])},ho=function(e){var t=e.noRelative,n=e.noImportant,r=e.gapMode,i=r===void 0?`margin`:r;mo();var a=F.useMemo(function(){return co(i)},[i]);return F.createElement(lo,{styles:fo(a,!t,i,n?``:`!important`)})},go=!1;if(typeof window<`u`)try{var _o=Object.defineProperty({},"passive",{get:function(){return go=!0,!0}});window.addEventListener(`test`,_o,_o),window.removeEventListener(`test`,_o,_o)}catch{go=!1}var vo=go?{passive:!1}:!1,yo=function(e){return e.tagName===`TEXTAREA`},bo=function(e,t){if(!(e instanceof Element))return!1;var n=window.getComputedStyle(e);return n[t]!==`hidden`&&!(n.overflowY===n.overflowX&&!yo(e)&&n[t]===`visible`)},xo=function(e){return bo(e,`overflowY`)},So=function(e){return bo(e,`overflowX`)},Co=function(e,t){var n=t.ownerDocument,r=t;do{if(typeof ShadowRoot<`u`&&r instanceof ShadowRoot&&(r=r.host),Eo(e,r)){var i=Do(e,r);if(i[1]>i[2])return!0}r=r.parentNode}while(r&&r!==n.body);return!1},wo=function(e){return[e.scrollTop,e.scrollHeight,e.clientHeight]},To=function(e){return[e.scrollLeft,e.scrollWidth,e.clientWidth]},Eo=function(e,t){return e===`v`?xo(t):So(t)},Do=function(e,t){return e===`v`?wo(t):To(t)},Oo=function(e,t){return e===`h`&&t===`rtl`?-1:1},ko=function(e,t,n,r,i){var a=Oo(e,window.getComputedStyle(t).direction),o=a*r,s=n.target,c=t.contains(s),l=!1,u=o>0,d=0,f=0;do{if(!s)break;var p=Do(e,s),m=p[0],h=p[1]-p[2]-a*m;(m||h)&&Eo(e,s)&&(d+=h,f+=m);var g=s.parentNode;s=g&&g.nodeType===Node.DOCUMENT_FRAGMENT_NODE?g.host:g}while(!c&&s!==document.body||c&&(t.contains(s)||t===s));return(u&&(i&&Math.abs(d)<1||!i&&o>d)||!u&&(i&&Math.abs(f)<1||!i&&-o>f))&&(l=!0),l},Ao=function(e){return`changedTouches`in e?[e.changedTouches[0].clientX,e.changedTouches[0].clientY]:[0,0]},jo=function(e){return[e.deltaX,e.deltaY]},Mo=function(e){return e&&`current`in e?e.current:e},No=function(e,t){return e[0]===t[0]&&e[1]===t[1]},Po=function(e){return`
|
|
133
133
|
.block-interactivity-${e} {pointer-events: none;}
|
|
134
134
|
.allow-interactivity-${e} {pointer-events: all;}
|
|
135
|
-
`},Fo=0,Io=[];function Lo(e){var t=F.useRef([]),n=F.useRef([0,0]),r=F.useRef(),i=F.useState(Fo++)[0],a=F.useState(ao)[0],o=F.useRef(e);F.useEffect(function(){o.current=e},[e]),F.useEffect(function(){if(e.inert){document.body.classList.add(`block-interactivity-${i}`);var t=Pa([e.lockRef.current],(e.shards||[]).map(Mo),!0).filter(Boolean);return t.forEach(function(e){return e.classList.add(`allow-interactivity-${i}`)}),function(){document.body.classList.remove(`block-interactivity-${i}`),t.forEach(function(e){return e.classList.remove(`allow-interactivity-${i}`)})}}},[e.inert,e.lockRef.current,e.shards]);var s=F.useCallback(function(e,t){if(`touches`in e&&e.touches.length===2||e.type===`wheel`&&e.ctrlKey)return!o.current.allowPinchZoom;var i=Ao(e),a=n.current,s=`deltaX`in e?e.deltaX:a[0]-i[0],c=`deltaY`in e?e.deltaY:a[1]-i[1],l,u=e.target,d=Math.abs(s)>Math.abs(c)?`h`:`v`;if(`touches`in e&&d===`h`&&u.type===`range`)return!1;var f=window.getSelection(),p=f&&f.anchorNode;if(p&&(p===u||p.contains(u)))return!1;var m=Co(d,u);if(!m)return!0;if(m?l=d:(l=d===`v`?`h`:`v`,m=Co(d,u)),!m)return!1;if(!r.current&&`changedTouches`in e&&(s||c)&&(r.current=l),!l)return!0;var h=r.current||l;return ko(h,t,e,h===`h`?s:c,!0)},[]),c=F.useCallback(function(e){var n=e;if(!(!Io.length||Io[Io.length-1]!==a)){var r=`deltaY`in n?jo(n):Ao(n),i=t.current.filter(function(e){return e.name===n.type&&(e.target===n.target||n.target===e.shadowParent)&&No(e.delta,r)})[0];if(i&&i.should){n.cancelable&&n.preventDefault();return}if(!i){var c=(o.current.shards||[]).map(Mo).filter(Boolean).filter(function(e){return e.contains(n.target)});(c.length>0?s(n,c[0]):!o.current.noIsolation)&&n.cancelable&&n.preventDefault()}}},[]),l=F.useCallback(function(e,n,r,i){var a={name:e,delta:n,target:r,should:i,shadowParent:Ro(r)};t.current.push(a),setTimeout(function(){t.current=t.current.filter(function(e){return e!==a})},1)},[]),u=F.useCallback(function(e){n.current=Ao(e),r.current=void 0},[]),d=F.useCallback(function(t){l(t.type,jo(t),t.target,s(t,e.lockRef.current))},[]),f=F.useCallback(function(t){l(t.type,Ao(t),t.target,s(t,e.lockRef.current))},[]);F.useEffect(function(){return Io.push(a),e.setCallbacks({onScrollCapture:d,onWheelCapture:d,onTouchMoveCapture:f}),document.addEventListener(`wheel`,c,vo),document.addEventListener(`touchmove`,c,vo),document.addEventListener(`touchstart`,u,vo),function(){Io=Io.filter(function(e){return e!==a}),document.removeEventListener(`wheel`,c,vo),document.removeEventListener(`touchmove`,c,vo),document.removeEventListener(`touchstart`,u,vo)}},[]);var p=e.removeScrollBar,m=e.inert;return F.createElement(F.Fragment,null,m?F.createElement(a,{styles:Po(i)}):null,p?F.createElement(ho,{noRelative:e.noRelative,gapMode:e.gapMode}):null)}function Ro(e){for(var t=null;e!==null;)e instanceof ShadowRoot&&(t=e.host,e=e.host),e=e.parentNode;return t}var zo=Ja(Ya,Lo),Bo=F.forwardRef(function(e,t){return F.createElement(Za,Ma({},e,{ref:t,sideCar:zo}))});Bo.classNames=Za.classNames;var Vo=function(e){return typeof document>`u`?null:(Array.isArray(e)?e[0]:e).ownerDocument.body},Ho=new WeakMap,Uo=new WeakMap,Wo={},Go=0,Ko=function(e){return e&&(e.host||Ko(e.parentNode))},qo=function(e,t){return t.map(function(t){if(e.contains(t))return t;var n=Ko(t);return n&&e.contains(n)?n:(console.error(`aria-hidden`,t,`in not contained inside`,e,`. Doing nothing`),null)}).filter(function(e){return!!e})},Jo=function(e,t,n,r){var i=qo(t,Array.isArray(e)?e:[e]);Wo[n]||(Wo[n]=new WeakMap);var a=Wo[n],o=[],s=new Set,c=new Set(i),l=function(e){!e||s.has(e)||(s.add(e),l(e.parentNode))};i.forEach(l);var u=function(e){!e||c.has(e)||Array.prototype.forEach.call(e.children,function(e){if(s.has(e))u(e);else try{var t=e.getAttribute(r),i=t!==null&&t!==`false`,c=(Ho.get(e)||0)+1,l=(a.get(e)||0)+1;Ho.set(e,c),a.set(e,l),o.push(e),c===1&&i&&Uo.set(e,!0),l===1&&e.setAttribute(n,`true`),i||e.setAttribute(r,`true`)}catch(t){console.error(`aria-hidden: cannot operate on `,e,t)}})};return u(t),s.clear(),Go++,function(){o.forEach(function(e){var t=Ho.get(e)-1,i=a.get(e)-1;Ho.set(e,t),a.set(e,i),t||(Uo.has(e)||e.removeAttribute(r),Uo.delete(e)),i||e.removeAttribute(n)}),Go--,Go||(Ho=new WeakMap,Ho=new WeakMap,Uo=new WeakMap,Wo={})}},Yo=function(e,t,n){n===void 0&&(n=`data-aria-hidden`);var r=Array.from(Array.isArray(e)?e:[e]),i=t||Vo(e);return i?(r.push.apply(r,Array.from(i.querySelectorAll(`[aria-live], script`))),Jo(r,i,n,`aria-hidden`)):function(){return null}},Xo=`Dialog`,[Zo,Qo]=G(Xo),[$o,es]=Zo(Xo),ts=e=>{let{__scopeDialog:t,children:n,open:r,defaultOpen:i,onOpenChange:a,modal:o=!0}=e,s=F.useRef(null),c=F.useRef(null),[l,u]=Fi({prop:r,defaultProp:i??!1,onChange:a,caller:Xo});return(0,I.jsx)($o,{scope:t,triggerRef:s,contentRef:c,contentId:Ni(),titleId:Ni(),descriptionId:Ni(),open:l,onOpenChange:u,onOpenToggle:F.useCallback(()=>u(e=>!e),[u]),modal:o,children:n})};ts.displayName=Xo;var ns=`DialogTrigger`,rs=F.forwardRef((e,t)=>{let{__scopeDialog:n,...r}=e,i=es(ns,n),a=Un(t,i.triggerRef);return(0,I.jsx)(zi.button,{type:`button`,"aria-haspopup":`dialog`,"aria-expanded":i.open,"aria-controls":i.open?i.contentId:void 0,"data-state":Cs(i.open),...r,ref:a,onClick:W(e.onClick,i.onOpenToggle)})});rs.displayName=ns;var is=`DialogPortal`,[as,os]=Zo(is,{forceMount:void 0}),ss=e=>{let{__scopeDialog:t,forceMount:n,children:r,container:i}=e,a=es(is,t);return(0,I.jsx)(as,{scope:t,forceMount:n,children:F.Children.map(r,e=>(0,I.jsx)(Sa,{present:n||a.open,children:(0,I.jsx)(ba,{asChild:!0,container:i,children:e})}))})};ss.displayName=is;var cs=`DialogOverlay`,ls=F.forwardRef((e,t)=>{let n=os(cs,e.__scopeDialog),{forceMount:r=n.forceMount,...i}=e,a=es(cs,e.__scopeDialog);return a.modal?(0,I.jsx)(Sa,{present:r||a.open,children:(0,I.jsx)(ds,{...i,ref:t})}):null});ls.displayName=cs;var us=Wn(`DialogOverlay.RemoveScroll`),ds=F.forwardRef((e,t)=>{let{__scopeDialog:n,...r}=e,i=es(cs,n),a=Un(t,Zi());return(0,I.jsx)(Bo,{as:us,allowPinchZoom:!0,shards:[i.contentRef],children:(0,I.jsx)(zi.div,{"data-state":Cs(i.open),...r,ref:a,style:{pointerEvents:`auto`,...r.style}})})}),fs=`DialogContent`,ps=F.forwardRef((e,t)=>{let n=os(fs,e.__scopeDialog),{forceMount:r=n.forceMount,...i}=e,a=es(fs,e.__scopeDialog);return(0,I.jsx)(Sa,{present:r||a.open,children:a.modal?(0,I.jsx)(ms,{...i,ref:t}):(0,I.jsx)(hs,{...i,ref:t})})});ps.displayName=fs;var ms=F.forwardRef((e,t)=>{let n=es(fs,e.__scopeDialog),r=F.useRef(null),i=Un(t,n.contentRef,r);return F.useEffect(()=>{let e=r.current;if(e)return Yo(e)},[]),(0,I.jsx)(gs,{...e,ref:i,trapFocus:n.open,disableOutsidePointerEvents:n.open,onCloseAutoFocus:W(e.onCloseAutoFocus,e=>{e.preventDefault(),n.triggerRef.current?.focus()}),onPointerDownOutside:W(e.onPointerDownOutside,e=>{let t=e.detail.originalEvent,n=t.button===0&&t.ctrlKey===!0;(t.button===2||n)&&e.preventDefault()}),onFocusOutside:W(e.onFocusOutside,e=>e.preventDefault())})}),hs=F.forwardRef((e,t)=>{let n=es(fs,e.__scopeDialog),r=F.useRef(!1),i=F.useRef(!1);return(0,I.jsx)(gs,{...e,ref:t,trapFocus:!1,disableOutsidePointerEvents:!1,onCloseAutoFocus:t=>{e.onCloseAutoFocus?.(t),t.defaultPrevented||(r.current||n.triggerRef.current?.focus(),t.preventDefault()),r.current=!1,i.current=!1},onInteractOutside:t=>{e.onInteractOutside?.(t),t.defaultPrevented||(r.current=!0,t.detail.originalEvent.type===`pointerdown`&&(i.current=!0));let a=t.target;n.triggerRef.current?.contains(a)&&t.preventDefault(),t.detail.originalEvent.type===`focusin`&&i.current&&t.preventDefault()}})}),gs=F.forwardRef((e,t)=>{let{__scopeDialog:n,trapFocus:r,onOpenAutoFocus:i,onCloseAutoFocus:a,...o}=e,s=es(fs,n);return Aa(),(0,I.jsx)(I.Fragment,{children:(0,I.jsx)(sa,{asChild:!0,loop:!0,trapped:r,onMountAutoFocus:i,onUnmountAutoFocus:a,children:(0,I.jsx)(Ji,{role:`dialog`,id:s.contentId,"aria-describedby":s.descriptionId,"aria-labelledby":s.titleId,"data-state":Cs(s.open),...o,ref:t,deferPointerDownOutside:!0,onDismiss:()=>s.onOpenChange(!1)})})})}),_s=`DialogTitle`,vs=F.forwardRef((e,t)=>{let{__scopeDialog:n,...r}=e,i=es(_s,n);return(0,I.jsx)(zi.h2,{id:i.titleId,...r,ref:t})});vs.displayName=_s;var ys=`DialogDescription`,bs=F.forwardRef((e,t)=>{let{__scopeDialog:n,...r}=e,i=es(ys,n);return(0,I.jsx)(zi.p,{id:i.descriptionId,...r,ref:t})});bs.displayName=ys;var xs=`DialogClose`,Ss=F.forwardRef((e,t)=>{let{__scopeDialog:n,...r}=e,i=es(xs,n);return(0,I.jsx)(zi.button,{type:`button`,...r,ref:t,onClick:W(e.onClick,()=>i.onOpenChange(!1))})});Ss.displayName=xs;function Cs(e){return e?`open`:`closed`}function ws({...e}){return(0,I.jsx)(ts,{"data-slot":`sheet`,...e})}function Ts({...e}){return(0,I.jsx)(ss,{"data-slot":`sheet-portal`,...e})}function Es({className:e,...t}){return(0,I.jsx)(ls,{"data-slot":`sheet-overlay`,className:H(`fixed inset-0 z-50 bg-black/50 data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:animate-in data-[state=open]:fade-in-0`,e),...t})}function Ds({className:e,children:t,side:n=`right`,...r}){return(0,I.jsxs)(Ts,{children:[(0,I.jsx)(Es,{}),(0,I.jsxs)(ps,{"data-slot":`sheet-content`,className:H(`fixed z-50 flex flex-col gap-4 bg-background shadow-lg transition ease-in-out data-[state=closed]:animate-out data-[state=closed]:duration-300 data-[state=open]:animate-in data-[state=open]:duration-500`,n===`right`&&`inset-y-0 right-0 h-full w-3/4 shadow-[-12px_0_32px_-12px_rgba(0,0,0,0.4)] data-[state=closed]:slide-out-to-right data-[state=open]:slide-in-from-right sm:max-w-sm`,n===`left`&&`inset-y-0 left-0 h-full w-3/4 shadow-[12px_0_32px_-12px_rgba(0,0,0,0.4)] data-[state=closed]:slide-out-to-left data-[state=open]:slide-in-from-left sm:max-w-sm`,e),...r,children:[t,(0,I.jsxs)(Ss,{className:`absolute top-4 right-4 rounded-xs opacity-70 ring-offset-background transition-opacity hover:opacity-100 focus:ring-2 focus:ring-ring focus:ring-offset-2 focus:outline-hidden disabled:pointer-events-none data-[state=open]:bg-secondary`,children:[(0,I.jsx)(Pn,{className:`size-4`}),(0,I.jsx)(`span`,{className:`sr-only`,children:`Close`})]})]})]})}function Os({className:e,...t}){return(0,I.jsx)(`div`,{"data-slot":`sheet-header`,className:H(`flex flex-col gap-1.5 p-4`,e),...t})}function ks({className:e,...t}){return(0,I.jsx)(vs,{"data-slot":`sheet-title`,className:H(`font-semibold text-foreground`,e),...t})}function As({className:e,...t}){return(0,I.jsx)(bs,{"data-slot":`sheet-description`,className:H(`text-sm text-muted-foreground`,e),...t})}var js=`16rem`,Ms=`3.25rem`,Ns=`18rem`,Ps=`b`,Fs=`sidebar_state`,Is=3600*24*7;function Ls(){if(typeof document>`u`)return null;let e=document.cookie.match(RegExp(`(?:^|;\\s*)${Fs}=([^;]+)`)),t=e?decodeURIComponent(e[1]):null;return t===`true`||t!==`false`&&null}function Rs(e){typeof document>`u`||(document.cookie=`${Fs}=${String(e)}; Path=/; Max-Age=${Is}; SameSite=Lax`)}var zs=F.createContext(null);function Bs(){let[e,t]=F.useState(!1);return F.useEffect(()=>{let e=window.matchMedia(`(max-width: 767px)`),n=()=>t(window.innerWidth<768);return e.addEventListener(`change`,n),t(window.innerWidth<768),()=>e.removeEventListener(`change`,n)},[]),e}function Vs({defaultOpen:e=!0,className:t,style:n,children:r,...i}){let a=Bs(),[o,s]=F.useState(!1),[c,l]=F.useState(e),u=F.useCallback(e=>{Rs(e),l(e)},[]),d=F.useCallback(()=>a?s(e=>!e):u(!c),[a,c,u]);F.useEffect(()=>{let e=e=>{e.key===Ps&&(e.metaKey||e.ctrlKey)&&(e.preventDefault(),d())};return window.addEventListener(`keydown`,e),()=>window.removeEventListener(`keydown`,e)},[d]);let f=c?`expanded`:`collapsed`,p=F.useMemo(()=>({state:f,open:c,setOpen:u,isMobile:a,openMobile:o,setOpenMobile:s,toggleSidebar:d}),[f,c,u,a,o,d]);return(0,I.jsx)(zs.Provider,{value:p,children:(0,I.jsx)(`div`,{"data-slot":`sidebar-wrapper`,style:{"--sidebar-width":js,"--sidebar-width-icon":Ms,...n},className:H(`group/sidebar-wrapper flex min-h-svh w-full rtl:flex-row-reverse`,t),...i,children:r})})}function Hs(){let e=F.useContext(zs);if(!e)throw Error(`useSidebar must be used within a SidebarProvider.`);return e}function Us({side:e=`left`,className:t,children:n,...r}){let{isMobile:i,state:a,openMobile:o,setOpenMobile:s}=Hs();return i?(0,I.jsx)(ws,{open:o,onOpenChange:s,...r,children:(0,I.jsxs)(Ds,{"data-sidebar":`sidebar`,"data-slot":`sidebar`,"data-mobile":`true`,className:`w-(--sidebar-width) glass-strip p-0 text-sidebar-foreground [&>button]:hidden`,style:{"--sidebar-width":Ns},side:e,children:[(0,I.jsxs)(Os,{className:`sr-only`,children:[(0,I.jsx)(ks,{children:`Sidebar`}),(0,I.jsx)(As,{children:`Displays the mobile sidebar.`})]}),(0,I.jsx)(`div`,{className:`flex h-full w-full flex-col`,children:n})]})}):(0,I.jsxs)(`div`,{className:`group peer hidden text-sidebar-foreground md:block`,"data-state":a,"data-side":e,"data-slot":`sidebar`,children:[(0,I.jsx)(`div`,{"data-slot":`sidebar-gap`,className:`relative w-(--sidebar-width) bg-transparent transition-[width] duration-200 group-data-[state=collapsed]:w-(--sidebar-width-icon)`}),(0,I.jsx)(`div`,{"data-slot":`sidebar-container`,className:H(`fixed inset-y-0 z-10 hidden h-svh w-(--sidebar-width) transition-[width] duration-200 md:flex group-data-[state=collapsed]:w-(--sidebar-width-icon)`,e===`left`?`left-0`:`right-0`,t),...r,children:(0,I.jsx)(`div`,{"data-sidebar":`sidebar`,"data-slot":`sidebar-inner`,className:`glass-strip flex h-full w-full flex-col`,children:n})})]})}function Ws({className:e,onClick:t,...n}){let{toggleSidebar:r}=Hs();return(0,I.jsxs)(U,{"data-sidebar":`trigger`,"data-slot":`sidebar-trigger`,variant:`ghost`,size:`icon`,className:H(`size-7`,e),onClick:e=>{t?.(e),r()},...n,children:[(0,I.jsx)(an,{}),(0,I.jsx)(`span`,{className:`sr-only`,children:`Toggle Sidebar`})]})}function Gs({className:e,...t}){return(0,I.jsx)(`main`,{"data-slot":`sidebar-inset`,className:H(`relative flex w-full min-w-0 flex-1 flex-col overflow-x-clip bg-background`,e),...t})}function Ks({className:e,...t}){return(0,I.jsx)(`div`,{"data-slot":`sidebar-header`,"data-sidebar":`header`,className:H(`flex flex-col gap-2 p-2`,e),...t})}function qs({className:e,...t}){return(0,I.jsx)(`div`,{"data-slot":`sidebar-content`,"data-sidebar":`content`,className:H(`flex min-h-0 flex-1 flex-col gap-2 overflow-auto`,e),...t})}function Js({className:e,...t}){return(0,I.jsx)(`div`,{"data-slot":`sidebar-footer`,"data-sidebar":`footer`,className:H(`flex flex-col gap-2 p-2`,e),...t})}function Ys({className:e,...t}){return(0,I.jsx)(`hr`,{"data-slot":`sidebar-separator`,"data-sidebar":`separator`,className:H(`mx-4 my-1 h-px w-auto border-0`,`bg-linear-to-r from-transparent via-[color-mix(in_srgb,var(--primary)_24%,transparent)] to-transparent`,`opacity-70 dark:via-[color-mix(in_srgb,var(--palette-teal-light)_18%,transparent)]`,e),...t})}function Xs({className:e,...t}){return(0,I.jsx)(`div`,{"data-slot":`sidebar-group`,"data-sidebar":`group`,className:H(`relative flex w-full min-w-0 flex-col p-2`,e),...t})}function Zs({className:e,...t}){return(0,I.jsx)(`div`,{"data-slot":`sidebar-group-label`,"data-sidebar":`group-label`,className:H(`flex h-8 shrink-0 items-center rounded-md px-2 text-xs font-medium text-sidebar-foreground/70`,e),...t})}function Qs({className:e,...t}){return(0,I.jsx)(`ul`,{"data-slot":`sidebar-menu`,"data-sidebar":`menu`,className:H(`flex w-full min-w-0 flex-col gap-1`,e),...t})}function $s({className:e,...t}){return(0,I.jsx)(`li`,{"data-slot":`sidebar-menu-item`,"data-sidebar":`menu-item`,className:H(`group/menu-item relative`,e),...t})}var ec=Bn(`peer/menu-button relative flex w-full items-center gap-2 overflow-hidden rounded-md p-2 text-left text-sm outline-hidden hover:bg-sidebar-accent hover:text-sidebar-accent-foreground active:bg-sidebar-accent active:text-sidebar-accent-foreground disabled:pointer-events-none disabled:opacity-50 data-[active=true]:bg-sidebar-accent data-[active=true]:font-medium data-[active=true]:text-sidebar-accent-foreground data-[state=open]:hover:bg-sidebar-accent data-[state=open]:hover:text-sidebar-accent-foreground [&>span:last-child]:truncate [&>svg]:size-4 [&>svg]:shrink-0`,{variants:{size:{default:`h-8 text-sm`,sm:`h-7 text-xs`,lg:`h-12 text-sm`}},defaultVariants:{size:`default`}});function tc({asChild:e=!1,isActive:t=!1,size:n=`default`,className:r,...i}){return(0,I.jsx)(e?Gn:`button`,{"data-slot":`sidebar-menu-button`,"data-sidebar":`menu-button`,"data-size":n,"data-active":t,className:H(ec({size:n}),r),...i})}function nc({className:e,...t}){return(0,I.jsx)(`ul`,{"data-slot":`sidebar-menu-sub`,"data-sidebar":`menu-sub`,className:H(`mx-3.5 flex min-w-0 translate-x-px flex-col gap-1 border-l border-sidebar-border px-2.5 py-0.5 rtl:-translate-x-px rtl:border-l-0 rtl:border-r`,e),...t})}function rc({className:e,...t}){return(0,I.jsx)(`li`,{"data-slot":`sidebar-menu-sub-item`,"data-sidebar":`menu-sub-item`,className:H(`group/menu-sub-item relative`,e),...t})}function ic({asChild:e=!1,size:t=`md`,isActive:n=!1,className:r,...i}){return(0,I.jsx)(e?Gn:`a`,{"data-slot":`sidebar-menu-sub-button`,"data-sidebar":`menu-sub-button`,"data-size":t,"data-active":n,className:H(`flex h-7 min-w-0 -translate-x-px items-center gap-2 overflow-hidden rounded-md px-2 text-sidebar-foreground outline-hidden hover:bg-sidebar-accent hover:text-sidebar-accent-foreground active:bg-sidebar-accent active:text-sidebar-accent-foreground disabled:pointer-events-none disabled:opacity-50 data-[active=true]:bg-sidebar-accent data-[active=true]:text-sidebar-accent-foreground data-[active=true]:font-medium [&>span:last-child]:truncate [&>svg]:size-4 [&>svg]:shrink-0`,`rtl:translate-x-px`,t===`sm`&&`text-xs`,t===`md`&&`text-sm`,r),...i})}var ac=`/admin/api`,oc=class extends Error{status;body;constructor(e,t,n){super(e),this.status=t,this.body=n,this.name=`ApiError`}};async function sc(e,t){let n=await fetch(`${ac}${e}`,{credentials:`same-origin`,...t,headers:{Accept:`application/json`,...t?.headers??{}}}),r=await n.text(),i=null;if(r)try{i=JSON.parse(r)}catch{i=r}if(!n.ok)throw new oc(`${n.status} ${n.statusText}`,n.status,i);return i}var q={get:e=>sc(e),post:(e,t)=>sc(e,cc(`POST`,t)),patch:(e,t)=>sc(e,cc(`PATCH`,t)),delete:e=>sc(e,{method:`DELETE`})};function cc(e,t){return{method:e,headers:{"Content-Type":`application/json`},body:t===void 0?void 0:JSON.stringify(t)}}function lc(e,t,n){if(e==null)return null;if(typeof e==`string`)return e;if(Object.prototype.hasOwnProperty.call(e,t))return e[t];if(n&&Object.prototype.hasOwnProperty.call(e,n))return e[n];let r=Object.keys(e)[0];return r===void 0?null:e[r]}function uc(e){return e.replace(/([a-z0-9])([A-Z])/g,`$1 $2`).replace(/[_-]+/g,` `).replace(/\b\w/g,e=>e.toUpperCase())}function dc(e,t,n,r){return lc(t?.title,n,r)??uc(e)}function fc(e,t,n){return lc(e?.description,t,n)??void 0}function pc(){return{queryKey:[`views-manifest`],queryFn:async()=>(await q.get(`/views-manifest`)).views}}function mc(){return{queryKey:[`operations`],queryFn:async()=>(await q.get(`/operations`)).operations}}var hc=[`draft`,`review`,`published`,`archived`],gc=[`draft`,`published`,`archived`],_c=F.createContext(null);function vc(){return typeof window>`u`?{pathname:`/admin`,search:``}:{pathname:window.location.pathname,search:window.location.search}}function yc(e){if(typeof window>`u`)return!1;let t=new URL(e,window.location.href);return!(t.origin!==window.location.origin||!t.pathname.startsWith(`/admin`)||t.pathname.startsWith(`/admin/api/`)||t.pathname.startsWith(`/admin/auth/`))}function bc({children:e}){let[t,n]=F.useState(vc),r=F.useCallback((e,t={})=>{if(typeof window>`u`)return;let r=new URL(e,window.location.href),i=`${r.pathname}${r.search}${r.hash}`;i!==`${window.location.pathname}${window.location.search}${window.location.hash}`&&(t.replace?window.history.replaceState(null,``,i):window.history.pushState(null,``,i));let a={pathname:r.pathname,search:r.search};(0,Ri.flushSync)(()=>n(a))},[]);F.useEffect(()=>{let e=()=>n(vc());return window.addEventListener(`popstate`,e),()=>window.removeEventListener(`popstate`,e)},[]),F.useEffect(()=>{let e=e=>{if(e.defaultPrevented||e.button!==0||e.metaKey||e.ctrlKey||e.shiftKey||e.altKey)return;let t=e.target;if(!(t instanceof Element))return;let n=t.closest(`a[href]`);n instanceof HTMLAnchorElement&&(n.target&&n.target!==`_self`||n.hasAttribute(`download`)||yc(n.href)&&(e.preventDefault(),r(n.href)))};return document.addEventListener(`click`,e,{capture:!0}),()=>document.removeEventListener(`click`,e,{capture:!0})},[r]);let i=F.useMemo(()=>({location:t,navigate:r}),[t,r]);return(0,I.jsx)(_c.Provider,{value:i,children:e})}function xc(){let e=F.useContext(_c);if(!e)throw Error(`useAdminRouter must be used inside AdminRouterProvider.`);return e}function Sc(){return xc().location}var Cc=[{value:`en`,label:`English`,nativeLabel:`English`,htmlLang:`en`,direction:`ltr`},{value:`de`,label:`German`,nativeLabel:`Deutsch`,htmlLang:`de`,direction:`ltr`},{value:`es`,label:`Spanish`,nativeLabel:`Español`,htmlLang:`es`,direction:`ltr`},{value:`fr`,label:`French`,nativeLabel:`Français`,htmlLang:`fr`,direction:`ltr`},{value:`it`,label:`Italian`,nativeLabel:`Italiano`,htmlLang:`it`,direction:`ltr`},{value:`ja`,label:`Japanese`,nativeLabel:`日本語`,htmlLang:`ja`,direction:`ltr`},{value:`ko`,label:`Korean`,nativeLabel:`한국어`,htmlLang:`ko`,direction:`ltr`},{value:`pt-BR`,label:`Portuguese (Brazil)`,nativeLabel:`Português (BR)`,htmlLang:`pt-BR`,direction:`ltr`},{value:`ru`,label:`Russian`,nativeLabel:`Русский`,htmlLang:`ru`,direction:`ltr`},{value:`zh-CN`,label:`Simplified Chinese`,nativeLabel:`简体中文`,htmlLang:`zh-Hans-CN`,direction:`ltr`},{value:`zh-TW`,label:`Traditional Chinese`,nativeLabel:`繁體中文`,htmlLang:`zh-Hant-TW`,direction:`ltr`},{value:`id`,label:`Indonesian`,nativeLabel:`Bahasa Indonesia`,htmlLang:`id`,direction:`ltr`},{value:`nl`,label:`Dutch`,nativeLabel:`Nederlands`,htmlLang:`nl`,direction:`ltr`},{value:`pl`,label:`Polish`,nativeLabel:`Polski`,htmlLang:`pl`,direction:`ltr`},{value:`tr`,label:`Turkish`,nativeLabel:`Türkçe`,htmlLang:`tr`,direction:`ltr`},{value:`vi`,label:`Vietnamese`,nativeLabel:`Tiếng Việt`,htmlLang:`vi`,direction:`ltr`},{value:`cs`,label:`Czech`,nativeLabel:`Čeština`,htmlLang:`cs`,direction:`ltr`},{value:`uk`,label:`Ukrainian`,nativeLabel:`Українська`,htmlLang:`uk`,direction:`ltr`},{value:`ar`,label:`Arabic`,nativeLabel:`العربية`,htmlLang:`ar`,direction:`rtl`},{value:`he`,label:`Hebrew`,nativeLabel:`עברית`,htmlLang:`he`,direction:`rtl`},{value:`fa`,label:`Persian`,nativeLabel:`فارسی`,htmlLang:`fa`,direction:`rtl`},{value:`th`,label:`Thai`,nativeLabel:`ไทย`,htmlLang:`th`,direction:`ltr`}],wc=`cms.preference.language`,Tc=`cms.preference.theme`,Ec=F.createContext(null);function Dc({children:e}){let[t,n]=F.useState(Oc),r=Pc(t),[i,a]=F.useState(kc),o=F.useCallback(e=>{jc(wc,e),n(e)},[]),s=F.useCallback(e=>{jc(Tc,e),a(e)},[]);F.useEffect(()=>{document.documentElement.lang=Cc.find(e=>e.value===t)?.htmlLang??`en`,document.documentElement.dir=r},[t,r]),F.useEffect(()=>{let e=()=>{let e=typeof matchMedia<`u`&&matchMedia(`(prefers-color-scheme: dark)`).matches;document.documentElement.classList.toggle(`dark`,i===`dark`||i===`system`&&e)};if(e(),i!==`system`||typeof matchMedia>`u`)return;let t=matchMedia(`(prefers-color-scheme: dark)`);return t.addEventListener(`change`,e),()=>t.removeEventListener(`change`,e)},[i]);let c=F.useMemo(()=>({language:t,direction:r,theme:i,setLanguage:o,setTheme:s}),[t,r,i,o,s]);return(0,I.jsx)(Ec.Provider,{value:c,children:e})}function J(){let e=F.useContext(Ec);if(!e)throw Error(`usePreferences must be used inside PreferencesProvider.`);return e}function Oc(){let e=Ac(wc);if(Mc(e))return e;if(typeof navigator>`u`)return`en`;for(let e of navigator.languages??[]){let t=Nc(e);if(t!==`en`||e.toLowerCase().startsWith(`en`))return t}return Nc(navigator.language)}function kc(){let e=Ac(Tc);return e===`light`||e===`dark`||e===`system`?e:`system`}function Ac(e){try{return localStorage.getItem(e)}catch{return null}}function jc(e,t){try{localStorage.setItem(e,t)}catch{}}function Mc(e){return Cc.some(t=>t.value===e)}function Nc(e){let t=(e??``).toLowerCase();if(t===`zh-tw`||t===`zh-hant`||t.startsWith(`zh-hant`))return`zh-TW`;if(t===`zh-cn`||t===`zh-hans`||t.startsWith(`zh-hans`))return`zh-CN`;if(t.startsWith(`pt-br`)||t===`pt`)return`pt-BR`;let n=t.split(`-`)[0];return n===`ar`?`ar`:n===`cs`?`cs`:n===`de`?`de`:n===`es`?`es`:n===`fa`?`fa`:n===`fr`?`fr`:n===`he`||n===`iw`?`he`:n===`id`?`id`:n===`it`?`it`:n===`ja`?`ja`:n===`ko`?`ko`:n===`nl`?`nl`:n===`pl`?`pl`:n===`pt`?`pt-BR`:n===`ru`?`ru`:n===`th`?`th`:n===`tr`?`tr`:n===`uk`?`uk`:n===`vi`?`vi`:n===`zh`?`zh-TW`:`en`}function Pc(e){return Cc.find(t=>t.value===e)?.direction??`ltr`}var Fc=`@aotter/mantle`,Ic=`0.0.11-alpha.70`,Lc=`https://www.npmjs.com/package/@aotter/mantle`,Rc=`https://github.com/aotter/mantle`,zc=`M62.27,18.91c-24.86,0-45.09,20.23-45.09,45.09s20.23,45.09,45.09,45.09,45.09-20.23,45.09-45.09-20.23-45.09-45.09-45.09ZM65.07,102.86v-18.98h5.49c1.26,0,2.29-1.03,2.29-2.29v-4.47h11.6c1.26,0,2.29-1.03,2.29-2.29v-20.57c0-1.26-1.03-2.29-2.29-2.29h-5.13v-12.73c0-1.55-1.26-2.8-2.8-2.8s-2.8,1.26-2.8,2.8v12.73h-22.89v-12.73c0-1.55-1.26-2.8-2.81-2.8s-2.8,1.26-2.8,2.8v12.73h-5.13c-1.26,0-2.29,1.03-2.29,2.29v20.57c0,1.26,1.03,2.29,2.29,2.29h11.6v4.47c0,1.26,1.03,2.29,2.29,2.29h5.49v18.98c-20.32-1.45-36.16-18.42-36.16-38.86,0-21.49,17.48-38.97,38.97-38.97s38.97,17.48,38.97,38.97-15.84,37.42-36.16,38.86ZM41.89,73.03v-16.96h14.46c1.94,2.28,5.02,5.87,5.11,5.97.19.19.39.23.52.23s.34-.04.54-.25c.07-.06,1.33-1.44,4.33-4.69.4-.44.8-.87,1.17-1.26h14.63v16.96h-40.75ZM55.78,79.79v-3.15h12.98v3.15h-12.98Z`;function Bc({className:e}){return(0,I.jsx)(`svg`,{viewBox:`0 0 128 128`,"aria-hidden":!0,className:H(e),children:(0,I.jsx)(`path`,{fill:`currentColor`,d:zc})})}function Vc(){return(0,I.jsxs)(`div`,{className:H(`fixed bottom-3 end-3 z-30 hidden items-center gap-2 rounded-full`,`border border-border/60 bg-background/65 px-2.5 py-1.5 text-xs`,`text-muted-foreground shadow-[var(--glass-shadow)] backdrop-blur-md md:flex`),children:[(0,I.jsx)(Bc,{className:`size-4 text-primary`}),(0,I.jsx)(`a`,{href:Lc,target:`_blank`,rel:`noreferrer`,className:`font-medium text-foreground/80 hover:text-primary`,children:Fc}),(0,I.jsx)(`span`,{"aria-hidden":!0,children:`·`}),(0,I.jsx)(`a`,{href:Rc,target:`_blank`,rel:`noreferrer`,className:`hover:text-primary`,children:`GitHub`}),(0,I.jsxs)(`span`,{"aria-label":`version ${Ic}`,children:[`v`,Ic]})]})}var Hc={en:{"admin.consoleTitle":`Admin console`,"auth.accessDenied.title":`Access denied`,"auth.accessDenied.noStaff":`You're signed in, but this account isn't on the admin staff list.`,"auth.accessDenied.askOwner":`Ask a site owner to add your GitHub login, or sign out to try a different account.`,"auth.error.title":`Something went wrong`,"auth.signIn.eyebrow":`AotterMantle admin`,"auth.signIn.title":`Sign in`,"auth.signIn.methodsLoadFailed":`Couldn't load sign-in methods. Try refreshing.`,"auth.signIn.noMethods":`No sign-in methods are configured for this site.`,"auth.signIn.unknownMethod":`Unsupported sign-in method: {kind}.`,"auth.signIn.method.social.button":`Continue with {provider}`,"auth.signIn.method.oauth.button":`Continue with {provider}`,"auth.signIn.method.email-otp.body":`Sign in with a one-time code sent to your email.`,"auth.signIn.method.email-otp.emailLabel":`Email address`,"auth.signIn.method.email-otp.emailPlaceholder":`you@example.com`,"auth.signIn.method.email-otp.sendButton":`Send code`,"auth.signIn.method.email-otp.sendFailed":`Couldn't send the code. Check the email and try again.`,"auth.signIn.method.email-otp.sentTo":`We sent a code to {email}.`,"auth.signIn.method.email-otp.otpLabel":`One-time code`,"auth.signIn.method.email-otp.otpPlaceholder":`Enter the 6-digit code`,"auth.signIn.method.email-otp.verifyButton":`Verify and sign in`,"auth.signIn.method.email-otp.verifyFailed":`That code didn't match. Try again.`,"auth.signIn.method.email-otp.back":`Use a different email`,"auth.signIn.method.magic-link.body":`We'll email you a one-tap sign-in link.`,"auth.signIn.method.magic-link.emailLabel":`Email address`,"auth.signIn.method.magic-link.emailPlaceholder":`you@example.com`,"auth.signIn.method.magic-link.sendButton":`Send sign-in link`,"auth.signIn.method.magic-link.sendFailed":`Couldn't send the link. Check the email and try again.`,"auth.signIn.method.magic-link.sentTo":`We sent a sign-in link to {email}.`,"auth.signIn.method.magic-link.clickHint":`Click the link in the email to finish signing in. The link expires shortly.`,"auth.signIn.method.magic-link.anotherEmail":`Use a different email`,"common.signOut":`Sign out`,"common.viewSite":`View site`,"common.copy":`Copy`,"common.open":`Open`,"common.failedToLoad":`Failed to load`,"common.signedIn":`Signed in`,"console.eyebrow":`Owner console`,"console.description":`Manage {title}'s content and operations here. MCP-capable agents can work alongside you.`,"console.descriptionFallback":`Manage this site's content and operations here. MCP-capable agents can work alongside you.`,"console.connector.title":`Connect Claude to this site`,"console.connector.body":`Give Claude secure access to this site's staff tools.`,"console.connector.step1.title":`Copy the Staff MCP URL`,"console.connector.step1.body":`You'll paste this URL into Claude in the next step.`,"console.connector.step1.label":`Staff MCP URL`,"console.connector.step2.title":`Add a custom connector`,"console.connector.step2.body":`Open Claude Customize, name the connector, and paste the URL.`,"console.connector.step2.action":`Open Claude Customize`,"console.connector.step3.title":`Sign in and start`,"console.connector.step3.body":`Authorize with your staff account, then ask Claude to work on this site.`,"console.connector.step3.action":`Open Claude`,"console.workspace.title":`Start editing here`,"console.workspace.body":`Your content collections, pages, and settings are all editable from this console. Pick a common action to begin.`,"console.collections.eyebrow":`Content model`,"console.collections.title":`Content lists`,"console.collections.body":`All of this site's content collections are listed here. Translated content is merged into its main entry.`,"console.collections.emptyTitle":`No collections defined yet`,"console.collections.emptyBody":`No data collections yet. Start from a template, or ask your agent to create the first one.`,"console.collections.noDescription":`No description.`,"collection.breadcrumb":`Collections`,"collection.create":`New entry`,"collection.schemaDetails":`Schema notes`,"collection.searchPlaceholder":`Search title, id, status...`,"collection.filter.all":`All`,"collection.empty.title":`No entries yet`,"collection.empty.search":`No entries matched “{search}”.`,"collection.empty.withStatus":`No {status} entries in this collection.`,"collection.empty.all":`This collection has no entries yet.`,"collection.refreshing":`Updating the list...`,"collection.loadMore":`Load more`,"collection.export":`Export CSV`,"collection.copyId":`Copy full ID`,"collection.table.id":`ID`,"collection.table.title":`Title`,"collection.table.status":`Status`,"collection.table.locale":`Locale`,"collection.table.version":`Version`,"collection.table.updated":`Updated`,"collection.table.actions":`Actions`,"collection.table.selectAll":`Select all rows on this page`,"collection.table.selectRow":`Select {name}`,"rowActions.menuLabel":`Row operations`,"rowActions.cancel":`Cancel`,"collection.untitled":`(untitled)`,"collection.bulk.selectedCount":`{count} selected`,"collection.bulk.publish":`Publish`,"collection.bulk.unpublish":`Unpublish`,"collection.bulk.delete":`Delete`,"collection.bulk.deleteConfirm":`Delete {count} selected entries? This cannot be undone.`,"crud.editTooltip":`Edit {name}.`,"crud.deleteTooltip":`Delete {name}.`,"crud.saveTitle":`Save title`,"crud.cancelTitle":`Cancel editing`,"crud.deleteConfirm":`Delete {name}? This cannot be undone.`,"crud.saving":`Saving...`,"entryEdit.back":`Back to {name}`,"entryEdit.body":`Edit this {name} entry. Related records show up alongside automatically.`,"entryEdit.parent":`Parent: {name}`,"entryEdit.save":`Save changes`,"entryEdit.saveTooltip":`Save this entry.`,"entryEdit.fields":`Entry fields`,"entryEdit.meta":`Entry details`,"entryEdit.related":`Related entries`,"entryEdit.noRelated":`No child collections were inferred for this entry.`,"entryEdit.noChildEntries":`No child entries match this entry yet.`,"entryEdit.relationship":`Joined by {child} from parent {parent}.`,"entryEdit.addItem":`Add item`,"entryEdit.removeItem":`Remove item`,"entryEdit.emptyOption":`No value`,"entryEdit.boolean":`Enabled`,"entryEdit.operationalHint":`System-written record — edits may be overwritten by the next sync.`,"entryEdit.publish":`Publish`,"entryEdit.publishing":`Publishing...`,"entryEdit.publishTooltip":`Publish this draft.`,"entryEdit.publishDisabledDirty":`Save changes before publishing.`,"entryEdit.unpublish":`Unpublish`,"entryEdit.unpublishing":`Unpublishing...`,"entryEdit.unpublishTooltip":`Move this entry back to draft so it can be edited.`,"entryEdit.uploadMedia":`Upload`,"entryEdit.uploadingMedia":`Uploading...`,"entryEdit.noMediaPurpose":`No media upload purpose is configured.`,"settings.page.title":`Store settings`,"settings.page.body":`Manage site-level brand copy and default service information used across the storefront.`,"settings.tabsLabel":`Store settings sections`,"settings.tab.brand":`Brand`,"settings.tab.tracking":`Tracking`,"settings.brandSection":`Brand and service`,"settings.brandSectionBody":`Default site copy shared across generated pages.`,"settings.siteBrand":`Site brand`,"settings.siteTitle":`Site title`,"settings.siteDescription":`Site description`,"settings.trackingSection":`Tracking codes`,"settings.trackingSectionBody":`Fill in analytics IDs and Mantle will inject the matching tracking scripts into generated storefront pages.`,"settings.ga4MeasurementId":`GA4 Measurement ID`,"settings.ga4MeasurementIdHelp":`Use the ID only, for example G-XXXXXXXXXX. Do not paste the whole gtag script.`,"settings.facebookPixelId":`Facebook Pixel ID`,"settings.facebookPixelIdHelp":`Use the numeric Pixel ID only. Mantle will generate the base Pixel code.`,"guide.close":`Close guide`,"guide.open":`Guide`,"guide.next":`Next`,"guide.prev":`Previous`,"guide.finish":`Finish`,"guide.collections.title":`Start with your content`,"guide.collections.body":`Open your first collection to manage its entries, statuses, and localized copy.`,"guide.filters.title":`Filter publishing states`,"guide.filters.body":`Switch between all, draft, published, and archived entries without leaving the list.`,"guide.actions.title":`Edit from the list`,"guide.actions.body":`Use the row actions to edit an entry or remove it from the site.`,"guide.reopen.title":`Reopen this guide anytime`,"guide.reopen.body":`The guide button stays in the status bar, so users can turn this walkthrough on again whenever they need it.`,"nav.home":`Home`,"nav.content":`Content`,"nav.operations":`Records`,"nav.media":`Media library`,"nav.more":`More`,"nav.approvals":`Approvals`,"nav.settings":`Settings`,"nav.staff":`Staff`,"nav.ops":`Operations`,"nav.reports":`Reports`,"ops.page.title":`Operations`,"ops.page.body":`Run site operations here. Fill in the fields and press Run — the result shows up right below.`,"ops.run":`Run`,"ops.running":`Running...`,"ops.result.title":`Result`,"ops.empty.title":`No staff operations are exposed yet`,"ops.empty.body":`No operations are available yet. Once your site's config opens an operation to staff, its form appears here automatically.`,"ops.triggers.mcp":`MCP`,"ops.triggers.http":`HTTP`,"views.page.body":`A read-only report over {schema}.`,"views.params.title":`Parameters`,"views.run":`Query`,"views.running":`Querying...`,"views.empty.title":`No rows`,"views.empty.body":`No data under the current filters.`,"views.notFound.title":`View not found`,"staff.page.title":`Staff`,"staff.page.body":`Invite staff by email, assign roles, and revoke pending invitations. Only owners can see this page.`,"staff.invite.title":`Invite staff`,"staff.invite.emailLabel":`Email address`,"staff.invite.emailPlaceholder":`teammate@example.com`,"staff.invite.roleLabel":`Role`,"staff.invite.button":`Invite`,"staff.invite.sending":`Inviting…`,"staff.invite.revoke":`Revoke`,"staff.invite.hint":`Invitees sign in at /admin/sign-in with the invited email (magic link, email code, or a social account on the same address) and land with their role already in effect.`,"staff.table.name":`Name`,"staff.table.email":`Email`,"staff.table.status":`Status / sign-in`,"staff.table.role":`Role`,"staff.role.owner":`Owner`,"staff.role.editor":`Editor`,"staff.role.contributor":`Contributor`,"staff.role.none":`No role`,"staff.badge.invited":`Invited`,"staff.status.emailSignIn":`Email sign-in`,"staff.self":`you`,"status.draft":`Drafts`,"status.review":`In Review`,"status.published":`Published`,"status.archived":`Archived`,"preferences.heading":`Preferences`,"preferences.language":`Admin language`,"preferences.language.search":`Search languages...`,"preferences.language.noResults":`No languages found.`,"preferences.direction":`Text direction`,"preferences.direction.auto":`Text direction follows the selected language.`,"preferences.appearance":`Appearance`,"preferences.light":`Light`,"preferences.dark":`Dark`,"preferences.system":`System`,"preferences.ltr":`Left to right`,"preferences.rtl":`Right to left`,"preferences.page.title":`Personal preferences`,"preferences.page.body":`These preferences stay on this browser. They change the admin console only and do not modify site settings.`,"preferences.page.languageBody":`Choose the language used by system pages and admin chrome.`,"preferences.page.appearanceBody":`Choose light, dark, or follow your operating system.`,"preferences.page.open":`Preferences`,"system.notFound.title":`Not found`,"system.notFound.body":`No view registered for`,"system.notFound.back":`Back to home`,"editor.page.title":`Content editor`,"editor.page.body":`Draft copy in Markdown, HTML, or rich text before handing it to an agent or publishing workflow.`,"editor.mode.markdown":`Markdown`,"editor.mode.html":`HTML`,"editor.mode.rich":`Rich editor`,"editor.titleLabel":`Title`,"editor.slugLabel":`Slug`,"editor.bodyLabel":`Body`,"editor.preview":`Preview`,"editor.saveDraft":`Save draft`,"editor.markdownHint":`Supports headings, lists, links, and fenced code blocks.`,"editor.htmlHint":`Edit trusted HTML fragments with a plain source view.`,"editor.richHint":`Format sections, callouts, and copy without touching markup.`,"editor.toolbar":`Rich editor toolbar`,"editor.undo":`Undo`,"editor.redo":`Redo`,"editor.aiClean":`Insert callout`,"editor.uploadImage":`Upload image`,"editor.uploading":`Uploading image...`,"editor.textStyle":`Text style`,"editor.headingPlaceholder":`Heading`,"editor.selectedText":`selected text`,"editor.bold":`Bold`,"editor.italic":`Italic`,"editor.underline":`Underline`,"editor.strike":`Strikethrough`,"editor.inlineCode":`Inline code`,"editor.textColor":`Text color`,"editor.highlight":`Highlight`,"editor.palette":`Brand color`,"editor.alignLeft":`Align left`,"editor.alignCenter":`Align center`,"editor.alignRight":`Align right`,"editor.bulletList":`Bullet list`,"editor.numberList":`Numbered list`,"editor.checkList":`Checklist`,"editor.indent":`Indent`,"editor.link":`Link`,"editor.linkText":`link text`,"editor.table":`Table`,"editor.mediaLibrary":`Media library`,"editor.imageUrl":`Image URL`,"editor.insertImage":`Insert image`,"editor.videoUrl":`YouTube / Dailymotion URL`,"editor.insertVideo":`Insert video`,"media.alt":`Alt text`,"media.title":`Media library`,"media.description":`Every image uploaded to this site. Reuse one in an entry, tidy up its alt text, or remove it.`,"media.upload":`Upload`,"media.uploading":`Uploading...`,"media.dropHere":`Drop images here to upload`,"media.searchPlaceholder":`Search alt text, caption, or id`,"media.empty.title":`No images yet`,"media.empty.all":`Upload an image to start building the library.`,"media.empty.search":`No images match “{search}”.`,"media.noPurpose":`No upload purpose is configured for this site, so uploads are disabled.`,"media.caption":`Caption`,"media.altPlaceholder":`Describe this image`,"media.captionPlaceholder":`Optional caption`,"media.save":`Save`,"media.saving":`Saving...`,"media.saved":`Saved`,"media.delete":`Delete`,"media.deleteConfirm":`Delete this image? It will be removed everywhere it is used.`,"media.open":`Open original`,"media.copyId":`Copy id`,"media.uploaded":`Uploaded {date}`,"media.pick":`Choose from library`,"media.pickTitle":`Choose an image`,"media.pickDescription":`Pick an existing image to reuse, or upload a new one.`,"media.use":`Use this image`,"media.loadMore":`Load more`,"media.uploadFailed":`{count} of {total} uploads failed.`,"media.encoderUnsupported":`This site's media policy requires an image format this browser cannot produce ({mime}). Contact the site developer to update the policy.`,"approvals.title":`Approvals`,"approvals.body":`Review editorial entries that are waiting for approval before they go live.`,"approvals.emptyTitle":`Nothing is waiting for review`,"approvals.emptyBody":`Entries submitted for review will appear here by collection.`,"approvals.groupBody":`{count} entries are currently marked {status}.`,"approvals.openCollection":`Open collection`,"approvals.reviewEntry":`Review`,"ops.error.executionFailed":`The operation ran but failed to complete.`,"ops.error.detailsLabel":`Show details`,"ops.success":`{name} completed.`,"confirm.title":`Are you sure?`,"confirm.cancel":`Cancel`,"confirm.confirm":`Confirm`,"collection.schemaSummary.lifecycleAndI18n":`Manage items, publishing state, and localized content for {name}.`,"collection.schemaSummary.lifecycleOnly":`Manage items and publishing state for {name}.`,"collection.schemaSummary.i18nOnly":`Manage items and localized content for {name}.`,"collection.schemaSummary.plain":`Manage items for {name}.`,"entryEdit.mediaMissing":`This image is missing or was deleted.`,"field.hint.moneyMinor":`amount (minor units)`,"field.hint.timestampMs":`timestamp (ms)`},"zh-TW":{"admin.consoleTitle":`管理後台`,"auth.accessDenied.title":`無法存取`,"auth.accessDenied.noStaff":`你已登入,但這個帳號不在 admin staff 清單內。`,"auth.accessDenied.askOwner":`請網站 owner 加入你的 GitHub login,或登出改用其他帳號。`,"auth.error.title":`發生錯誤`,"auth.signIn.eyebrow":`AotterMantle 後台`,"auth.signIn.title":`登入`,"auth.signIn.methodsLoadFailed":`讀取登入方式失敗,請重新整理頁面。`,"auth.signIn.noMethods":`這個站台還沒設定任何登入方式。`,"auth.signIn.unknownMethod":`不支援的登入方式:{kind}。`,"auth.signIn.method.social.button":`使用 {provider} 繼續`,"auth.signIn.method.oauth.button":`使用 {provider} 繼續`,"auth.signIn.method.email-otp.body":`輸入 email,我們會寄一次性驗證碼給你。`,"auth.signIn.method.email-otp.emailLabel":`電子郵件`,"auth.signIn.method.email-otp.emailPlaceholder":`you@example.com`,"auth.signIn.method.email-otp.sendButton":`寄送驗證碼`,"auth.signIn.method.email-otp.sendFailed":`驗證碼寄送失敗,請確認 email 後重試。`,"auth.signIn.method.email-otp.sentTo":`已寄驗證碼到 {email}。`,"auth.signIn.method.email-otp.otpLabel":`驗證碼`,"auth.signIn.method.email-otp.otpPlaceholder":`輸入 6 位驗證碼`,"auth.signIn.method.email-otp.verifyButton":`驗證並登入`,"auth.signIn.method.email-otp.verifyFailed":`驗證碼錯誤,請再試一次。`,"auth.signIn.method.email-otp.back":`用其他 email`,"auth.signIn.method.magic-link.body":`我們會寄一個一鍵登入連結給你。`,"auth.signIn.method.magic-link.emailLabel":`電子郵件`,"auth.signIn.method.magic-link.emailPlaceholder":`you@example.com`,"auth.signIn.method.magic-link.sendButton":`寄送登入連結`,"auth.signIn.method.magic-link.sendFailed":`連結寄送失敗,請確認 email 後重試。`,"auth.signIn.method.magic-link.sentTo":`已將登入連結寄到 {email}。`,"auth.signIn.method.magic-link.clickHint":`請點 email 裡的連結完成登入。連結很快會過期。`,"auth.signIn.method.magic-link.anotherEmail":`用其他 email`,"common.signOut":`登出`,"common.viewSite":`查看網站`,"common.copy":`複製`,"common.open":`開啟`,"common.failedToLoad":`載入失敗`,"common.signedIn":`已登入`,"console.eyebrow":`Owner console`,"console.description":`在這裡管理 {title} 的內容與營運資料。支援 MCP 的 agent 也能與你並行協作。`,"console.descriptionFallback":`在這裡管理這個網站的內容與營運資料。支援 MCP 的 agent 也能與你並行協作。`,"console.connector.title":`把 Claude 連接到這個網站`,"console.connector.body":`讓 Claude 安全地使用這個網站的 Staff MCP 工具。`,"console.connector.step1.title":`複製 Staff MCP URL`,"console.connector.step1.body":`下一步會把這個網址貼到 Claude。`,"console.connector.step1.label":`Staff MCP URL`,"console.connector.step2.title":`新增自訂 connector`,"console.connector.step2.body":`開啟 Claude Customize,命名 connector,再貼上網址。`,"console.connector.step2.action":`開啟 Claude Customize`,"console.connector.step3.title":`登入並開始使用`,"console.connector.step3.body":`用 staff 帳號完成授權,接著請 Claude 處理這個網站。`,"console.connector.step3.action":`前往 Claude`,"console.workspace.title":`從這裡開始編輯`,"console.workspace.body":`你的內容 collection、頁面與設定都能在這個後台管理。先選一個常用操作開始。`,"console.collections.eyebrow":`內容模型`,"console.collections.title":`內容清單`,"console.collections.body":`這裡列出網站的所有資料集合。翻譯內容會併入主項目顯示。`,"console.collections.emptyTitle":`尚未定義 collections`,"console.collections.emptyBody":`還沒有任何資料集合。可以從範本開始,或請你的 agent 建立第一個。`,"console.collections.noDescription":`沒有描述。`,"collection.breadcrumb":`內容清單`,"collection.create":`新增`,"collection.schemaDetails":`Schema 說明`,"collection.searchPlaceholder":`搜尋標題、ID、狀態...`,"collection.filter.all":`全部`,"collection.empty.title":`目前沒有 entries`,"collection.empty.search":`沒有符合「{search}」的資料。`,"collection.empty.withStatus":`這個 collection 目前沒有 {status} entries。`,"collection.empty.all":`這個 collection 目前沒有 entries。`,"collection.refreshing":`清單更新中...`,"collection.loadMore":`載入更多`,"collection.export":`匯出 CSV`,"collection.copyId":`複製完整 ID`,"collection.table.id":`ID`,"collection.table.title":`標題`,"collection.table.status":`狀態`,"collection.table.locale":`語言`,"collection.table.version":`版本`,"collection.table.updated":`更新時間`,"collection.table.actions":`操作`,"collection.table.selectAll":`選取這一頁的所有項目`,"collection.table.selectRow":`選取 {name}`,"rowActions.menuLabel":`資料列操作`,"rowActions.cancel":`取消`,"collection.untitled":`(未命名)`,"collection.bulk.selectedCount":`已選取 {count} 筆`,"collection.bulk.publish":`發布`,"collection.bulk.unpublish":`下架`,"collection.bulk.delete":`刪除`,"collection.bulk.deleteConfirm":`刪除已選取的 {count} 筆資料?這個動作無法復原。`,"crud.editTooltip":`編輯{name}。`,"crud.deleteTooltip":`刪除{name}。`,"crud.saveTitle":`儲存標題`,"crud.cancelTitle":`取消編輯`,"crud.deleteConfirm":`確定要刪除{name}?這個動作無法復原。`,"crud.saving":`儲存中...`,"entryEdit.back":`回到 {name}`,"entryEdit.body":`編輯 {name} 的內容,相關資料會自動帶出。`,"entryEdit.parent":`父層:{name}`,"entryEdit.save":`儲存變更`,"entryEdit.saveTooltip":`儲存這筆資料。`,"entryEdit.fields":`資料欄位`,"entryEdit.meta":`資料資訊`,"entryEdit.related":`相關資料`,"entryEdit.noRelated":`目前沒有推導出這筆資料的子 collection。`,"entryEdit.noChildEntries":`目前沒有符合這筆資料的子資料。`,"entryEdit.relationship":`透過子欄位 {child} 對應父欄位 {parent}。`,"entryEdit.addItem":`新增項目`,"entryEdit.removeItem":`移除項目`,"entryEdit.emptyOption":`無值`,"entryEdit.boolean":`啟用`,"entryEdit.operationalHint":`系統寫入的資料——手動修改可能在下次同步時被覆蓋。`,"settings.page.title":`商店設定`,"settings.page.body":`管理全站品牌文案與預設服務資訊,讓商品與首頁可以共用。`,"settings.tabsLabel":`商店設定分頁`,"settings.tab.brand":`品牌`,"settings.tab.tracking":`追蹤碼`,"settings.brandSection":`品牌與服務`,"settings.brandSectionBody":`產生頁面時共用的預設站台文案。`,"settings.siteBrand":`網站品牌`,"settings.siteTitle":`網站標題`,"settings.siteDescription":`網站描述`,"settings.trackingSection":`追蹤碼`,"settings.trackingSectionBody":`填入 analytics ID 後,Mantle 會在產生的前台頁面自動埋入對應追蹤碼。`,"settings.ga4MeasurementId":`GA4 Measurement ID`,"settings.ga4MeasurementIdHelp":`只需要填 ID,例如 G-XXXXXXXXXX,不要貼整段 gtag script。`,"settings.facebookPixelId":`Facebook Pixel ID`,"settings.facebookPixelIdHelp":`只需要填數字 Pixel ID,Mantle 會產生標準 Pixel base code。`,"guide.close":`關閉引導`,"guide.open":`使用者引導`,"guide.next":`下一步`,"guide.prev":`上一步`,"guide.finish":`完成`,"guide.collections.title":`從內容開始`,"guide.collections.body":`打開第一個 collection,管理裡面的項目、狀態與多語內容。`,"guide.filters.title":`切換發布狀態`,"guide.filters.body":`在清單上直接切換全部、草稿、已發布與已封存,不需要離開目前頁面。`,"guide.actions.title":`在清單裡直接操作`,"guide.actions.body":`用每列右側操作編輯項目,或從網站移除。`,"guide.reopen.title":`隨時重新打開引導`,"guide.reopen.body":`右上角會保留使用者引導按鈕,需要時可以再次開啟或關閉這套逐步導覽。`,"nav.home":`首頁`,"nav.content":`內容`,"nav.operations":`營運資料`,"nav.media":`媒體庫`,"nav.more":`更多`,"nav.approvals":`審核`,"nav.settings":`設定`,"nav.staff":`員工管理`,"nav.ops":`操作`,"nav.reports":`報表`,"ops.page.title":`操作`,"ops.page.body":`站務操作都在這裡。填好欄位、按執行,結果會直接顯示在下方。`,"ops.run":`執行`,"ops.running":`執行中...`,"ops.result.title":`結果`,"ops.empty.title":`目前沒有開放給 staff 的操作`,"ops.empty.body":`目前沒有可用的操作。網站設定檔把操作開放給站務人員後,表單會自動出現在這裡。`,"ops.triggers.mcp":`MCP`,"ops.triggers.http":`HTTP`,"views.page.body":`{schema} 的唯讀報表。`,"views.params.title":`查詢參數`,"views.run":`查詢`,"views.running":`查詢中...`,"views.empty.title":`沒有資料`,"views.empty.body":`目前的條件下沒有資料。`,"views.notFound.title":`找不到這個 View`,"staff.page.title":`員工管理`,"staff.page.body":`以 email 邀請員工、指派角色、撤銷尚未使用的邀請。僅 owner 可見此頁。`,"staff.invite.title":`邀請員工`,"staff.invite.emailLabel":`Email`,"staff.invite.emailPlaceholder":`teammate@example.com`,"staff.invite.roleLabel":`角色`,"staff.invite.button":`建立邀請`,"staff.invite.sending":`邀請中…`,"staff.invite.revoke":`撤銷`,"staff.invite.hint":`受邀者到 /admin/sign-in 用受邀的 email 登入(magic link、email 驗證碼,或同信箱的社群帳號),登入時角色即已生效。`,"staff.table.name":`姓名`,"staff.table.email":`Email`,"staff.table.status":`狀態/登入方式`,"staff.table.role":`角色`,"staff.role.owner":`管理者`,"staff.role.editor":`編輯`,"staff.role.contributor":`協作者`,"staff.role.none":`無角色`,"staff.badge.invited":`邀請中`,"staff.status.emailSignIn":`Email 登入`,"staff.self":`你自己`,"status.draft":`草稿`,"status.review":`審核中`,"status.published":`已發布`,"status.archived":`已封存`,"preferences.heading":`偏好設定`,"preferences.language":`後台語言`,"preferences.language.search":`搜尋語言...`,"preferences.language.noResults":`找不到語言。`,"preferences.direction":`文字方向`,"preferences.direction.auto":`文字方向會跟隨選擇的語言。`,"preferences.appearance":`外觀`,"preferences.light":`淺色`,"preferences.dark":`深色`,"preferences.system":`跟隨系統`,"preferences.ltr":`左到右`,"preferences.rtl":`右到左`,"preferences.page.title":`個人偏好`,"preferences.page.body":`這些偏好只保存在這個瀏覽器,只影響 admin console,不會改動站台設定。`,"preferences.page.languageBody":`選擇系統頁與 admin chrome 使用的語言。`,"preferences.page.appearanceBody":`選擇淺色、深色,或跟隨作業系統。`,"preferences.page.open":`個人偏好`,"system.notFound.title":`找不到頁面`,"system.notFound.body":`沒有 view 註冊在`,"system.notFound.back":`回首頁`,"editor.page.title":`內容編輯器`,"editor.page.body":`在交給 agent 或發布流程之前,先用 Markdown、HTML 或 Rich Editor 編輯內容草稿。`,"editor.mode.markdown":`Markdown`,"editor.mode.html":`HTML`,"editor.mode.rich":`Rich Editor`,"editor.titleLabel":`標題`,"editor.slugLabel":`Slug`,"editor.bodyLabel":`本文`,"editor.preview":`預覽`,"editor.saveDraft":`儲存草稿`,"editor.markdownHint":`支援標題、清單、連結與 fenced code blocks。`,"editor.htmlHint":`用原始碼模式編輯可信任的 HTML 片段。`,"editor.richHint":`不碰 markup 也能整理段落、提示框與內文。`,"editor.toolbar":`Rich Editor 工具列`,"editor.undo":`復原`,"editor.redo":`重做`,"editor.aiClean":`插入提示區塊`,"editor.uploadImage":`上傳圖片`,"editor.uploading":`圖片上傳中...`,"editor.textStyle":`文字樣式`,"editor.headingPlaceholder":`標題`,"editor.selectedText":`選取文字`,"editor.bold":`粗體`,"editor.italic":`斜體`,"editor.underline":`底線`,"editor.strike":`刪除線`,"editor.inlineCode":`行內程式碼`,"editor.textColor":`文字顏色`,"editor.highlight":`螢光標記`,"editor.palette":`品牌色`,"editor.alignLeft":`靠左對齊`,"editor.alignCenter":`置中對齊`,"editor.alignRight":`靠右對齊`,"editor.bulletList":`項目清單`,"editor.numberList":`編號清單`,"editor.checkList":`待辦清單`,"editor.indent":`縮排`,"editor.link":`連結`,"editor.linkText":`連結文字`,"editor.table":`表格`,"editor.mediaLibrary":`媒體庫`,"editor.imageUrl":`圖片網址`,"editor.insertImage":`插入圖片`,"editor.videoUrl":`YouTube / Dailymotion 連結`,"editor.insertVideo":`插入影片`,"media.alt":`替代文字`,"media.title":`媒體庫`,"media.description":`這個網站上傳過的所有圖片。可以在內容中重複使用、整理替代文字,或刪除不需要的圖片。`,"media.upload":`上傳`,"media.uploading":`上傳中...`,"media.dropHere":`把圖片拖曳到這裡上傳`,"media.searchPlaceholder":`搜尋替代文字、說明或 id`,"media.empty.title":`還沒有圖片`,"media.empty.all":`上傳一張圖片,開始建立媒體庫。`,"media.empty.search":`沒有符合「{search}」的圖片。`,"media.noPurpose":`這個網站沒有設定上傳用途,無法上傳。`,"media.caption":`說明文字`,"media.altPlaceholder":`描述這張圖片`,"media.captionPlaceholder":`選填說明`,"media.save":`儲存`,"media.saving":`儲存中...`,"media.saved":`已儲存`,"media.delete":`刪除`,"media.deleteConfirm":`確定要刪除這張圖片嗎?所有使用到的地方都會一併移除。`,"media.open":`開啟原圖`,"media.copyId":`複製 id`,"media.uploaded":`上傳於 {date}`,"media.pick":`從媒體庫選擇`,"media.pickTitle":`選擇圖片`,"media.pickDescription":`挑一張現有圖片重複使用,或上傳新圖片。`,"media.use":`使用這張圖片`,"media.loadMore":`載入更多`,"media.uploadFailed":`{total} 張圖片中有 {count} 張上傳失敗。`,"media.encoderUnsupported":`這個網站的媒體政策要求此瀏覽器無法產生的圖片格式({mime})。請聯絡網站開發者調整政策。`,"approvals.title":`審核中心`,"approvals.body":`集中查看等待審核的 editorial entries,發布前可以逐筆檢查內容。`,"approvals.emptyTitle":`目前沒有等待審核的內容`,"approvals.emptyBody":`送出審核的資料會依 collection 分組顯示在這裡。`,"approvals.groupBody":`目前有 {count} 筆內容標記為「{status}」。`,"approvals.openCollection":`開啟清單`,"approvals.reviewEntry":`審核`,"entryEdit.publish":`發布`,"entryEdit.publishing":`發布中...`,"entryEdit.publishTooltip":`發布這筆草稿。`,"entryEdit.publishDisabledDirty":`請先儲存變更才能發布。`,"entryEdit.unpublish":`取消發布`,"entryEdit.unpublishing":`取消發布中...`,"entryEdit.unpublishTooltip":`將這筆資料改回草稿以便編輯。`,"ops.error.executionFailed":`操作已執行,但未能完成。`,"ops.error.detailsLabel":`顯示詳細資訊`,"ops.success":`{name} 已完成。`,"confirm.title":`確定要這麼做嗎?`,"confirm.cancel":`取消`,"confirm.confirm":`確定`,"collection.schemaSummary.lifecycleAndI18n":`管理 {name} 的項目、發布狀態與多語內容。`,"collection.schemaSummary.lifecycleOnly":`管理 {name} 的項目與發布狀態。`,"collection.schemaSummary.i18nOnly":`管理 {name} 的項目與多語內容。`,"collection.schemaSummary.plain":`管理 {name} 的項目。`,"entryEdit.mediaMissing":`這張圖片已遺失或已被刪除。`,"field.hint.moneyMinor":`金額(最小單位)`,"field.hint.timestampMs":`時間戳記(毫秒)`},"zh-CN":{"admin.consoleTitle":`管理后台`,"auth.signIn.title":`登录`,"common.signOut":`登出`,"common.viewSite":`查看网站`,"common.copy":`复制`,"common.open":`打开`,"common.failedToLoad":`加载失败`,"common.signedIn":`已登录`,"console.description":`在这里管理 {title} 的内容与运营数据。支持 MCP 的 agent 也能与你并行协作。`,"console.descriptionFallback":`在这里管理这个网站的内容与运营数据。支持 MCP 的 agent 也能与你并行协作。`,"console.connector.title":`把 Claude 连接到这个网站`,"console.connector.body":`让 Claude 安全地使用这个网站的 Staff MCP 工具。`,"console.connector.step1.title":`复制 Staff MCP URL`,"console.connector.step1.body":`下一步会把这个网址粘贴到 Claude。`,"console.connector.step1.label":`Staff MCP URL`,"console.connector.step2.title":`添加自定义 connector`,"console.connector.step2.body":`打开 Claude Customize,命名 connector,再粘贴网址。`,"console.connector.step2.action":`打开 Claude Customize`,"console.connector.step3.title":`登录并开始使用`,"console.connector.step3.body":`用 staff 账号完成授权,然后请 Claude 处理这个网站。`,"console.connector.step3.action":`前往 Claude`,"console.workspace.title":`从这里开始编辑`,"console.workspace.body":`你的内容 collection、页面与设置都能在这个后台管理。先选一个常用操作开始。`,"console.collections.title":`内容清单`,"console.collections.body":`这里列出网站的所有资料集合。翻译内容会并入主项目显示。`,"collection.breadcrumb":`内容清单`,"collection.create":`新增`,"collection.filter.all":`全部`,"collection.table.title":`标题`,"collection.table.status":`状态`,"collection.table.locale":`语言`,"collection.table.version":`版本`,"collection.table.updated":`更新时间`,"collection.table.actions":`操作`,"rowActions.menuLabel":`数据行操作`,"rowActions.cancel":`取消`,"collection.untitled":`(未命名)`,"collection.searchPlaceholder":`搜索标题、ID、状态...`,"collection.empty.search":`没有符合“{search}”的资料。`,"collection.refreshing":`列表更新中...`,"collection.loadMore":`加载更多`,"collection.export":`导出 CSV`,"collection.copyId":`复制完整 ID`,"collection.table.id":`ID`,"collection.table.selectAll":`选取本页所有项目`,"collection.table.selectRow":`选取 {name}`,"collection.bulk.selectedCount":`已选取 {count} 笔`,"collection.bulk.publish":`发布`,"collection.bulk.unpublish":`下架`,"collection.bulk.delete":`删除`,"collection.bulk.deleteConfirm":`删除已选取的 {count} 笔资料?这个动作无法复原。`,"crud.editTooltip":`编辑{name}。`,"crud.deleteTooltip":`删除{name}。`,"crud.saveTitle":`保存标题`,"crud.cancelTitle":`取消编辑`,"crud.deleteConfirm":`确定要删除{name}?这个动作无法复原。`,"crud.saving":`保存中...`,"entryEdit.back":`回到 {name}`,"entryEdit.body":`编辑 {name} 的内容,相关资料会自动带出。`,"entryEdit.parent":`父层:{name}`,"entryEdit.save":`保存变更`,"entryEdit.saveTooltip":`保存这笔资料。`,"entryEdit.fields":`资料字段`,"entryEdit.meta":`资料信息`,"entryEdit.related":`相关资料`,"entryEdit.noRelated":`目前没有推导出这笔资料的子 collection。`,"entryEdit.noChildEntries":`目前没有符合这笔资料的子资料。`,"entryEdit.relationship":`透过子字段 {child} 对应父字段 {parent}。`,"entryEdit.addItem":`新增项目`,"entryEdit.removeItem":`移除项目`,"entryEdit.emptyOption":`无值`,"entryEdit.boolean":`启用`,"entryEdit.operationalHint":`系统写入的资料——手动修改可能在下次同步时被覆盖。`,"settings.page.title":`商店设置`,"settings.page.body":`管理全站品牌文案与预设服务信息,让商品与首页可以共用。`,"settings.tabsLabel":`商店设置分页`,"settings.tab.brand":`品牌`,"settings.tab.tracking":`追踪码`,"settings.brandSection":`品牌与服务`,"settings.brandSectionBody":`生成页面时共用的默认站台文案。`,"settings.siteBrand":`网站品牌`,"settings.siteTitle":`网站标题`,"settings.siteDescription":`网站描述`,"settings.trackingSection":`追踪码`,"settings.trackingSectionBody":`填入 analytics ID 后,Mantle 会在生成的前台页面自动埋入对应追踪码。`,"settings.ga4MeasurementId":`GA4 Measurement ID`,"settings.ga4MeasurementIdHelp":`只需要填 ID,例如 G-XXXXXXXXXX,不要贴整段 gtag script。`,"settings.facebookPixelId":`Facebook Pixel ID`,"settings.facebookPixelIdHelp":`只需要填数字 Pixel ID,Mantle 会生成标准 Pixel base code。`,"guide.close":`关闭引导`,"guide.open":`使用者引导`,"guide.next":`下一步`,"guide.prev":`上一步`,"guide.finish":`完成`,"guide.collections.title":`从内容开始`,"guide.collections.body":`打开第一个 collection,管理里面的项目、状态与多语内容。`,"guide.filters.title":`切换发布状态`,"guide.filters.body":`在清单上直接切换全部、草稿、已发布与已归档,不需要离开当前页面。`,"guide.actions.title":`在清单里直接操作`,"guide.actions.body":`用每列右侧操作编辑项目,或从网站移除。`,"guide.reopen.title":`随时重新打开引导`,"guide.reopen.body":`右上角会保留使用者引导按钮,需要时可以再次开启或关闭这套逐步导览。`,"nav.home":`首页`,"nav.content":`内容`,"nav.operations":`运营数据`,"nav.media":`媒体库`,"nav.more":`更多`,"nav.approvals":`审核`,"nav.settings":`设置`,"nav.ops":`操作`,"nav.reports":`报表`,"ops.page.title":`操作`,"ops.page.body":`站务操作都在这里。填好字段、按执行,结果会直接显示在下方。`,"ops.run":`执行`,"ops.running":`执行中...`,"ops.result.title":`结果`,"ops.empty.title":`目前没有开放给 staff 的操作`,"ops.empty.body":`目前没有可用的操作。网站配置把操作开放给站务人员后,表单会自动出现在这里。`,"ops.triggers.mcp":`MCP`,"ops.triggers.http":`HTTP`,"views.page.body":`{schema} 的只读报表。`,"views.params.title":`查询参数`,"views.run":`查询`,"views.running":`查询中...`,"views.empty.title":`没有数据`,"views.empty.body":`当前条件下没有数据。`,"views.notFound.title":`找不到这个 View`,"status.draft":`草稿`,"status.review":`审核中`,"status.published":`已发布`,"status.archived":`已归档`,"preferences.heading":`偏好设置`,"preferences.language":`后台语言`,"preferences.language.search":`搜索语言...`,"preferences.language.noResults":`找不到语言。`,"preferences.direction":`文字方向`,"preferences.direction.auto":`文字方向会跟随选择的语言。`,"preferences.appearance":`外观`,"preferences.light":`浅色`,"preferences.dark":`深色`,"preferences.system":`跟随系统`,"preferences.ltr":`从左到右`,"preferences.rtl":`从右到左`,"preferences.page.open":`个人偏好`,"preferences.page.title":`个人偏好`,"preferences.page.body":`这些偏好只保存在此浏览器,只影响 admin console,不会修改站点设置。`,"preferences.page.languageBody":`选择系统页面和 admin chrome 使用的语言。`,"preferences.page.appearanceBody":`选择浅色、深色,或跟随操作系统。`,"editor.page.title":`内容编辑器`,"editor.page.body":`在交给 agent 或发布流程前,先用 Markdown、HTML 或 Rich Editor 编辑内容草稿。`,"editor.mode.markdown":`Markdown`,"editor.mode.html":`HTML`,"editor.mode.rich":`Rich Editor`,"editor.titleLabel":`标题`,"editor.slugLabel":`Slug`,"editor.bodyLabel":`正文`,"editor.preview":`预览`,"editor.saveDraft":`保存草稿`,"editor.markdownHint":`支持标题、列表、链接与 fenced code blocks。`,"editor.htmlHint":`用源码模式编辑可信任的 HTML 片段。`,"editor.richHint":`不用碰 markup 也能整理段落、提示框与内文。`,"editor.toolbar":`Rich Editor 工具栏`,"editor.undo":`撤销`,"editor.redo":`重做`,"editor.aiClean":`插入提示区块`,"editor.uploadImage":`上传图片`,"editor.uploading":`图片上传中...`,"editor.textStyle":`文字样式`,"editor.headingPlaceholder":`标题`,"editor.selectedText":`选取文字`,"editor.bold":`粗体`,"editor.italic":`斜体`,"editor.underline":`下划线`,"editor.strike":`删除线`,"editor.inlineCode":`行内代码`,"editor.textColor":`文字颜色`,"editor.highlight":`高亮标记`,"editor.palette":`品牌色`,"editor.alignLeft":`左对齐`,"editor.alignCenter":`居中对齐`,"editor.alignRight":`右对齐`,"editor.bulletList":`项目列表`,"editor.numberList":`编号列表`,"editor.checkList":`待办列表`,"editor.indent":`缩进`,"editor.link":`链接`,"editor.linkText":`链接文字`,"editor.table":`表格`,"editor.mediaLibrary":`媒体库`,"editor.imageUrl":`图片网址`,"editor.insertImage":`插入图片`,"editor.videoUrl":`YouTube / Dailymotion 链接`,"editor.insertVideo":`插入视频`,"media.alt":`替代文字`,"media.title":`媒体库`,"media.description":`这个网站上传过的所有图片。可以在内容中重复使用、整理替代文字,或删除不需要的图片。`,"media.upload":`上传`,"media.uploading":`上传中...`,"media.dropHere":`把图片拖到这里上传`,"media.searchPlaceholder":`搜索替代文字、说明或 id`,"media.empty.title":`还没有图片`,"media.empty.all":`上传一张图片,开始建立媒体库。`,"media.empty.search":`没有符合“{search}”的图片。`,"media.noPurpose":`这个网站没有设置上传用途,无法上传。`,"media.caption":`说明文字`,"media.altPlaceholder":`描述这张图片`,"media.captionPlaceholder":`选填说明`,"media.save":`保存`,"media.saving":`保存中...`,"media.saved":`已保存`,"media.delete":`删除`,"media.deleteConfirm":`确定要删除这张图片吗?所有使用到的地方都会一并移除。`,"media.open":`打开原图`,"media.copyId":`复制 id`,"media.uploaded":`上传于 {date}`,"media.pick":`从媒体库选择`,"media.pickTitle":`选择图片`,"media.pickDescription":`挑一张现有图片重复使用,或上传新图片。`,"media.use":`使用这张图片`,"media.loadMore":`加载更多`,"media.uploadFailed":`{total} 张图片中有 {count} 张上传失败。`,"media.encoderUnsupported":`这个网站的媒体政策要求此浏览器无法生成的图片格式({mime})。请联系网站开发者调整政策。`,"approvals.title":`审核中心`,"approvals.body":`集中查看等待审核的 editorial entries,发布前可以逐笔检查内容。`,"approvals.emptyTitle":`目前没有等待审核的内容`,"approvals.emptyBody":`送出审核的资料会依 collection 分组显示在这里。`,"approvals.groupBody":`目前有 {count} 笔内容标记为“{status}”。`,"approvals.openCollection":`打开清单`,"approvals.reviewEntry":`审核`,"entryEdit.publish":`发布`,"entryEdit.publishing":`发布中...`,"entryEdit.publishTooltip":`发布这笔草稿。`,"entryEdit.publishDisabledDirty":`请先保存变更才能发布。`,"entryEdit.unpublish":`取消发布`,"entryEdit.unpublishing":`取消发布中...`,"entryEdit.unpublishTooltip":`将这笔资料改回草稿以便编辑。`,"ops.error.executionFailed":`操作已执行,但未能完成。`,"ops.error.detailsLabel":`显示详细信息`,"ops.success":`{name} 已完成。`,"confirm.title":`确定要这么做吗?`,"confirm.cancel":`取消`,"confirm.confirm":`确定`,"collection.schemaSummary.lifecycleAndI18n":`管理 {name} 的项目、发布状态与多语内容。`,"collection.schemaSummary.lifecycleOnly":`管理 {name} 的项目与发布状态。`,"collection.schemaSummary.i18nOnly":`管理 {name} 的项目与多语内容。`,"collection.schemaSummary.plain":`管理 {name} 的项目。`,"entryEdit.mediaMissing":`这张图片已丢失或已被删除。`,"field.hint.moneyMinor":`金额(最小单位)`,"field.hint.timestampMs":`时间戳(毫秒)`},de:{"auth.signIn.title":`Anmelden`,"common.signOut":`Abmelden`,"common.viewSite":`Website ansehen`,"common.copy":`Kopieren`,"common.open":`Öffnen`,"common.failedToLoad":`Laden fehlgeschlagen`,"common.signedIn":`Angemeldet`,"collection.filter.all":`Alle`,"nav.home":`Start`,"nav.content":`Inhalte`,"nav.more":`Mehr`,"nav.approvals":`Freigaben`,"nav.settings":`Einstellungen`,"status.draft":`Entwürfe`,"status.review":`In Prüfung`,"status.published":`Veröffentlicht`,"status.archived":`Archiviert`,"preferences.heading":`Präferenzen`,"preferences.language":`Admin-Sprache`,"preferences.language.search":`Sprachen suchen...`,"preferences.language.noResults":`Keine Sprachen gefunden.`,"preferences.direction":`Textrichtung`,"preferences.direction.auto":`Die Textrichtung folgt der gewählten Sprache.`,"preferences.appearance":`Darstellung`,"preferences.light":`Hell`,"preferences.dark":`Dunkel`,"preferences.system":`System`,"preferences.ltr":`Links nach rechts`,"preferences.rtl":`Rechts nach links`,"preferences.page.open":`Präferenzen`,"preferences.page.title":`Persönliche Präferenzen`,"preferences.page.body":`Diese Präferenzen bleiben in diesem Browser. Sie ändern nur die Admin-Konsole und keine Website-Einstellungen.`,"preferences.page.languageBody":`Wähle die Sprache für Systemseiten und Admin-Chrome.`,"preferences.page.appearanceBody":`Wähle hell, dunkel oder dein Betriebssystem.`},es:{"auth.signIn.title":`Iniciar sesión`,"common.signOut":`Cerrar sesión`,"common.viewSite":`Ver sitio`,"common.copy":`Copiar`,"common.open":`Abrir`,"common.failedToLoad":`Error al cargar`,"common.signedIn":`Sesión iniciada`,"collection.filter.all":`Todo`,"nav.home":`Inicio`,"nav.content":`Contenido`,"nav.more":`Más`,"nav.approvals":`Aprobaciones`,"nav.settings":`Configuración`,"status.draft":`Borradores`,"status.review":`En revisión`,"status.published":`Publicado`,"status.archived":`Archivado`,"preferences.heading":`Preferencias`,"preferences.language":`Idioma del admin`,"preferences.language.search":`Buscar idiomas...`,"preferences.language.noResults":`No se encontraron idiomas.`,"preferences.direction":`Dirección del texto`,"preferences.direction.auto":`La dirección del texto sigue el idioma seleccionado.`,"preferences.appearance":`Apariencia`,"preferences.light":`Claro`,"preferences.dark":`Oscuro`,"preferences.system":`Sistema`,"preferences.ltr":`Izquierda a derecha`,"preferences.rtl":`Derecha a izquierda`,"preferences.page.open":`Preferencias`,"preferences.page.title":`Preferencias personales`,"preferences.page.body":`Estas preferencias se guardan en este navegador. Solo cambian la consola de administración y no modifican la configuración del sitio.`,"preferences.page.languageBody":`Elige el idioma de las páginas del sistema y la interfaz de administración.`,"preferences.page.appearanceBody":`Elige claro, oscuro o seguir el sistema operativo.`},fr:{"auth.signIn.title":`Se connecter`,"common.signOut":`Se déconnecter`,"common.viewSite":`Voir le site`,"common.copy":`Copier`,"common.open":`Ouvrir`,"common.failedToLoad":`Échec du chargement`,"common.signedIn":`Connecté`,"collection.filter.all":`Tout`,"nav.home":`Accueil`,"nav.content":`Contenu`,"nav.more":`Plus`,"nav.approvals":`Approbations`,"nav.settings":`Paramètres`,"status.draft":`Brouillons`,"status.review":`En révision`,"status.published":`Publié`,"status.archived":`Archivé`,"preferences.heading":`Préférences`,"preferences.language":`Langue admin`,"preferences.language.search":`Rechercher une langue...`,"preferences.language.noResults":`Aucune langue trouvée.`,"preferences.direction":`Direction du texte`,"preferences.direction.auto":`La direction du texte suit la langue sélectionnée.`,"preferences.appearance":`Apparence`,"preferences.light":`Clair`,"preferences.dark":`Sombre`,"preferences.system":`Système`,"preferences.ltr":`Gauche à droite`,"preferences.rtl":`Droite à gauche`,"preferences.page.open":`Préférences`,"preferences.page.title":`Préférences personnelles`,"preferences.page.body":`Ces préférences restent dans ce navigateur. Elles modifient seulement la console admin, pas les paramètres du site.`,"preferences.page.languageBody":`Choisissez la langue des pages système et de l'interface admin.`,"preferences.page.appearanceBody":`Choisissez clair, sombre ou le thème du système.`},it:{"auth.signIn.title":`Accedi`,"common.signOut":`Esci`,"common.viewSite":`Vedi sito`,"common.copy":`Copia`,"common.open":`Apri`,"common.failedToLoad":`Caricamento non riuscito`,"common.signedIn":`Accesso effettuato`,"collection.filter.all":`Tutto`,"nav.home":`Home`,"nav.content":`Contenuti`,"nav.more":`Altro`,"nav.approvals":`Approvazioni`,"nav.settings":`Impostazioni`,"status.draft":`Bozze`,"status.review":`In revisione`,"status.published":`Pubblicato`,"status.archived":`Archiviato`,"preferences.heading":`Preferenze`,"preferences.language":`Lingua admin`,"preferences.language.search":`Cerca lingue...`,"preferences.language.noResults":`Nessuna lingua trovata.`,"preferences.direction":`Direzione testo`,"preferences.direction.auto":`La direzione del testo segue la lingua selezionata.`,"preferences.appearance":`Aspetto`,"preferences.light":`Chiaro`,"preferences.dark":`Scuro`,"preferences.system":`Sistema`,"preferences.ltr":`Da sinistra a destra`,"preferences.rtl":`Da destra a sinistra`,"preferences.page.open":`Preferenze`,"preferences.page.title":`Preferenze personali`,"preferences.page.body":`Queste preferenze restano in questo browser. Modificano solo la console admin e non le impostazioni del sito.`,"preferences.page.languageBody":`Scegli la lingua delle pagine di sistema e dell'interfaccia admin.`,"preferences.page.appearanceBody":`Scegli chiaro, scuro o segui il sistema operativo.`},ja:{"auth.signIn.title":`サインイン`,"auth.signIn.methodsLoadFailed":`サインイン方法を読み込めませんでした。再読み込みしてください。`,"auth.signIn.noMethods":`このサイトにはサインイン方法が設定されていません。`,"auth.signIn.unknownMethod":`未対応のサインイン方法: {kind}`,"auth.signIn.method.social.button":`{provider} でサインイン`,"auth.signIn.method.email-otp.body":`メールに届くワンタイムコードでサインインします。`,"auth.signIn.method.email-otp.emailLabel":`メールアドレス`,"auth.signIn.method.email-otp.emailPlaceholder":`you@example.com`,"auth.signIn.method.email-otp.sendButton":`コードを送信`,"auth.signIn.method.email-otp.sendFailed":`コードの送信に失敗しました。メールを確認してもう一度お試しください。`,"auth.signIn.method.email-otp.sentTo":`{email} にコードを送信しました。`,"auth.signIn.method.email-otp.otpLabel":`ワンタイムコード`,"auth.signIn.method.email-otp.otpPlaceholder":`6 桁のコードを入力`,"auth.signIn.method.email-otp.verifyButton":`コードを確認してサインイン`,"auth.signIn.method.email-otp.verifyFailed":`コードが一致しません。もう一度入力してください。`,"auth.signIn.method.email-otp.back":`別のメールアドレスを使う`,"auth.signIn.method.magic-link.body":`ワンタップでサインインできるリンクをメールでお送りします。`,"auth.signIn.method.magic-link.emailLabel":`メールアドレス`,"auth.signIn.method.magic-link.emailPlaceholder":`you@example.com`,"auth.signIn.method.magic-link.sendButton":`サインインリンクを送信`,"auth.signIn.method.magic-link.sendFailed":`リンクの送信に失敗しました。メールを確認してもう一度お試しください。`,"auth.signIn.method.magic-link.sentTo":`{email} にサインインリンクを送信しました。`,"auth.signIn.method.magic-link.clickHint":`メール内のリンクをクリックしてサインインを完了してください。リンクはまもなく失効します。`,"auth.signIn.method.magic-link.anotherEmail":`別のメールアドレスを使う`,"common.signOut":`サインアウト`,"common.viewSite":`サイトを見る`,"common.copy":`コピー`,"common.open":`開く`,"common.failedToLoad":`読み込みに失敗しました`,"common.signedIn":`サインイン済み`,"collection.filter.all":`すべて`,"nav.home":`ホーム`,"nav.content":`コンテンツ`,"nav.more":`その他`,"nav.approvals":`承認`,"nav.settings":`設定`,"status.draft":`下書き`,"status.review":`レビュー中`,"status.published":`公開済み`,"status.archived":`アーカイブ済み`,"preferences.heading":`環境設定`,"preferences.language":`管理画面の言語`,"preferences.language.search":`言語を検索...`,"preferences.language.noResults":`言語が見つかりません。`,"preferences.direction":`文字方向`,"preferences.direction.auto":`文字方向は選択した言語に従います。`,"preferences.appearance":`外観`,"preferences.light":`ライト`,"preferences.dark":`ダーク`,"preferences.system":`システム`,"preferences.ltr":`左から右`,"preferences.rtl":`右から左`,"preferences.page.open":`環境設定`,"preferences.page.title":`個人設定`,"preferences.page.body":`これらの設定はこのブラウザにのみ保存されます。管理コンソールだけに影響し、サイト設定は変更しません。`,"preferences.page.languageBody":`システムページと管理 UI で使う言語を選びます。`,"preferences.page.appearanceBody":`ライト、ダーク、またはシステム設定に合わせます。`},ko:{"auth.signIn.title":`로그인`,"common.signOut":`로그아웃`,"common.viewSite":`사이트 보기`,"common.copy":`복사`,"common.open":`열기`,"common.failedToLoad":`로드 실패`,"common.signedIn":`로그인됨`,"collection.filter.all":`전체`,"nav.home":`홈`,"nav.content":`콘텐츠`,"nav.more":`더보기`,"nav.approvals":`승인`,"nav.settings":`설정`,"status.draft":`초안`,"status.review":`검토 중`,"status.published":`게시됨`,"status.archived":`보관됨`,"preferences.heading":`환경설정`,"preferences.language":`관리 언어`,"preferences.language.search":`언어 검색...`,"preferences.language.noResults":`언어를 찾을 수 없습니다.`,"preferences.direction":`텍스트 방향`,"preferences.direction.auto":`텍스트 방향은 선택한 언어를 따릅니다.`,"preferences.appearance":`화면 모드`,"preferences.light":`라이트`,"preferences.dark":`다크`,"preferences.system":`시스템`,"preferences.ltr":`왼쪽에서 오른쪽`,"preferences.rtl":`오른쪽에서 왼쪽`,"preferences.page.open":`환경설정`,"preferences.page.title":`개인 환경설정`,"preferences.page.body":`이 설정은 이 브라우저에만 저장됩니다. 관리 콘솔에만 적용되며 사이트 설정은 변경하지 않습니다.`,"preferences.page.languageBody":`시스템 페이지와 관리 UI에 사용할 언어를 선택합니다.`,"preferences.page.appearanceBody":`라이트, 다크 또는 운영체제 설정을 따르도록 선택합니다.`},"pt-BR":{"auth.signIn.title":`Entrar`,"common.signOut":`Sair`,"common.viewSite":`Ver site`,"common.copy":`Copiar`,"common.open":`Abrir`,"common.failedToLoad":`Falha ao carregar`,"common.signedIn":`Conectado`,"collection.filter.all":`Todos`,"nav.home":`Início`,"nav.content":`Conteúdo`,"nav.more":`Mais`,"nav.approvals":`Aprovações`,"nav.settings":`Configurações`,"status.draft":`Rascunhos`,"status.review":`Em revisão`,"status.published":`Publicado`,"status.archived":`Arquivado`,"preferences.heading":`Preferências`,"preferences.language":`Idioma do admin`,"preferences.language.search":`Pesquisar idiomas...`,"preferences.language.noResults":`Nenhum idioma encontrado.`,"preferences.direction":`Direção do texto`,"preferences.direction.auto":`A direção do texto segue o idioma selecionado.`,"preferences.appearance":`Aparência`,"preferences.light":`Claro`,"preferences.dark":`Escuro`,"preferences.system":`Sistema`,"preferences.ltr":`Esquerda para direita`,"preferences.rtl":`Direita para esquerda`,"preferences.page.open":`Preferências`,"preferences.page.title":`Preferências pessoais`,"preferences.page.body":`Estas preferências ficam neste navegador. Elas mudam apenas o console admin e não alteram as configurações do site.`,"preferences.page.languageBody":`Escolha o idioma das páginas do sistema e da interface admin.`,"preferences.page.appearanceBody":`Escolha claro, escuro ou seguir o sistema operacional.`},ru:{"auth.signIn.title":`Войти`,"common.signOut":`Выйти`,"common.viewSite":`Открыть сайт`,"common.copy":`Копировать`,"common.open":`Открыть`,"common.failedToLoad":`Не удалось загрузить`,"common.signedIn":`Вы вошли`,"collection.filter.all":`Все`,"nav.home":`Главная`,"nav.content":`Контент`,"nav.more":`Еще`,"nav.approvals":`Одобрения`,"nav.settings":`Настройки`,"status.draft":`Черновики`,"status.review":`На проверке`,"status.published":`Опубликовано`,"status.archived":`Архив`,"preferences.heading":`Предпочтения`,"preferences.language":`Язык админки`,"preferences.language.search":`Поиск языков...`,"preferences.language.noResults":`Языки не найдены.`,"preferences.direction":`Направление текста`,"preferences.direction.auto":`Направление текста следует выбранному языку.`,"preferences.appearance":`Внешний вид`,"preferences.light":`Светлая`,"preferences.dark":`Темная`,"preferences.system":`Система`,"preferences.ltr":`Слева направо`,"preferences.rtl":`Справа налево`,"preferences.page.open":`Предпочтения`,"preferences.page.title":`Личные предпочтения`,"preferences.page.body":`Эти предпочтения хранятся в этом браузере. Они меняют только админ-консоль и не изменяют настройки сайта.`,"preferences.page.languageBody":`Выберите язык системных страниц и интерфейса админки.`,"preferences.page.appearanceBody":`Выберите светлую, темную тему или тему системы.`},nl:{"auth.signIn.title":`Inloggen`,"common.signOut":`Uitloggen`,"common.viewSite":`Site bekijken`,"common.copy":`Kopiëren`,"common.open":`Openen`,"common.failedToLoad":`Laden mislukt`,"common.signedIn":`Ingelogd`,"collection.filter.all":`Alles`,"nav.home":`Home`,"nav.content":`Content`,"nav.more":`Meer`,"nav.approvals":`Goedkeuringen`,"nav.settings":`Instellingen`,"status.draft":`Concepten`,"status.review":`In review`,"status.published":`Gepubliceerd`,"status.archived":`Gearchiveerd`,"preferences.heading":`Voorkeuren`,"preferences.language":`Beheertaal`,"preferences.language.search":`Talen zoeken...`,"preferences.language.noResults":`Geen talen gevonden.`,"preferences.direction":`Tekstrichting`,"preferences.direction.auto":`De tekstrichting volgt de gekozen taal.`,"preferences.appearance":`Weergave`,"preferences.light":`Licht`,"preferences.dark":`Donker`,"preferences.system":`Systeem`,"preferences.ltr":`Links naar rechts`,"preferences.rtl":`Rechts naar links`,"preferences.page.open":`Voorkeuren`,"preferences.page.title":`Persoonlijke voorkeuren`,"preferences.page.body":`Deze voorkeuren blijven in deze browser. Ze wijzigen alleen de adminconsole en niet de site-instellingen.`,"preferences.page.languageBody":`Kies de taal voor systeempagina's en de admininterface.`,"preferences.page.appearanceBody":`Kies licht, donker of volg het besturingssysteem.`},pl:{"auth.signIn.title":`Zaloguj się`,"common.signOut":`Wyloguj się`,"common.viewSite":`Zobacz stronę`,"common.copy":`Kopiuj`,"common.open":`Otwórz`,"common.failedToLoad":`Nie udało się załadować`,"common.signedIn":`Zalogowano`,"collection.filter.all":`Wszystkie`,"nav.home":`Start`,"nav.content":`Treści`,"nav.more":`Więcej`,"nav.approvals":`Zatwierdzenia`,"nav.settings":`Ustawienia`,"status.draft":`Szkice`,"status.review":`W recenzji`,"status.published":`Opublikowane`,"status.archived":`Zarchiwizowane`,"preferences.heading":`Preferencje`,"preferences.language":`Język panelu`,"preferences.language.search":`Szukaj języków...`,"preferences.language.noResults":`Nie znaleziono języków.`,"preferences.direction":`Kierunek tekstu`,"preferences.direction.auto":`Kierunek tekstu wynika z wybranego języka.`,"preferences.appearance":`Wygląd`,"preferences.light":`Jasny`,"preferences.dark":`Ciemny`,"preferences.system":`System`,"preferences.ltr":`Od lewej do prawej`,"preferences.rtl":`Od prawej do lewej`,"preferences.page.open":`Preferencje`,"preferences.page.title":`Preferencje osobiste`,"preferences.page.body":`Te preferencje są zapisane w tej przeglądarce. Zmieniają tylko konsolę administracyjną, nie ustawienia strony.`,"preferences.page.languageBody":`Wybierz język stron systemowych i interfejsu admina.`,"preferences.page.appearanceBody":`Wybierz jasny, ciemny lub zgodny z systemem.`},tr:{"auth.signIn.title":`Oturum aç`,"common.signOut":`Çıkış yap`,"common.viewSite":`Siteyi görüntüle`,"common.copy":`Kopyala`,"common.open":`Aç`,"common.failedToLoad":`Yüklenemedi`,"common.signedIn":`Oturum açık`,"collection.filter.all":`Tümü`,"nav.home":`Ana sayfa`,"nav.content":`İçerik`,"nav.more":`Daha fazla`,"nav.approvals":`Onaylar`,"nav.settings":`Ayarlar`,"status.draft":`Taslaklar`,"status.review":`İncelemede`,"status.published":`Yayında`,"status.archived":`Arşivlendi`,"preferences.heading":`Tercihler`,"preferences.language":`Yönetici dili`,"preferences.language.search":`Dil ara...`,"preferences.language.noResults":`Dil bulunamadı.`,"preferences.direction":`Metin yönü`,"preferences.direction.auto":`Metin yönü seçilen dili izler.`,"preferences.appearance":`Görünüm`,"preferences.light":`Açık`,"preferences.dark":`Koyu`,"preferences.system":`Sistem`,"preferences.ltr":`Soldan sağa`,"preferences.rtl":`Sağdan sola`,"preferences.page.open":`Tercihler`,"preferences.page.title":`Kişisel tercihler`,"preferences.page.body":`Bu tercihler bu tarayıcıda kalır. Yalnızca yönetim konsolunu değiştirir, site ayarlarını değiştirmez.`,"preferences.page.languageBody":`Sistem sayfaları ve yönetim arayüzü için dili seçin.`,"preferences.page.appearanceBody":`Açık, koyu veya işletim sistemini takip et seçeneğini seçin.`},vi:{"auth.signIn.title":`Đăng nhập`,"common.signOut":`Đăng xuất`,"common.viewSite":`Xem trang`,"common.copy":`Sao chép`,"common.open":`Mở`,"common.failedToLoad":`Tải thất bại`,"common.signedIn":`Đã đăng nhập`,"collection.filter.all":`Tất cả`,"nav.home":`Trang chủ`,"nav.content":`Nội dung`,"nav.more":`Thêm`,"nav.approvals":`Phê duyệt`,"nav.settings":`Cài đặt`,"status.draft":`Bản nháp`,"status.review":`Đang duyệt`,"status.published":`Đã xuất bản`,"status.archived":`Đã lưu trữ`,"preferences.heading":`Tùy chọn`,"preferences.language":`Ngôn ngữ quản trị`,"preferences.language.search":`Tìm ngôn ngữ...`,"preferences.language.noResults":`Không tìm thấy ngôn ngữ.`,"preferences.direction":`Hướng văn bản`,"preferences.direction.auto":`Hướng văn bản theo ngôn ngữ đã chọn.`,"preferences.appearance":`Giao diện`,"preferences.light":`Sáng`,"preferences.dark":`Tối`,"preferences.system":`Hệ thống`,"preferences.ltr":`Trái sang phải`,"preferences.rtl":`Phải sang trái`,"preferences.page.open":`Tùy chọn`,"preferences.page.title":`Tùy chọn cá nhân`,"preferences.page.body":`Các tùy chọn này chỉ lưu trong trình duyệt này. Chúng chỉ thay đổi admin console và không sửa cài đặt trang.`,"preferences.page.languageBody":`Chọn ngôn ngữ cho trang hệ thống và giao diện quản trị.`,"preferences.page.appearanceBody":`Chọn sáng, tối hoặc theo hệ điều hành.`},cs:{"auth.signIn.title":`Přihlásit se`,"common.signOut":`Odhlásit se`,"common.viewSite":`Zobrazit web`,"common.copy":`Kopírovat`,"common.open":`Otevřít`,"common.failedToLoad":`Načtení selhalo`,"common.signedIn":`Přihlášeno`,"collection.filter.all":`Vše`,"nav.home":`Domů`,"nav.content":`Obsah`,"nav.more":`Více`,"nav.approvals":`Schválení`,"nav.settings":`Nastavení`,"status.draft":`Koncepty`,"status.review":`V kontrole`,"status.published":`Publikováno`,"status.archived":`Archivováno`,"preferences.heading":`Předvolby`,"preferences.language":`Jazyk administrace`,"preferences.language.search":`Hledat jazyky...`,"preferences.language.noResults":`Nenalezeny žádné jazyky.`,"preferences.direction":`Směr textu`,"preferences.direction.auto":`Směr textu se řídí vybraným jazykem.`,"preferences.appearance":`Vzhled`,"preferences.light":`Světlý`,"preferences.dark":`Tmavý`,"preferences.system":`Systém`,"preferences.ltr":`Zleva doprava`,"preferences.rtl":`Zprava doleva`,"preferences.page.open":`Předvolby`,"preferences.page.title":`Osobní předvolby`,"preferences.page.body":`Tyto předvolby zůstávají v tomto prohlížeči. Mění jen administrační konzoli, ne nastavení webu.`,"preferences.page.languageBody":`Vyberte jazyk systémových stránek a administračního rozhraní.`,"preferences.page.appearanceBody":`Vyberte světlý, tmavý nebo systémový režim.`},uk:{"auth.signIn.title":`Увійти`,"common.signOut":`Вийти`,"common.viewSite":`Переглянути сайт`,"common.copy":`Копіювати`,"common.open":`Відкрити`,"common.failedToLoad":`Не вдалося завантажити`,"common.signedIn":`Ви увійшли`,"collection.filter.all":`Усі`,"nav.home":`Головна`,"nav.content":`Контент`,"nav.more":`Більше`,"nav.approvals":`Схвалення`,"nav.settings":`Налаштування`,"status.draft":`Чернетки`,"status.review":`На перевірці`,"status.published":`Опубліковано`,"status.archived":`Архівовано`,"preferences.heading":`Параметри`,"preferences.language":`Мова адмінки`,"preferences.language.search":`Пошук мов...`,"preferences.language.noResults":`Мови не знайдено.`,"preferences.direction":`Напрям тексту`,"preferences.direction.auto":`Напрям тексту відповідає вибраній мові.`,"preferences.appearance":`Вигляд`,"preferences.light":`Світла`,"preferences.dark":`Темна`,"preferences.system":`Система`,"preferences.ltr":`Зліва направо`,"preferences.rtl":`Справа наліво`,"preferences.page.open":`Параметри`,"preferences.page.title":`Особисті параметри`,"preferences.page.body":`Ці параметри зберігаються в цьому браузері. Вони змінюють лише адмін-консоль, а не налаштування сайту.`,"preferences.page.languageBody":`Виберіть мову системних сторінок та адмін-інтерфейсу.`,"preferences.page.appearanceBody":`Виберіть світлу, темну тему або тему системи.`},ar:{"auth.signIn.title":`تسجيل الدخول`,"common.signOut":`تسجيل الخروج`,"common.viewSite":`عرض الموقع`,"common.copy":`نسخ`,"common.open":`فتح`,"common.failedToLoad":`فشل التحميل`,"common.signedIn":`تم تسجيل الدخول`,"collection.filter.all":`الكل`,"nav.home":`الرئيسية`,"nav.content":`المحتوى`,"nav.more":`المزيد`,"nav.approvals":`الموافقات`,"nav.settings":`الإعدادات`,"status.draft":`مسودات`,"status.review":`قيد المراجعة`,"status.published":`منشور`,"status.archived":`مؤرشف`,"preferences.heading":`التفضيلات`,"preferences.language":`لغة الإدارة`,"preferences.language.search":`ابحث عن اللغات...`,"preferences.language.noResults":`لم يتم العثور على لغات.`,"preferences.direction":`اتجاه النص`,"preferences.direction.auto":`يتبع اتجاه النص اللغة المحددة.`,"preferences.appearance":`المظهر`,"preferences.light":`فاتح`,"preferences.dark":`داكن`,"preferences.system":`النظام`,"preferences.ltr":`من اليسار إلى اليمين`,"preferences.rtl":`من اليمين إلى اليسار`,"preferences.page.open":`التفضيلات`,"preferences.page.title":`التفضيلات الشخصية`,"preferences.page.body":`تبقى هذه التفضيلات في هذا المتصفح. إنها تغيّر وحدة الإدارة فقط ولا تعدّل إعدادات الموقع.`,"preferences.page.languageBody":`اختر لغة صفحات النظام وواجهة الإدارة.`,"preferences.page.appearanceBody":`اختر الوضع الفاتح أو الداكن أو اتبع نظام التشغيل.`},he:{"auth.signIn.title":`כניסה`,"common.signOut":`יציאה`,"common.viewSite":`הצג אתר`,"common.copy":`העתק`,"common.open":`פתח`,"common.failedToLoad":`הטעינה נכשלה`,"common.signedIn":`מחובר`,"collection.filter.all":`הכול`,"nav.home":`בית`,"nav.content":`תוכן`,"nav.more":`עוד`,"nav.approvals":`אישורים`,"nav.settings":`הגדרות`,"status.draft":`טיוטות`,"status.review":`בבדיקה`,"status.published":`פורסם`,"status.archived":`בארכיון`,"preferences.heading":`העדפות`,"preferences.language":`שפת ניהול`,"preferences.language.search":`חפש שפות...`,"preferences.language.noResults":`לא נמצאו שפות.`,"preferences.direction":`כיוון טקסט`,"preferences.direction.auto":`כיוון הטקסט נקבע לפי השפה שנבחרה.`,"preferences.appearance":`מראה`,"preferences.light":`בהיר`,"preferences.dark":`כהה`,"preferences.system":`מערכת`,"preferences.ltr":`משמאל לימין`,"preferences.rtl":`מימין לשמאל`,"preferences.page.open":`העדפות`,"preferences.page.title":`העדפות אישיות`,"preferences.page.body":`העדפות אלה נשמרות בדפדפן הזה. הן משנות רק את מסוף הניהול ולא את הגדרות האתר.`,"preferences.page.languageBody":`בחר את שפת דפי המערכת וממשק הניהול.`,"preferences.page.appearanceBody":`בחר בהיר, כהה או לפי מערכת ההפעלה.`},fa:{"auth.signIn.title":`ورود`,"common.signOut":`خروج`,"common.viewSite":`مشاهده سایت`,"common.copy":`کپی`,"common.open":`باز کردن`,"common.failedToLoad":`بارگذاری ناموفق بود`,"common.signedIn":`وارد شدهاید`,"collection.filter.all":`همه`,"nav.home":`خانه`,"nav.content":`محتوا`,"nav.more":`بیشتر`,"nav.approvals":`تأییدها`,"nav.settings":`تنظیمات`,"status.draft":`پیشنویسها`,"status.review":`در بازبینی`,"status.published":`منتشر شده`,"status.archived":`بایگانی شده`,"preferences.heading":`ترجیحات`,"preferences.language":`زبان مدیریت`,"preferences.language.search":`جستجوی زبانها...`,"preferences.language.noResults":`زبانی پیدا نشد.`,"preferences.direction":`جهت متن`,"preferences.direction.auto":`جهت متن از زبان انتخابشده پیروی میکند.`,"preferences.appearance":`ظاهر`,"preferences.light":`روشن`,"preferences.dark":`تیره`,"preferences.system":`سیستم`,"preferences.ltr":`چپ به راست`,"preferences.rtl":`راست به چپ`,"preferences.page.open":`ترجیحات`,"preferences.page.title":`ترجیحات شخصی`,"preferences.page.body":`این ترجیحات در همین مرورگر ذخیره میشود. فقط کنسول مدیریت را تغییر میدهد و تنظیمات سایت را تغییر نمیدهد.`,"preferences.page.languageBody":`زبان صفحات سیستمی و رابط مدیریت را انتخاب کنید.`,"preferences.page.appearanceBody":`روشن، تیره یا پیروی از سیستمعامل را انتخاب کنید.`},th:{"auth.signIn.title":`เข้าสู่ระบบ`,"common.signOut":`ออกจากระบบ`,"common.viewSite":`ดูเว็บไซต์`,"common.copy":`คัดลอก`,"common.open":`เปิด`,"common.failedToLoad":`โหลดไม่สำเร็จ`,"common.signedIn":`เข้าสู่ระบบแล้ว`,"collection.filter.all":`ทั้งหมด`,"nav.home":`หน้าแรก`,"nav.content":`เนื้อหา`,"nav.more":`เพิ่มเติม`,"nav.approvals":`การอนุมัติ`,"nav.settings":`การตั้งค่า`,"status.draft":`ฉบับร่าง`,"status.review":`กำลังตรวจสอบ`,"status.published":`เผยแพร่แล้ว`,"status.archived":`เก็บถาวร`,"preferences.heading":`ค่ากำหนด`,"preferences.language":`ภาษาผู้ดูแล`,"preferences.language.search":`ค้นหาภาษา...`,"preferences.language.noResults":`ไม่พบภาษา`,"preferences.direction":`ทิศทางข้อความ`,"preferences.direction.auto":`ทิศทางข้อความจะตามภาษาที่เลือก`,"preferences.appearance":`รูปลักษณ์`,"preferences.light":`สว่าง`,"preferences.dark":`มืด`,"preferences.system":`ระบบ`,"preferences.ltr":`ซ้ายไปขวา`,"preferences.rtl":`ขวาไปซ้าย`,"preferences.page.open":`ค่ากำหนด`,"preferences.page.title":`ค่ากำหนดส่วนตัว`,"preferences.page.body":`ค่ากำหนดเหล่านี้จะอยู่ในเบราว์เซอร์นี้เท่านั้น และมีผลกับ admin console โดยไม่แก้การตั้งค่าเว็บไซต์`,"preferences.page.languageBody":`เลือกภาษาสำหรับหน้าระบบและส่วนติดต่อผู้ดูแล`,"preferences.page.appearanceBody":`เลือกสว่าง มืด หรือใช้ตามระบบปฏิบัติการ`},id:{"auth.signIn.title":`Masuk`,"common.signOut":`Keluar`,"common.viewSite":`Lihat situs`,"common.copy":`Salin`,"common.open":`Buka`,"common.failedToLoad":`Gagal memuat`,"common.signedIn":`Sudah masuk`,"collection.filter.all":`Semua`,"nav.home":`Beranda`,"nav.content":`Konten`,"nav.more":`Lainnya`,"nav.approvals":`Persetujuan`,"nav.settings":`Pengaturan`,"status.draft":`Draf`,"status.review":`Dalam ulasan`,"status.published":`Terbit`,"status.archived":`Arsip`,"preferences.heading":`Preferensi`,"preferences.language":`Bahasa admin`,"preferences.language.search":`Cari bahasa...`,"preferences.language.noResults":`Bahasa tidak ditemukan.`,"preferences.direction":`Arah teks`,"preferences.direction.auto":`Arah teks mengikuti bahasa yang dipilih.`,"preferences.appearance":`Tampilan`,"preferences.light":`Terang`,"preferences.dark":`Gelap`,"preferences.system":`Sistem`,"preferences.ltr":`Kiri ke kanan`,"preferences.rtl":`Kanan ke kiri`,"preferences.page.open":`Preferensi`,"preferences.page.title":`Preferensi pribadi`,"preferences.page.body":`Preferensi ini tetap di browser ini. Preferensi hanya mengubah konsol admin dan tidak mengubah pengaturan situs.`,"preferences.page.languageBody":`Pilih bahasa untuk halaman sistem dan antarmuka admin.`,"preferences.page.appearanceBody":`Pilih terang, gelap, atau ikuti sistem operasi.`}};function Y(e,t,n={}){let r=Hc[e]?.[t]??Hc.en[t];for(let[e,t]of Object.entries(n))r=r.split(`{${e}}`).join(t);return r}function Uc({brand:e}){let{setOpenMobile:t}=Hs(),{language:n}=J();return(0,I.jsx)(Qs,{children:(0,I.jsx)($s,{children:(0,I.jsx)(tc,{asChild:!0,size:`lg`,className:`data-[slot=sidebar-menu-button]:!p-1.5`,children:(0,I.jsxs)(`a`,{href:e.href??`/admin`,onClick:()=>t(!1),children:[(0,I.jsx)(`span`,{className:`text-primary flex aspect-square size-8 items-center justify-center`,children:(0,I.jsx)(Bc,{className:`size-5`})}),(0,I.jsx)(`div`,{"data-sidebar-label":!0,className:`grid flex-1 text-start text-sm leading-tight`,children:(0,I.jsx)(`span`,{className:`truncate font-semibold`,children:Y(n,`admin.consoleTitle`)})})]})})})})}var Wc=`Collapsible`,[Gc,Kc]=G(Wc),[qc,Jc]=Gc(Wc),Yc=F.forwardRef((e,t)=>{let{__scopeCollapsible:n,open:r,defaultOpen:i,disabled:a,onOpenChange:o,...s}=e,[c,l]=Fi({prop:r,defaultProp:i??!1,onChange:o,caller:Wc});return(0,I.jsx)(qc,{scope:n,disabled:a,contentId:Ni(),open:c,onOpenToggle:F.useCallback(()=>l(e=>!e),[l]),children:(0,I.jsx)(zi.div,{"data-state":tl(c),"data-disabled":a?``:void 0,...s,ref:t})})});Yc.displayName=Wc;var Xc=`CollapsibleTrigger`,Zc=F.forwardRef((e,t)=>{let{__scopeCollapsible:n,...r}=e,i=Jc(Xc,n);return(0,I.jsx)(zi.button,{type:`button`,"aria-controls":i.open?i.contentId:void 0,"aria-expanded":i.open||!1,"data-state":tl(i.open),"data-disabled":i.disabled?``:void 0,disabled:i.disabled,...r,ref:t,onClick:W(e.onClick,i.onOpenToggle)})});Zc.displayName=Xc;var Qc=`CollapsibleContent`,$c=F.forwardRef((e,t)=>{let{forceMount:n,...r}=e,i=Jc(Qc,e.__scopeCollapsible);return(0,I.jsx)(Sa,{present:n||i.open,children:({present:e})=>(0,I.jsx)(el,{...r,ref:t,present:e})})});$c.displayName=Qc;var el=F.forwardRef((e,t)=>{let{__scopeCollapsible:n,present:r,children:i,...a}=e,o=Jc(Qc,n),[s,c]=F.useState(r),l=F.useRef(null),u=Un(t,l),d=F.useRef(0),f=d.current,p=F.useRef(0),m=p.current,h=o.open||s,g=F.useRef(h),_=F.useRef(void 0);return F.useEffect(()=>{let e=requestAnimationFrame(()=>g.current=!1);return()=>cancelAnimationFrame(e)},[]),Ai(()=>{let e=l.current;if(e){_.current=_.current||{transitionDuration:e.style.transitionDuration,animationName:e.style.animationName},e.style.transitionDuration=`0s`,e.style.animationName=`none`;let t=e.getBoundingClientRect();d.current=t.height,p.current=t.width,g.current||(e.style.transitionDuration=_.current.transitionDuration,e.style.animationName=_.current.animationName),c(r)}},[o.open,r]),(0,I.jsx)(zi.div,{"data-state":tl(o.open),"data-disabled":o.disabled?``:void 0,id:o.contentId,hidden:!h,...a,ref:u,style:{"--radix-collapsible-content-height":f?`${f}px`:void 0,"--radix-collapsible-content-width":m?`${m}px`:void 0,...e.style},children:h&&i})});function tl(e){return e?`open`:`closed`}var nl=Yc,rl=Zc,il=$c;function al(e){let t=e+`CollectionProvider`,[n,r]=G(t),[i,a]=n(t,{collectionRef:{current:null},itemMap:new Map}),o=e=>{let{scope:t,children:n}=e,r=F.useRef(null),a=F.useRef(new Map).current;return(0,I.jsx)(i,{scope:t,itemMap:a,collectionRef:r,children:n})};o.displayName=t;let s=e+`CollectionSlot`,c=Wn(s),l=F.forwardRef((e,t)=>{let{scope:n,children:r}=e,i=Un(t,a(s,n).collectionRef);return(0,I.jsx)(c,{ref:i,children:r})});l.displayName=s;let u=e+`CollectionItemSlot`,d=`data-radix-collection-item`,f=Wn(u),p=F.forwardRef((e,t)=>{let{scope:n,children:r,...i}=e,o=F.useRef(null),s=Un(t,o),c=a(u,n);return F.useEffect(()=>(c.itemMap.set(o,{ref:o,...i}),()=>void c.itemMap.delete(o))),(0,I.jsx)(f,{[d]:``,ref:s,children:r})});p.displayName=u;function m(t){let n=a(e+`CollectionConsumer`,t);return F.useCallback(()=>{let e=n.collectionRef.current;if(!e)return[];let t=Array.from(e.querySelectorAll(`[${d}]`));return Array.from(n.itemMap.values()).sort((e,n)=>t.indexOf(e.ref.current)-t.indexOf(n.ref.current))},[n.collectionRef,n.itemMap])}return[{Provider:o,Slot:l,ItemSlot:p},m,r]}var ol=F.createContext(void 0);function sl(e){let t=F.useContext(ol);return e||t||`ltr`}var cl=[`top`,`right`,`bottom`,`left`],ll=Math.min,ul=Math.max,dl=Math.round,fl=Math.floor,pl=e=>({x:e,y:e}),ml={left:`right`,right:`left`,bottom:`top`,top:`bottom`};function hl(e,t,n){return ul(e,ll(t,n))}function gl(e,t){return typeof e==`function`?e(t):e}function _l(e){return e.split(`-`)[0]}function vl(e){return e.split(`-`)[1]}function yl(e){return e===`x`?`y`:`x`}function bl(e){return e===`y`?`height`:`width`}function xl(e){let t=e[0];return t===`t`||t===`b`?`y`:`x`}function Sl(e){return yl(xl(e))}function Cl(e,t,n){n===void 0&&(n=!1);let r=vl(e),i=Sl(e),a=bl(i),o=i===`x`?r===(n?`end`:`start`)?`right`:`left`:r===`start`?`bottom`:`top`;return t.reference[a]>t.floating[a]&&(o=Ml(o)),[o,Ml(o)]}function wl(e){let t=Ml(e);return[Tl(e),t,Tl(t)]}function Tl(e){return e.includes(`start`)?e.replace(`start`,`end`):e.replace(`end`,`start`)}var El=[`left`,`right`],Dl=[`right`,`left`],Ol=[`top`,`bottom`],kl=[`bottom`,`top`];function Al(e,t,n){switch(e){case`top`:case`bottom`:return n?t?Dl:El:t?El:Dl;case`left`:case`right`:return t?Ol:kl;default:return[]}}function jl(e,t,n,r){let i=vl(e),a=Al(_l(e),n===`start`,r);return i&&(a=a.map(e=>e+`-`+i),t&&(a=a.concat(a.map(Tl)))),a}function Ml(e){let t=_l(e);return ml[t]+e.slice(t.length)}function Nl(e){return{top:e.top??0,right:e.right??0,bottom:e.bottom??0,left:e.left??0}}function Pl(e){return typeof e==`number`?{top:e,right:e,bottom:e,left:e}:Nl(e)}function X(e){let{x:t,y:n,width:r,height:i}=e;return{width:r,height:i,top:n,left:t,right:t+r,bottom:n+i,x:t,y:n}}function Fl(e,t,n){let{reference:r,floating:i}=e,a=xl(t),o=Sl(t),s=bl(o),c=_l(t),l=a===`y`,u=r.x+r.width/2-i.width/2,d=r.y+r.height/2-i.height/2,f=r[s]/2-i[s]/2,p;switch(c){case`top`:p={x:u,y:r.y-i.height};break;case`bottom`:p={x:u,y:r.y+r.height};break;case`right`:p={x:r.x+r.width,y:d};break;case`left`:p={x:r.x-i.width,y:d};break;default:p={x:r.x,y:r.y}}let m=vl(t);return m&&(p[o]+=f*(m===`end`?1:-1)*(n&&l?-1:1)),p}async function Z(e,t){t===void 0&&(t={});let{x:n,y:r,platform:i,rects:a,elements:o,strategy:s}=e,{boundary:c=`clippingAncestors`,rootBoundary:l=`viewport`,elementContext:u=`floating`,altBoundary:d=!1,padding:f=0}=gl(t,e),p=Pl(f),m=o[d?u===`floating`?`reference`:`floating`:u],h=X(await i.getClippingRect({element:await(i.isElement==null?void 0:i.isElement(m))??!0?m:m.contextElement||await(i.getDocumentElement==null?void 0:i.getDocumentElement(o.floating)),boundary:c,rootBoundary:l,strategy:s})),g=u===`floating`?{x:n,y:r,width:a.floating.width,height:a.floating.height}:a.reference,_=await(i.getOffsetParent==null?void 0:i.getOffsetParent(o.floating)),v=await(i.isElement==null?void 0:i.isElement(_))&&await(i.getScale==null?void 0:i.getScale(_))||{x:1,y:1},y=X(i.convertOffsetParentRelativeRectToViewportRelativeRect?await i.convertOffsetParentRelativeRectToViewportRelativeRect({elements:o,rect:g,offsetParent:_,strategy:s}):g);return{top:(h.top-y.top+p.top)/v.y,bottom:(y.bottom-h.bottom+p.bottom)/v.y,left:(h.left-y.left+p.left)/v.x,right:(y.right-h.right+p.right)/v.x}}var Q=50,Il=async(e,t,n)=>{let{placement:r=`bottom`,strategy:i=`absolute`,middleware:a=[],platform:o}=n,s=o.detectOverflow?o:{...o,detectOverflow:Z},c=await(o.isRTL==null?void 0:o.isRTL(t)),l=await o.getElementRects({reference:e,floating:t,strategy:i}),{x:u,y:d}=Fl(l,r,c),f=r,p=0,m={};for(let n=0;n<a.length;n++){let h=a[n];if(!h)continue;let{name:g,fn:_}=h,{x:v,y,data:b,reset:x}=await _({x:u,y:d,initialPlacement:r,placement:f,strategy:i,middlewareData:m,rects:l,platform:s,elements:{reference:e,floating:t}});u=v??u,d=y??d,m[g]={...m[g],...b},x&&p<Q&&(p++,typeof x==`object`&&(x.placement&&(f=x.placement),x.rects&&(l=x.rects===!0?await o.getElementRects({reference:e,floating:t,strategy:i}):x.rects),{x:u,y:d}=Fl(l,f,c)),n=-1)}return{x:u,y:d,placement:f,strategy:i,middlewareData:m}},Ll=e=>({name:`arrow`,options:e,async fn(t){let{x:n,y:r,placement:i,rects:a,platform:o,elements:s,middlewareData:c}=t,{element:l,padding:u=0}=gl(e,t)||{};if(l==null)return{};let d=Pl(u),f={x:n,y:r},p=Sl(i),m=bl(p),h=await o.getDimensions(l),g=p===`y`,_=g?`top`:`left`,v=g?`bottom`:`right`,y=g?`clientHeight`:`clientWidth`,b=a.reference[m]+a.reference[p]-f[p]-a.floating[m],x=f[p]-a.reference[p],S=await(o.getOffsetParent==null?void 0:o.getOffsetParent(l)),C=S?S[y]:0;(!C||!await(o.isElement==null?void 0:o.isElement(S)))&&(C=s.floating[y]||a.floating[m]);let w=b/2-x/2,T=C/2-h[m]/2-1,E=ll(d[_],T),D=ll(d[v],T),O=C-h[m]-D,k=C/2-h[m]/2+w,ee=hl(E,k,O),te=!c.arrow&&vl(i)!=null&&k!==ee&&a.reference[m]/2-(k<E?E:D)-h[m]/2<0,A=te?k<E?k-E:k-O:0;return{[p]:f[p]+A,data:{[p]:ee,centerOffset:k-ee-A,...te&&{alignmentOffset:A}},reset:te}}}),Rl=function(e){return e===void 0&&(e={}),{name:`flip`,options:e,async fn(t){var n;let{placement:r,middlewareData:i,rects:a,initialPlacement:o,platform:s,elements:c}=t,{mainAxis:l=!0,crossAxis:u=!0,fallbackPlacements:d,fallbackStrategy:f=`bestFit`,fallbackAxisSideDirection:p=`none`,flipAlignment:m=!0,...h}=gl(e,t);if((n=i.arrow)!=null&&n.alignmentOffset)return{};let g=_l(r),_=xl(o),v=_l(o)===o,y=await(s.isRTL==null?void 0:s.isRTL(c.floating)),b=d||(v||!m?[Ml(o)]:wl(o)),x=p!==`none`;!d&&x&&b.push(...jl(o,m,p,y));let S=[o,...b],C=await s.detectOverflow(t,h),w=[],T=i.flip?.overflows||[];if(l&&w.push(C[g]),u){let e=Cl(r,a,y);w.push(C[e[0]],C[e[1]])}if(T=[...T,{placement:r,overflows:w}],!w.every(e=>e<=0)){let e=(i.flip?.index||0)+1,t=S[e];if(t&&(!(u===`alignment`&&_!==xl(t))||T.every(e=>xl(e.placement)!==_||e.overflows[0]>0)))return{data:{index:e,overflows:T},reset:{placement:t}};let n=T.filter(e=>e.overflows[0]<=0).sort((e,t)=>e.overflows[1]-t.overflows[1])[0]?.placement;if(!n)switch(f){case`bestFit`:{let e=T.filter(e=>{if(x){let t=xl(e.placement);return t===_||t===`y`}return!0}).map(e=>[e.placement,e.overflows.filter(e=>e>0).reduce((e,t)=>e+t,0)]).sort((e,t)=>e[1]-t[1])[0]?.[0];e&&(n=e);break}case`initialPlacement`:n=o;break}if(r!==n)return{reset:{placement:n}}}return{}}}};function zl(e,t){return{top:e.top-t.height,right:e.right-t.width,bottom:e.bottom-t.height,left:e.left-t.width}}function Bl(e){return cl.some(t=>e[t]>=0)}var Vl=function(e){return e===void 0&&(e={}),{name:`hide`,options:e,async fn(t){let{rects:n,platform:r}=t,{strategy:i=`referenceHidden`,...a}=gl(e,t);switch(i){case`referenceHidden`:{let e=zl(await r.detectOverflow(t,{...a,elementContext:`reference`}),n.reference);return{data:{referenceHiddenOffsets:e,referenceHidden:Bl(e)}}}case`escaped`:{let e=zl(await r.detectOverflow(t,{...a,altBoundary:!0}),n.floating);return{data:{escapedOffsets:e,escaped:Bl(e)}}}default:return{}}}}},Hl=new Set([`left`,`top`]);async function Ul(e,t){let{placement:n,platform:r,elements:i}=e,a=await(r.isRTL==null?void 0:r.isRTL(i.floating)),o=_l(n),s=vl(n),c=xl(n)===`y`,l=Hl.has(o)?-1:1,u=a&&c?-1:1,d=gl(t,e),{mainAxis:f,crossAxis:p,alignmentAxis:m}=typeof d==`number`?{mainAxis:d,crossAxis:0,alignmentAxis:null}:{mainAxis:d.mainAxis||0,crossAxis:d.crossAxis||0,alignmentAxis:d.alignmentAxis};return s&&typeof m==`number`&&(p=s===`end`?m*-1:m),c?{x:p*u,y:f*l}:{x:f*l,y:p*u}}var Wl=function(e){return e===void 0&&(e=0),{name:`offset`,options:e,async fn(t){var n;let{x:r,y:i,placement:a,middlewareData:o}=t,s=await Ul(t,e);return a===o.offset?.placement&&(n=o.arrow)!=null&&n.alignmentOffset?{}:{x:r+s.x,y:i+s.y,data:{...s,placement:a}}}}},Gl=function(e){return e===void 0&&(e={}),{name:`shift`,options:e,async fn(t){let{x:n,y:r,placement:i,platform:a}=t,{mainAxis:o=!0,crossAxis:s=!1,limiter:c={fn:e=>{let{x:t,y:n}=e;return{x:t,y:n}}},...l}=gl(e,t),u={x:n,y:r},d=await a.detectOverflow(t,l),f=xl(i),p=yl(f),m=u[p],h=u[f],g=(e,t)=>hl(t+d[e===`y`?`top`:`left`],t,t-d[e===`y`?`bottom`:`right`]);o&&(m=g(p,m)),s&&(h=g(f,h));let _=c.fn({...t,[p]:m,[f]:h});return{..._,data:{x:_.x-n,y:_.y-r,enabled:{[p]:o,[f]:s}}}}}},Kl=function(e){return e===void 0&&(e={}),{options:e,fn(t){let{x:n,y:r,placement:i,rects:a,middlewareData:o}=t,{offset:s=0,mainAxis:c=!0,crossAxis:l=!0}=gl(e,t),u={x:n,y:r},d=xl(i),f=yl(d),p=u[f],m=u[d],h=gl(s,t),g=typeof h==`number`?{mainAxis:h,crossAxis:0}:{mainAxis:h.mainAxis??0,crossAxis:h.crossAxis??0};if(c){let e=f===`y`?`height`:`width`,t=a.reference[f]-a.floating[e]+g.mainAxis,n=a.reference[f]+a.reference[e]-g.mainAxis;p<t?p=t:p>n&&(p=n)}if(l){let e=f===`y`?`width`:`height`,t=Hl.has(_l(i)),n=a.reference[d]-a.floating[e]+(t&&o.offset?.[d]||0)+(t?0:g.crossAxis),r=a.reference[d]+a.reference[e]+(t?0:o.offset?.[d]||0)-(t?g.crossAxis:0);m<n?m=n:m>r&&(m=r)}return{[f]:p,[d]:m}}}},ql=function(e){return e===void 0&&(e={}),{name:`size`,options:e,async fn(t){let{placement:n,rects:r,platform:i,elements:a}=t,{apply:o=()=>{},...s}=gl(e,t),c=await i.detectOverflow(t,s),l=_l(n),u=vl(n),d=xl(n)===`y`,{width:f,height:p}=r.floating,m,h;l===`top`||l===`bottom`?(m=l,h=u===(await(i.isRTL==null?void 0:i.isRTL(a.floating))?`start`:`end`)?`left`:`right`):(h=l,m=u===`end`?`top`:`bottom`);let g=p-c.top-c.bottom,_=f-c.left-c.right,v=ll(p-c[m],g),y=ll(f-c[h],_),b=t.middlewareData.shift,x=!b,S=v,C=y;b!=null&&b.enabled.x&&(C=_),b!=null&&b.enabled.y&&(S=g),x&&!u&&(d?C=f-2*ul(c.left,c.right):S=p-2*ul(c.top,c.bottom)),await o({...t,availableWidth:C,availableHeight:S});let w=await i.getDimensions(a.floating);return f!==w.width||p!==w.height?{reset:{rects:!0}}:{}}}};function Jl(){return typeof window<`u`}function Yl(e){return Ql(e)?(e.nodeName||``).toLowerCase():`#document`}function Xl(e){var t;return(e==null||(t=e.ownerDocument)==null?void 0:t.defaultView)||window}function Zl(e){return((Ql(e)?e.ownerDocument:e.document)||window.document)?.documentElement}function Ql(e){return Jl()?e instanceof Node||e instanceof Xl(e).Node:!1}function $l(e){return Jl()?e instanceof Element||e instanceof Xl(e).Element:!1}function eu(e){return Jl()?e instanceof HTMLElement||e instanceof Xl(e).HTMLElement:!1}function tu(e){return!Jl()||typeof ShadowRoot>`u`?!1:e instanceof ShadowRoot||e instanceof Xl(e).ShadowRoot}function nu(e){let{overflow:t,overflowX:n,overflowY:r,display:i}=pu(e);return/auto|scroll|overlay|hidden|clip/.test(t+r+n)&&i!==`inline`&&i!==`contents`}function ru(e){return/^(table|td|th)$/.test(Yl(e))}function iu(e){try{if(e.matches(`:popover-open`))return!0}catch{}try{return e.matches(`:modal`)}catch{return!1}}var au=/transform|translate|scale|rotate|perspective|filter/,ou=/paint|layout|strict|content/,su=e=>!!e&&e!==`none`,cu;function lu(e){let t=$l(e)?pu(e):e;return su(t.transform)||su(t.translate)||su(t.scale)||su(t.rotate)||su(t.perspective)||!du()&&(su(t.backdropFilter)||su(t.filter))||au.test(t.willChange||``)||ou.test(t.contain||``)}function uu(e){let t=hu(e);for(;eu(t)&&!fu(t);){if(lu(t))return t;if(iu(t))return null;t=hu(t)}return null}function du(){return cu??=typeof CSS<`u`&&CSS.supports&&CSS.supports(`-webkit-backdrop-filter`,`none`),cu}function fu(e){return/^(html|body|#document)$/.test(Yl(e))}function pu(e){return Xl(e).getComputedStyle(e)}function mu(e){return $l(e)?{scrollLeft:e.scrollLeft,scrollTop:e.scrollTop}:{scrollLeft:e.scrollX,scrollTop:e.scrollY}}function hu(e){if(Yl(e)===`html`)return e;let t=e.assignedSlot||e.parentNode||tu(e)&&e.host||Zl(e);return tu(t)?t.host:t}function gu(e){let t=hu(e);return fu(t)?(e.ownerDocument||e).body:eu(t)&&nu(t)?t:gu(t)}function _u(e,t,n){t===void 0&&(t=[]),n===void 0&&(n=!0);let r=gu(e),i=r===e.ownerDocument?.body,a=Xl(r);if(i){let e=vu(a);return t.concat(a,a.visualViewport||[],nu(r)?r:[],e&&n?_u(e):[])}else return t.concat(r,_u(r,[],n))}function vu(e){return e.parent&&Object.getPrototypeOf(e.parent)?e.frameElement:null}function yu(e){let t=pu(e),n=parseFloat(t.width)||0,r=parseFloat(t.height)||0,i=eu(e),a=i?e.offsetWidth:n,o=i?e.offsetHeight:r,s=dl(n)!==a||dl(r)!==o;return s&&(n=a,r=o),{width:n,height:r,$:s}}function bu(e){return $l(e)?e:e.contextElement}function xu(e){let t=bu(e);if(!eu(t))return pl(1);let n=t.getBoundingClientRect(),{width:r,height:i,$:a}=yu(t),o=(a?dl(n.width):n.width)/r,s=(a?dl(n.height):n.height)/i;return(!o||!Number.isFinite(o))&&(o=1),(!s||!Number.isFinite(s))&&(s=1),{x:o,y:s}}var Su=pl(0);function Cu(e){let t=Xl(e);return!du()||!t.visualViewport?Su:{x:t.visualViewport.offsetLeft,y:t.visualViewport.offsetTop}}function wu(e,t,n){return t===void 0&&(t=!1),!!n&&t&&n===Xl(e)}function Tu(e,t,n,r){t===void 0&&(t=!1),n===void 0&&(n=!1);let i=e.getBoundingClientRect(),a=bu(e),o=pl(1);t&&(r?$l(r)&&(o=xu(r)):o=xu(e));let s=wu(a,n,r)?Cu(a):pl(0),c=(i.left+s.x)/o.x,l=(i.top+s.y)/o.y,u=i.width/o.x,d=i.height/o.y;if(a&&r){let e=Xl(a),t=$l(r)?Xl(r):r,n=e,i=vu(n);for(;i&&t!==n;){let e=xu(i),t=i.getBoundingClientRect(),r=pu(i),a=t.left+(i.clientLeft+parseFloat(r.paddingLeft))*e.x,o=t.top+(i.clientTop+parseFloat(r.paddingTop))*e.y;c*=e.x,l*=e.y,u*=e.x,d*=e.y,c+=a,l+=o,n=Xl(i),i=vu(n)}}return X({width:u,height:d,x:c,y:l})}function Eu(e,t){let n=mu(e).scrollLeft;return t?t.left+n:Tu(Zl(e)).left+n}function Du(e,t){let n=e.getBoundingClientRect();return{x:n.left+t.scrollLeft-Eu(e,n),y:n.top+t.scrollTop}}function Ou(e){let{elements:t,rect:n,offsetParent:r,strategy:i}=e,a=i===`fixed`,o=Zl(r),s=t?iu(t.floating):!1;if(r===o||s&&a)return n;let c={scrollLeft:0,scrollTop:0},l=pl(1),u=pl(0),d=eu(r);if((d||!a)&&((Yl(r)!==`body`||nu(o))&&(c=mu(r)),d)){let e=Tu(r);l=xu(r),u.x=e.x+r.clientLeft,u.y=e.y+r.clientTop}let f=o&&!d&&!a?Du(o,c):pl(0);return{width:n.width*l.x,height:n.height*l.y,x:n.x*l.x-c.scrollLeft*l.x+u.x+f.x,y:n.y*l.y-c.scrollTop*l.y+u.y+f.y}}function ku(e){return e.getClientRects?Array.from(e.getClientRects()):[]}function Au(e){let t=mu(e),n=e.ownerDocument.body,r=ul(e.scrollWidth,e.clientWidth,n.scrollWidth,n.clientWidth),i=ul(e.scrollHeight,e.clientHeight,n.scrollHeight,n.clientHeight),a=-t.scrollLeft+Eu(e),o=-t.scrollTop;return pu(n).direction===`rtl`&&(a+=ul(e.clientWidth,n.clientWidth)-r),{width:r,height:i,x:a,y:o}}var ju=25;function Mu(e,t,n){n===void 0&&(n=`viewport`);let r=n===`layoutViewport`,i=Xl(e),a=Zl(e),o=i.visualViewport,s=a.clientWidth,c=a.clientHeight,l=0,u=0;if(o){let e=!du()||t===`fixed`;r?e||(l=-o.offsetLeft,u=-o.offsetTop):(s=o.width,c=o.height,e&&(l=o.offsetLeft,u=o.offsetTop))}if(Eu(a)<=0){let e=a.ownerDocument,t=e.body,n=getComputedStyle(t),r=e.compatMode===`CSS1Compat`&&parseFloat(n.marginLeft)+parseFloat(n.marginRight)||0,i=Math.abs(a.clientWidth-t.clientWidth-r),o=getComputedStyle(a).scrollbarGutter===`stable both-edges`?i/2:i;o<=ju&&(s-=o)}return{width:s,height:c,x:l,y:u}}function Nu(e,t){let n=Tu(e,!0,t===`fixed`),r=n.top+e.clientTop,i=n.left+e.clientLeft,a=xu(e);return{width:e.clientWidth*a.x,height:e.clientHeight*a.y,x:i*a.x,y:r*a.y}}function Pu(e,t,n){let r;if(t===`viewport`||t===`layoutViewport`)r=Mu(e,n,t);else if(t===`document`)r=Au(Zl(e));else if($l(t))r=Nu(t,n);else{let n=Cu(e);r={x:t.x-n.x,y:t.y-n.y,width:t.width,height:t.height}}return X(r)}function Fu(e,t){let n=t.get(e);if(n)return n;let r=_u(e,[],!1).filter(e=>$l(e)&&Yl(e)!==`body`),i=null,a=pu(e).position===`fixed`,o=a?hu(e):e;for(;$l(o)&&!fu(o);){let e=pu(o),t=lu(o),n=i?i.position:a?`fixed`:``;!t&&(n===`fixed`||n===`absolute`&&e.position===`static`)?r=r.filter(e=>e!==o):i=e,o=hu(o)}return t.set(e,r),r}function Iu(e){let{element:t,boundary:n,rootBoundary:r,strategy:i}=e,a=[...n===`clippingAncestors`?iu(t)?[]:Fu(t,this._c):[].concat(n),r],o=Pu(t,a[0],i),s=o.top,c=o.right,l=o.bottom,u=o.left;for(let e=1;e<a.length;e++){let n=Pu(t,a[e],i);s=ul(n.top,s),c=ll(n.right,c),l=ll(n.bottom,l),u=ul(n.left,u)}return{width:c-u,height:l-s,x:u,y:s}}function Lu(e){let{width:t,height:n}=yu(e);return{width:t,height:n}}function Ru(e,t,n){let r=eu(t),i=Zl(t),a=n===`fixed`,o=Tu(e,!0,a,t),s={scrollLeft:0,scrollTop:0},c=pl(0);if((r||!a)&&((Yl(t)!==`body`||nu(i))&&(s=mu(t)),r)){let e=Tu(t,!0,a,t);c.x=e.x+t.clientLeft,c.y=e.y+t.clientTop}!r&&i&&(c.x=Eu(i));let l=i&&!r&&!a?Du(i,s):pl(0);return{x:o.left+s.scrollLeft-c.x-l.x,y:o.top+s.scrollTop-c.y-l.y,width:o.width,height:o.height}}function zu(e){return pu(e).position===`static`}function Bu(e,t){if(!eu(e)||pu(e).position===`fixed`)return null;if(t)return t(e);let n=e.offsetParent;return Zl(e)===n&&(n=n.ownerDocument.body),n}function Vu(e,t){let n=Xl(e);if(iu(e))return n;if(!eu(e)){let t=hu(e);for(;t&&!fu(t);){if($l(t)&&!zu(t))return t;t=hu(t)}return n}let r=Bu(e,t);for(;r&&ru(r)&&zu(r);)r=Bu(r,t);return r&&fu(r)&&zu(r)&&!lu(r)?n:r||uu(e)||n}var Hu=async function(e){let t=this.getOffsetParent||Vu,n=this.getDimensions,r=await n(e.floating);return{reference:Ru(e.reference,await t(e.floating),e.strategy),floating:{x:0,y:0,width:r.width,height:r.height}}};function Uu(e){return pu(e).direction===`rtl`}var Wu={convertOffsetParentRelativeRectToViewportRelativeRect:Ou,getDocumentElement:Zl,getClippingRect:Iu,getOffsetParent:Vu,getElementRects:Hu,getClientRects:ku,getDimensions:Lu,getScale:xu,isElement:$l,isRTL:Uu};function Gu(e,t){return e.x===t.x&&e.y===t.y&&e.width===t.width&&e.height===t.height}function Ku(e,t,n){let r=null,i,a=Zl(e);function o(){var e;clearTimeout(i),(e=r)==null||e.disconnect(),r=null}function s(n,c){n===void 0&&(n=!1),c===void 0&&(c=1),o();let l=e.getBoundingClientRect(),{left:u,top:d,width:f,height:p}=l;if(n||t(),!f||!p)return;let m=fl(d),h=fl(a.clientWidth-(u+f)),g=fl(a.clientHeight-(d+p)),_=fl(u),v={rootMargin:-m+`px `+-h+`px `+-g+`px `+-_+`px`,threshold:ul(0,ll(1,c))||1},y=!0;function b(t){let n=t[0].intersectionRatio;if(!Gu(l,e.getBoundingClientRect()))return s();if(n!==c){if(!y)return s();n?s(!1,n):i=setTimeout(()=>{s(!1,1e-7)},1e3)}y=!1}try{r=new IntersectionObserver(b,{...v,root:a.ownerDocument})}catch{r=new IntersectionObserver(b,v)}r.observe(e)}let c=Xl(e),l=()=>s(n);return c.addEventListener(`resize`,l),s(!0),()=>{c.removeEventListener(`resize`,l),o()}}function qu(e,t,n,r){r===void 0&&(r={});let{ancestorScroll:i=!0,ancestorResize:a=!0,elementResize:o=typeof ResizeObserver==`function`,layoutShift:s=typeof IntersectionObserver==`function`,animationFrame:c=!1}=r,l=bu(e),u=i||a?[...l?_u(l):[],...t?_u(t):[]]:[];u.forEach(e=>{i&&e.addEventListener(`scroll`,n),a&&e.addEventListener(`resize`,n)});let d=l&&s?Ku(l,n,a):null,f=-1,p=null;o&&(p=new ResizeObserver(e=>{let[r]=e;r&&r.target===l&&p&&t&&(p.unobserve(t),cancelAnimationFrame(f),f=requestAnimationFrame(()=>{var e;(e=p)==null||e.observe(t)})),n()}),l&&!c&&p.observe(l),t&&p.observe(t));let m,h=c?Tu(e):null;c&&g();function g(){let t=Tu(e);h&&!Gu(h,t)&&n(),h=t,m=requestAnimationFrame(g)}return n(),()=>{var e;u.forEach(e=>{i&&e.removeEventListener(`scroll`,n),a&&e.removeEventListener(`resize`,n)}),d?.(),(e=p)==null||e.disconnect(),p=null,c&&cancelAnimationFrame(m)}}var Ju=Wl,Yu=Gl,Xu=Rl,Zu=ql,Qu=Vl,$u=Ll,ed=Kl,td=(e,t,n)=>{let r=new Map,i=n??{},a={...Wu,...i.platform,_c:r};return Il(e,t,{...i,platform:a})},nd=typeof document<`u`?F.useLayoutEffect:function(){};function rd(e,t){if(e===t)return!0;if(typeof e!=typeof t)return!1;if(typeof e==`function`&&e.toString()===t.toString())return!0;let n,r,i;if(e&&t&&typeof e==`object`){if(Array.isArray(e)){if(n=e.length,n!==t.length)return!1;for(r=n;r--!==0;)if(!rd(e[r],t[r]))return!1;return!0}if(i=Object.keys(e),n=i.length,n!==Object.keys(t).length)return!1;for(r=n;r--!==0;)if(!{}.hasOwnProperty.call(t,i[r]))return!1;for(r=n;r--!==0;){let n=i[r];if(!(n===`_owner`&&e.$$typeof)&&!rd(e[n],t[n]))return!1}return!0}return e!==e&&t!==t}function id(e){return typeof window>`u`?1:(e.ownerDocument.defaultView||window).devicePixelRatio||1}function ad(e,t){let n=id(e);return Math.round(t*n)/n}function od(e){let t=F.useRef(e);return nd(()=>{t.current=e}),t}function sd(e){e===void 0&&(e={});let{placement:t=`bottom`,strategy:n=`absolute`,middleware:r=[],platform:i,elements:{reference:a,floating:o}={},transform:s=!0,whileElementsMounted:c,open:l}=e,[u,d]=F.useState({x:0,y:0,strategy:n,placement:t,middlewareData:{},isPositioned:!1}),[f,p]=F.useState(r);rd(f,r)||p(r);let[m,h]=F.useState(null),[g,_]=F.useState(null),v=F.useCallback(e=>{e!==S.current&&(S.current=e,h(e))},[]),y=F.useCallback(e=>{e!==C.current&&(C.current=e,_(e))},[]),b=a||m,x=o||g,S=F.useRef(null),C=F.useRef(null),w=F.useRef(u),T=c!=null,E=od(c),D=od(i),O=od(l),k=F.useCallback(()=>{if(!S.current||!C.current)return;let e={placement:t,strategy:n,middleware:f};D.current&&(e.platform=D.current),td(S.current,C.current,e).then(e=>{let t={...e,isPositioned:O.current!==!1};ee.current&&!rd(w.current,t)&&(w.current=t,Ri.flushSync(()=>{d(t)}))})},[f,t,n,D,O]);nd(()=>{l===!1&&w.current.isPositioned&&(w.current.isPositioned=!1,d(e=>({...e,isPositioned:!1})))},[l]);let ee=F.useRef(!1);nd(()=>(ee.current=!0,()=>{ee.current=!1}),[]),nd(()=>{if(b&&(S.current=b),x&&(C.current=x),b&&x){if(E.current)return E.current(b,x,k);k()}},[b,x,k,E,T]);let te=F.useMemo(()=>({reference:S,floating:C,setReference:v,setFloating:y}),[v,y]),A=F.useMemo(()=>({reference:b,floating:x}),[b,x]),ne=F.useMemo(()=>{let e={position:n,left:0,top:0};if(!A.floating)return e;let t=ad(A.floating,u.x),r=ad(A.floating,u.y);return s?{...e,transform:`translate(`+t+`px, `+r+`px)`,...id(A.floating)>=1.5&&{willChange:`transform`}}:{position:n,left:t,top:r}},[n,s,A.floating,u.x,u.y]);return F.useMemo(()=>({...u,update:k,refs:te,elements:A,floatingStyles:ne}),[u,k,te,A,ne])}var cd=e=>{function t(e){return{}.hasOwnProperty.call(e,`current`)}return{name:`arrow`,options:e,fn(n){let{element:r,padding:i}=typeof e==`function`?e(n):e;return r&&t(r)?r.current==null?{}:$u({element:r.current,padding:i}).fn(n):r?$u({element:r,padding:i}).fn(n):{}}}},ld=(e,t)=>{let n=Ju(e);return{name:n.name,fn:n.fn,options:[e,t]}},ud=(e,t)=>{let n=Yu(e);return{name:n.name,fn:n.fn,options:[e,t]}},dd=(e,t)=>({fn:ed(e).fn,options:[e,t]}),fd=(e,t)=>{let n=Xu(e);return{name:n.name,fn:n.fn,options:[e,t]}},pd=(e,t)=>{let n=Zu(e);return{name:n.name,fn:n.fn,options:[e,t]}},md=(e,t)=>{let n=Qu(e);return{name:n.name,fn:n.fn,options:[e,t]}},hd=(e,t)=>{let n=cd(e);return{name:n.name,fn:n.fn,options:[e,t]}},gd=`Arrow`,_d=F.forwardRef((e,t)=>{let{children:n,width:r=10,height:i=5,...a}=e;return(0,I.jsx)(zi.svg,{...a,ref:t,width:r,height:i,viewBox:`0 0 30 10`,preserveAspectRatio:`none`,children:e.asChild?n:(0,I.jsx)(`polygon`,{points:`0,0 30,0 15,10`})})});_d.displayName=gd;var vd=_d;function $(e){let[t,n]=F.useState(void 0);return Ai(()=>{if(e){n({width:e.offsetWidth,height:e.offsetHeight});let t=new ResizeObserver(t=>{if(!Array.isArray(t)||!t.length)return;let r=t[0],i,a;if(`borderBoxSize`in r){let e=r.borderBoxSize,t=Array.isArray(e)?e[0]:e;i=t.inlineSize,a=t.blockSize}else i=e.offsetWidth,a=e.offsetHeight;n({width:i,height:a})});return t.observe(e,{box:`border-box`}),()=>t.unobserve(e)}else n(void 0)},[e]),t}var yd=`Popper`,[bd,xd]=G(yd),[Sd,Cd]=bd(yd),wd=e=>{let{__scopePopper:t,children:n}=e,[r,i]=F.useState(null),[a,o]=F.useState(void 0);return(0,I.jsx)(Sd,{scope:t,anchor:r,onAnchorChange:i,placementState:a,setPlacementState:o,children:n})};wd.displayName=yd;var Td=`PopperAnchor`,Ed=F.forwardRef((e,t)=>{let{__scopePopper:n,virtualRef:r,...i}=e,a=Cd(Td,n),o=F.useRef(null),s=a.onAnchorChange,c=Un(t,F.useCallback(e=>{o.current=e,e&&s(e)},[s])),l=F.useRef(null);F.useEffect(()=>{if(!r)return;let e=l.current;l.current=r.current,e!==l.current&&s(l.current)});let u=a.placementState&&Id(a.placementState),d=u?.[0],f=u?.[1];return r?null:(0,I.jsx)(zi.div,{"data-radix-popper-side":d,"data-radix-popper-align":f,...i,ref:c})});Ed.displayName=Td;var Dd=`PopperContent`,[Od,kd]=bd(Dd),Ad=F.forwardRef((e,t)=>{let{__scopePopper:n,side:r=`bottom`,sideOffset:i=0,align:a=`center`,alignOffset:o=0,arrowPadding:s=0,avoidCollisions:c=!0,collisionBoundary:l=[],collisionPadding:u=0,sticky:d=`partial`,hideWhenDetached:f=!1,updatePositionStrategy:p=`optimized`,onPlaced:m,...h}=e,g=Cd(Dd,n),[_,v]=F.useState(null),y=Un(t,v),[b,x]=F.useState(null),S=$(b),C=S?.width??0,w=S?.height??0,T=r+(a===`center`?``:`-`+a),E=typeof u==`number`?u:{top:0,right:0,bottom:0,left:0,...u},D=Array.isArray(l)?l:[l],O=D.length>0,k={padding:E,boundary:D.filter(Pd),altBoundary:O},{refs:ee,floatingStyles:te,placement:A,isPositioned:ne,middlewareData:re}=sd({strategy:`fixed`,placement:T,whileElementsMounted:(...e)=>qu(...e,{animationFrame:p===`always`}),elements:{reference:g.anchor},middleware:[ld({mainAxis:i+w,alignmentAxis:o}),c&&ud({mainAxis:!0,crossAxis:!1,limiter:d===`partial`?dd():void 0,...k}),c&&fd({...k}),pd({...k,apply:({elements:e,rects:t,availableWidth:n,availableHeight:r})=>{let{width:i,height:a}=t.reference,o=e.floating.style;o.setProperty(`--radix-popper-available-width`,`${n}px`),o.setProperty(`--radix-popper-available-height`,`${r}px`),o.setProperty(`--radix-popper-anchor-width`,`${i}px`),o.setProperty(`--radix-popper-anchor-height`,`${a}px`)}}),b&&hd({element:b,padding:s}),Fd({arrowWidth:C,arrowHeight:w}),f&&md({strategy:`referenceHidden`,...k,boundary:O?k.boundary:void 0})]}),ie=g.setPlacementState;Ai(()=>(ie(A),()=>{ie(void 0)}),[A,ie]);let[j,M]=Id(A),ae=Vi(m);Ai(()=>{ne&&ae?.()},[ne,ae]);let oe=re.arrow?.x,se=re.arrow?.y,ce=re.arrow?.centerOffset!==0,[N,P]=F.useState();return Ai(()=>{_&&P(window.getComputedStyle(_).zIndex)},[_]),(0,I.jsx)(`div`,{ref:ee.setFloating,"data-radix-popper-content-wrapper":``,style:{...te,transform:ne?te.transform:`translate(0, -200%)`,minWidth:`max-content`,zIndex:N,"--radix-popper-transform-origin":[re.transformOrigin?.x,re.transformOrigin?.y].join(` `),...re.hide?.referenceHidden&&{visibility:`hidden`,pointerEvents:`none`}},dir:e.dir,children:(0,I.jsx)(Od,{scope:n,placedSide:j,placedAlign:M,onArrowChange:x,arrowX:oe,arrowY:se,shouldHideArrow:ce,children:(0,I.jsx)(zi.div,{"data-side":j,"data-align":M,...h,ref:y,style:{...h.style,animation:ne?void 0:`none`}})})})});Ad.displayName=Dd;var jd=`PopperArrow`,Md={top:`bottom`,right:`left`,bottom:`top`,left:`right`},Nd=F.forwardRef(function(e,t){let{__scopePopper:n,...r}=e,i=kd(jd,n),a=Md[i.placedSide];return(0,I.jsx)(`span`,{ref:i.onArrowChange,style:{position:`absolute`,left:i.arrowX,top:i.arrowY,[a]:0,transformOrigin:{top:``,right:`0 0`,bottom:`center 0`,left:`100% 0`}[i.placedSide],transform:{top:`translateY(100%)`,right:`translateY(50%) rotate(90deg) translateX(-50%)`,bottom:`rotate(180deg)`,left:`translateY(50%) rotate(-90deg) translateX(50%)`}[i.placedSide],visibility:i.shouldHideArrow?`hidden`:void 0},children:(0,I.jsx)(vd,{...r,ref:t,style:{...r.style,display:`block`}})})});Nd.displayName=jd;function Pd(e){return e!==null}var Fd=e=>({name:`transformOrigin`,options:e,fn(t){let{placement:n,rects:r,middlewareData:i}=t,a=i.arrow?.centerOffset!==0,o=a?0:e.arrowWidth,s=a?0:e.arrowHeight,[c,l]=Id(n),u={start:`0%`,center:`50%`,end:`100%`}[l],d=(i.arrow?.x??0)+o/2,f=(i.arrow?.y??0)+s/2,p=``,m=``;return c===`bottom`?(p=a?u:`${d}px`,m=`${-s}px`):c===`top`?(p=a?u:`${d}px`,m=`${r.floating.height+s}px`):c===`right`?(p=`${-s}px`,m=a?u:`${f}px`):c===`left`&&(p=`${r.floating.width+s}px`,m=a?u:`${f}px`),{data:{x:p,y:m}}}});function Id(e){let[t,n=`center`]=e.split(`-`);return[t,n]}var Ld=wd,Rd=Ed,zd=Ad,Bd=Nd,Vd=!1;function Hd(){let[e,t]=F.useState(Vd);return F.useEffect(()=>{Vd||(Vd=!0,t(!0))},[]),e}var Ud=F.useSyncExternalStore;function Wd(){return()=>{}}function Gd(){return Ud(Wd,()=>!0,()=>!1)}var Kd=typeof Ud==`function`?Gd:Hd,qd=`rovingFocusGroup.onEntryFocus`,Jd={bubbles:!1,cancelable:!0},Yd=`RovingFocusGroup`,[Xd,Zd,Qd]=al(Yd),[$d,ef]=G(Yd,[Qd]),[tf,nf]=$d(Yd),rf=F.forwardRef((e,t)=>(0,I.jsx)(Xd.Provider,{scope:e.__scopeRovingFocusGroup,children:(0,I.jsx)(Xd.Slot,{scope:e.__scopeRovingFocusGroup,children:(0,I.jsx)(af,{...e,ref:t})})}));rf.displayName=Yd;var af=F.forwardRef((e,t)=>{let{__scopeRovingFocusGroup:n,orientation:r,loop:i=!1,dir:a,currentTabStopId:o,defaultCurrentTabStopId:s,onCurrentTabStopIdChange:c,onEntryFocus:l,preventScrollOnEntryFocus:u=!1,...d}=e,f=F.useRef(null),p=Un(t,f),m=sl(a),[h,g]=Fi({prop:o,defaultProp:s??null,onChange:c,caller:Yd}),[_,v]=F.useState(!1),y=Vi(l),b=Zd(n),x=F.useRef(!1),[S,C]=F.useState(0);return F.useEffect(()=>{let e=f.current;if(e)return e.addEventListener(qd,y),()=>e.removeEventListener(qd,y)},[y]),(0,I.jsx)(tf,{scope:n,orientation:r,dir:m,loop:i,currentTabStopId:h,onItemFocus:F.useCallback(e=>g(e),[g]),onItemShiftTab:F.useCallback(()=>v(!0),[]),onFocusableItemAdd:F.useCallback(()=>C(e=>e+1),[]),onFocusableItemRemove:F.useCallback(()=>C(e=>e-1),[]),children:(0,I.jsx)(zi.div,{tabIndex:_||S===0?-1:0,"data-orientation":r,...d,ref:p,style:{outline:`none`,...e.style},onMouseDown:W(e.onMouseDown,()=>{x.current=!0}),onFocus:W(e.onFocus,e=>{let t=!x.current;if(e.target===e.currentTarget&&t&&!_){let t=new CustomEvent(qd,Jd);if(e.currentTarget.dispatchEvent(t),!t.defaultPrevented){let e=b().filter(e=>e.focusable);df([e.find(e=>e.active),e.find(e=>e.id===h),...e].filter(Boolean).map(e=>e.ref.current),u)}}x.current=!1}),onBlur:W(e.onBlur,()=>v(!1))})})}),of=`RovingFocusGroupItem`,sf=F.forwardRef((e,t)=>{let{__scopeRovingFocusGroup:n,focusable:r=!0,active:i=!1,tabStopId:a,children:o,...s}=e,c=Ni(),l=a||c,u=nf(of,n),d=u.currentTabStopId===l,f=Zd(n),{onFocusableItemAdd:p,onFocusableItemRemove:m,currentTabStopId:h}=u,g=Kd();return Ai(()=>{if(!(!g||!r))return p(),()=>m()},[g,r,p,m]),F.useEffect(()=>{if(!(g||!r))return p(),()=>m()},[g,r,p,m]),(0,I.jsx)(Xd.ItemSlot,{scope:n,id:l,focusable:r,active:i,children:(0,I.jsx)(zi.span,{tabIndex:d?0:-1,"data-orientation":u.orientation,...s,ref:t,onMouseDown:W(e.onMouseDown,e=>{r?u.onItemFocus(l):e.preventDefault()}),onFocus:W(e.onFocus,()=>u.onItemFocus(l)),onKeyDown:W(e.onKeyDown,e=>{if(e.key===`Tab`&&e.shiftKey){u.onItemShiftTab();return}if(e.target!==e.currentTarget)return;let t=uf(e,u.orientation,u.dir);if(t!==void 0){if(e.metaKey||e.ctrlKey||e.altKey||e.shiftKey)return;e.preventDefault();let n=f().filter(e=>e.focusable).map(e=>e.ref.current);if(t===`last`)n.reverse();else if(t===`prev`||t===`next`){t===`prev`&&n.reverse();let r=n.indexOf(e.currentTarget);n=u.loop?ff(n,r+1):n.slice(r+1)}setTimeout(()=>df(n))}}),children:typeof o==`function`?o({isCurrentTabStop:d,hasTabStop:h!=null}):o})})});sf.displayName=of;var cf={ArrowLeft:`prev`,ArrowUp:`prev`,ArrowRight:`next`,ArrowDown:`next`,PageUp:`first`,Home:`first`,PageDown:`last`,End:`last`};function lf(e,t){return t===`rtl`?e===`ArrowLeft`?`ArrowRight`:e===`ArrowRight`?`ArrowLeft`:e:e}function uf(e,t,n){let r=lf(e.key,n);if(!(t===`vertical`&&[`ArrowLeft`,`ArrowRight`].includes(r))&&!(t===`horizontal`&&[`ArrowUp`,`ArrowDown`].includes(r)))return cf[r]}function df(e,t=!1){let n=document.activeElement;for(let r of e)if(r===n||(r.focus({preventScroll:t}),document.activeElement!==n))return}function ff(e,t){return e.map((n,r)=>e[(t+r)%e.length])}var pf=rf,mf=sf,hf=[`Enter`,` `],gf=[`ArrowDown`,`PageUp`,`Home`],_f=[`ArrowUp`,`PageDown`,`End`],vf=[...gf,..._f],yf={ltr:[...hf,`ArrowRight`],rtl:[...hf,`ArrowLeft`]},bf={ltr:[`ArrowLeft`],rtl:[`ArrowRight`]},xf=`Menu`,[Sf,Cf,wf]=al(xf),[Tf,Ef]=G(xf,[wf,xd,ef]),Df=xd(),Of=ef(),[kf,Af]=Tf(xf),[jf,Mf]=Tf(xf),Nf=e=>{let{__scopeMenu:t,open:n=!1,children:r,dir:i,onOpenChange:a,modal:o=!0}=e,s=Df(t),[c,l]=F.useState(null),u=F.useRef(!1),d=Vi(a),f=sl(i);return F.useEffect(()=>{let e=()=>{u.current=!0,document.addEventListener(`pointerdown`,t,{capture:!0,once:!0}),document.addEventListener(`pointermove`,t,{capture:!0,once:!0})},t=()=>u.current=!1;return document.addEventListener(`keydown`,e,{capture:!0}),()=>{document.removeEventListener(`keydown`,e,{capture:!0}),document.removeEventListener(`pointerdown`,t,{capture:!0}),document.removeEventListener(`pointermove`,t,{capture:!0})}},[]),F.useEffect(()=>{if(!n)return;let e=()=>d(!1);return window.addEventListener(`blur`,e),()=>window.removeEventListener(`blur`,e)},[n,d]),(0,I.jsx)(Ld,{...s,children:(0,I.jsx)(kf,{scope:t,open:n,onOpenChange:d,content:c,onContentChange:l,children:(0,I.jsx)(jf,{scope:t,onClose:F.useCallback(()=>d(!1),[d]),isUsingKeyboardRef:u,dir:f,modal:o,children:r})})})};Nf.displayName=xf;var Pf=`MenuAnchor`,Ff=F.forwardRef((e,t)=>{let{__scopeMenu:n,...r}=e,i=Df(n);return(0,I.jsx)(Rd,{...i,...r,ref:t})});Ff.displayName=Pf;var If=`MenuPortal`,[Lf,Rf]=Tf(If,{forceMount:void 0}),zf=e=>{let{__scopeMenu:t,forceMount:n,children:r,container:i}=e,a=Af(If,t);return(0,I.jsx)(Lf,{scope:t,forceMount:n,children:(0,I.jsx)(Sa,{present:n||a.open,children:(0,I.jsx)(ba,{asChild:!0,container:i,children:r})})})};zf.displayName=If;var Bf=`MenuContent`,[Vf,Hf]=Tf(Bf),Uf=F.forwardRef((e,t)=>{let n=Rf(Bf,e.__scopeMenu),{forceMount:r=n.forceMount,...i}=e,a=Af(Bf,e.__scopeMenu),o=Mf(Bf,e.__scopeMenu);return(0,I.jsx)(Sf.Provider,{scope:e.__scopeMenu,children:(0,I.jsx)(Sa,{present:r||a.open,children:(0,I.jsx)(Sf.Slot,{scope:e.__scopeMenu,children:o.modal?(0,I.jsx)(Wf,{...i,ref:t}):(0,I.jsx)(Gf,{...i,ref:t})})})})}),Wf=F.forwardRef((e,t)=>{let n=Af(Bf,e.__scopeMenu),r=F.useRef(null),i=Un(t,r);return F.useEffect(()=>{let e=r.current;if(e)return Yo(e)},[]),(0,I.jsx)(qf,{...e,ref:i,trapFocus:n.open,disableOutsidePointerEvents:n.open,disableOutsideScroll:!0,onFocusOutside:W(e.onFocusOutside,e=>e.preventDefault(),{checkForDefaultPrevented:!1}),onDismiss:()=>n.onOpenChange(!1)})}),Gf=F.forwardRef((e,t)=>{let n=Af(Bf,e.__scopeMenu);return(0,I.jsx)(qf,{...e,ref:t,trapFocus:!1,disableOutsidePointerEvents:!1,disableOutsideScroll:!1,onDismiss:()=>n.onOpenChange(!1)})}),Kf=Wn(`MenuContent.ScrollLock`),qf=F.forwardRef((e,t)=>{let{__scopeMenu:n,loop:r=!1,trapFocus:i,onOpenAutoFocus:a,onCloseAutoFocus:o,disableOutsidePointerEvents:s,onEntryFocus:c,onEscapeKeyDown:l,onPointerDownOutside:u,onFocusOutside:d,onInteractOutside:f,onDismiss:p,disableOutsideScroll:m,...h}=e,g=Af(Bf,n),_=Mf(Bf,n),v=Df(n),y=Of(n),b=Cf(n),[x,S]=F.useState(null),C=F.useRef(null),w=Un(t,C,g.onContentChange),T=F.useRef(0),E=F.useRef(``),D=F.useRef(0),O=F.useRef(null),k=F.useRef(`right`),ee=F.useRef(0),te=m?Bo:F.Fragment,A=m?{as:Kf,allowPinchZoom:!0}:void 0,ne=e=>{let t=E.current+e,n=b().filter(e=>!e.disabled),r=document.activeElement,i=n.find(e=>e.ref.current===r)?.textValue,a=jp(n.map(e=>e.textValue),t,i),o=n.find(e=>e.textValue===a)?.ref.current;(function e(t){E.current=t,window.clearTimeout(T.current),t!==``&&(T.current=window.setTimeout(()=>e(``),1e3))})(t),o&&setTimeout(()=>o.focus())};F.useEffect(()=>()=>window.clearTimeout(T.current),[]),Aa();let re=F.useCallback(e=>k.current===O.current?.side&&Np(e,O.current?.area),[]);return(0,I.jsx)(Vf,{scope:n,searchRef:E,onItemEnter:F.useCallback(e=>{re(e)&&e.preventDefault()},[re]),onItemLeave:F.useCallback(e=>{re(e)||(C.current?.focus(),S(null))},[re]),onTriggerLeave:F.useCallback(e=>{re(e)&&e.preventDefault()},[re]),pointerGraceTimerRef:D,onPointerGraceIntentChange:F.useCallback(e=>{O.current=e},[]),children:(0,I.jsx)(te,{...A,children:(0,I.jsx)(sa,{asChild:!0,trapped:i,onMountAutoFocus:W(a,e=>{e.preventDefault(),C.current?.focus({preventScroll:!0})}),onUnmountAutoFocus:o,children:(0,I.jsx)(Ji,{asChild:!0,disableOutsidePointerEvents:s,onEscapeKeyDown:l,onPointerDownOutside:u,onFocusOutside:d,onInteractOutside:f,onDismiss:p,children:(0,I.jsx)(pf,{asChild:!0,...y,dir:_.dir,orientation:`vertical`,loop:r,currentTabStopId:x,onCurrentTabStopIdChange:S,onEntryFocus:W(c,e=>{_.isUsingKeyboardRef.current||e.preventDefault()}),preventScrollOnEntryFocus:!0,children:(0,I.jsx)(zd,{role:`menu`,"aria-orientation":`vertical`,"data-state":Ep(g.open),"data-radix-menu-content":``,dir:_.dir,...v,...h,ref:w,style:{outline:`none`,...h.style},onKeyDown:W(h.onKeyDown,e=>{let t=e.target.closest(`[data-radix-menu-content]`)===e.currentTarget,n=e.ctrlKey||e.altKey||e.metaKey,r=e.key.length===1;t&&(e.key===`Tab`&&e.preventDefault(),!n&&r&&ne(e.key));let i=C.current;if(e.target!==i||!vf.includes(e.key))return;e.preventDefault();let a=b().filter(e=>!e.disabled).map(e=>e.ref.current);_f.includes(e.key)&&a.reverse(),kp(a)}),onBlur:W(e.onBlur,e=>{e.currentTarget.contains(e.target)||(window.clearTimeout(T.current),E.current=``)}),onPointerMove:W(e.onPointerMove,Pp(e=>{let t=e.target,n=ee.current!==e.clientX;if(e.currentTarget.contains(t)&&n){let t=e.clientX>ee.current?`right`:`left`;k.current=t,ee.current=e.clientX}}))})})})})})})});Uf.displayName=Bf;var Jf=`MenuGroup`,Yf=F.forwardRef((e,t)=>{let{__scopeMenu:n,...r}=e;return(0,I.jsx)(zi.div,{role:`group`,...r,ref:t})});Yf.displayName=Jf;var Xf=`MenuLabel`,Zf=F.forwardRef((e,t)=>{let{__scopeMenu:n,...r}=e;return(0,I.jsx)(zi.div,{...r,ref:t})});Zf.displayName=Xf;var Qf=`MenuItem`,$f=`menu.itemSelect`,ep=F.forwardRef((e,t)=>{let{disabled:n=!1,onSelect:r,...i}=e,a=F.useRef(null),o=Mf(Qf,e.__scopeMenu),s=Hf(Qf,e.__scopeMenu),c=Un(t,a),l=F.useRef(!1),u=()=>{let e=a.current;if(!n&&e){let t=new CustomEvent($f,{bubbles:!0,cancelable:!0});e.addEventListener($f,e=>r?.(e),{once:!0}),Bi(e,t),t.defaultPrevented?l.current=!1:o.onClose()}};return(0,I.jsx)(tp,{...i,ref:c,disabled:n,onClick:W(e.onClick,u),onPointerDown:t=>{e.onPointerDown?.(t),l.current=!0},onPointerUp:W(e.onPointerUp,e=>{l.current||e.currentTarget?.click()}),onKeyDown:W(e.onKeyDown,e=>{n||e.target!==e.currentTarget||s.searchRef.current!==``&&e.key===` `||hf.includes(e.key)&&(e.currentTarget.click(),e.preventDefault())})})});ep.displayName=Qf;var tp=F.forwardRef((e,t)=>{let{__scopeMenu:n,disabled:r=!1,textValue:i,...a}=e,o=Hf(Qf,n),s=Of(n),c=F.useRef(null),l=Un(t,c),[u,d]=F.useState(!1),[f,p]=F.useState(``);return F.useEffect(()=>{let e=c.current;e&&p((e.textContent??``).trim())},[a.children]),(0,I.jsx)(Sf.ItemSlot,{scope:n,disabled:r,textValue:i??f,children:(0,I.jsx)(mf,{asChild:!0,...s,focusable:!r,children:(0,I.jsx)(zi.div,{role:`menuitem`,"data-highlighted":u?``:void 0,"aria-disabled":r||void 0,"data-disabled":r?``:void 0,...a,ref:l,onPointerMove:W(e.onPointerMove,Pp(e=>{r?o.onItemLeave(e):(o.onItemEnter(e),e.defaultPrevented||e.currentTarget.focus({preventScroll:!0}))})),onPointerLeave:W(e.onPointerLeave,Pp(e=>o.onItemLeave(e))),onFocus:W(e.onFocus,()=>d(!0)),onBlur:W(e.onBlur,()=>d(!1))})})})}),np=`MenuCheckboxItem`,rp=F.forwardRef((e,t)=>{let{checked:n=!1,onCheckedChange:r,...i}=e;return(0,I.jsx)(dp,{scope:e.__scopeMenu,checked:n,children:(0,I.jsx)(ep,{role:`menuitemcheckbox`,"aria-checked":Dp(n)?`mixed`:n,...i,ref:t,"data-state":Op(n),onSelect:W(i.onSelect,()=>r?.(Dp(n)?!0:!n),{checkForDefaultPrevented:!1})})})});rp.displayName=np;var ip=`MenuRadioGroup`,[ap,op]=Tf(ip,{value:void 0,onValueChange:()=>{}}),sp=F.forwardRef((e,t)=>{let{value:n,onValueChange:r,...i}=e,a=Vi(r);return(0,I.jsx)(ap,{scope:e.__scopeMenu,value:n,onValueChange:a,children:(0,I.jsx)(Yf,{...i,ref:t})})});sp.displayName=ip;var cp=`MenuRadioItem`,lp=F.forwardRef((e,t)=>{let{value:n,...r}=e,i=op(cp,e.__scopeMenu),a=n===i.value;return(0,I.jsx)(dp,{scope:e.__scopeMenu,checked:a,children:(0,I.jsx)(ep,{role:`menuitemradio`,"aria-checked":a,...r,ref:t,"data-state":Op(a),onSelect:W(r.onSelect,()=>i.onValueChange?.(n),{checkForDefaultPrevented:!1})})})});lp.displayName=cp;var up=`MenuItemIndicator`,[dp,fp]=Tf(up,{checked:!1}),pp=F.forwardRef((e,t)=>{let{__scopeMenu:n,forceMount:r,...i}=e,a=fp(up,n);return(0,I.jsx)(Sa,{present:r||Dp(a.checked)||a.checked===!0,children:(0,I.jsx)(zi.span,{...i,ref:t,"data-state":Op(a.checked)})})});pp.displayName=up;var mp=`MenuSeparator`,hp=F.forwardRef((e,t)=>{let{__scopeMenu:n,...r}=e;return(0,I.jsx)(zi.div,{role:`separator`,"aria-orientation":`horizontal`,...r,ref:t})});hp.displayName=mp;var gp=`MenuArrow`,_p=F.forwardRef((e,t)=>{let{__scopeMenu:n,...r}=e,i=Df(n);return(0,I.jsx)(Bd,{...i,...r,ref:t})});_p.displayName=gp;var vp=`MenuSub`,[yp,bp]=Tf(vp),xp=e=>{let{__scopeMenu:t,children:n,open:r=!1,onOpenChange:i}=e,a=Af(vp,t),o=Df(t),[s,c]=F.useState(null),[l,u]=F.useState(null),d=Vi(i);return F.useEffect(()=>(a.open===!1&&d(!1),()=>d(!1)),[a.open,d]),(0,I.jsx)(Ld,{...o,children:(0,I.jsx)(kf,{scope:t,open:r,onOpenChange:d,content:l,onContentChange:u,children:(0,I.jsx)(yp,{scope:t,contentId:Ni(),triggerId:Ni(),trigger:s,onTriggerChange:c,children:n})})})};xp.displayName=vp;var Sp=`MenuSubTrigger`,Cp=F.forwardRef((e,t)=>{let n=Af(Sp,e.__scopeMenu),r=Mf(Sp,e.__scopeMenu),i=bp(Sp,e.__scopeMenu),a=Hf(Sp,e.__scopeMenu),o=F.useRef(null),{pointerGraceTimerRef:s,onPointerGraceIntentChange:c}=a,l={__scopeMenu:e.__scopeMenu},u=F.useCallback(()=>{o.current&&window.clearTimeout(o.current),o.current=null},[]);F.useEffect(()=>u,[u]),F.useEffect(()=>{let e=s.current;return()=>{window.clearTimeout(e),c(null)}},[s,c]);let d=Un(t,i.onTriggerChange);return(0,I.jsx)(Ff,{asChild:!0,...l,children:(0,I.jsx)(tp,{id:i.triggerId,"aria-haspopup":`menu`,"aria-expanded":n.open,"aria-controls":n.open?i.contentId:void 0,"data-state":Ep(n.open),...e,ref:d,onClick:t=>{e.onClick?.(t),!(e.disabled||t.defaultPrevented)&&(t.currentTarget.focus(),n.open||n.onOpenChange(!0))},onPointerMove:W(e.onPointerMove,Pp(t=>{a.onItemEnter(t),!t.defaultPrevented&&!e.disabled&&!n.open&&!o.current&&(a.onPointerGraceIntentChange(null),o.current=window.setTimeout(()=>{n.onOpenChange(!0),u()},100))})),onPointerLeave:W(e.onPointerLeave,Pp(e=>{u();let t=n.content?.getBoundingClientRect();if(t){let r=n.content?.dataset.side,i=r===`right`,o=i?-5:5,c=t[i?`left`:`right`],l=t[i?`right`:`left`];a.onPointerGraceIntentChange({area:[{x:e.clientX+o,y:e.clientY},{x:c,y:t.top},{x:l,y:t.top},{x:l,y:t.bottom},{x:c,y:t.bottom}],side:r}),window.clearTimeout(s.current),s.current=window.setTimeout(()=>a.onPointerGraceIntentChange(null),300)}else{if(a.onTriggerLeave(e),e.defaultPrevented)return;a.onPointerGraceIntentChange(null)}})),onKeyDown:W(e.onKeyDown,t=>{e.disabled||t.target!==t.currentTarget||a.searchRef.current!==``&&t.key===` `||yf[r.dir].includes(t.key)&&(n.onOpenChange(!0),n.content?.focus(),t.preventDefault())})})})});Cp.displayName=Sp;var wp=`MenuSubContent`,Tp=F.forwardRef((e,t)=>{let n=Rf(Bf,e.__scopeMenu),{forceMount:r=n.forceMount,align:i=`start`,...a}=e,o=Af(Bf,e.__scopeMenu),s=Mf(Bf,e.__scopeMenu),c=bp(wp,e.__scopeMenu),l=F.useRef(null),u=Un(t,l);return(0,I.jsx)(Sf.Provider,{scope:e.__scopeMenu,children:(0,I.jsx)(Sa,{present:r||o.open,children:(0,I.jsx)(Sf.Slot,{scope:e.__scopeMenu,children:(0,I.jsx)(qf,{id:c.contentId,"aria-labelledby":c.triggerId,...a,ref:u,align:i,side:s.dir===`rtl`?`left`:`right`,disableOutsidePointerEvents:!1,disableOutsideScroll:!1,trapFocus:!1,onOpenAutoFocus:e=>{s.isUsingKeyboardRef.current&&l.current?.focus(),e.preventDefault()},onCloseAutoFocus:e=>e.preventDefault(),onFocusOutside:W(e.onFocusOutside,e=>{e.target!==c.trigger&&o.onOpenChange(!1)}),onEscapeKeyDown:W(e.onEscapeKeyDown,e=>{s.onClose(),e.preventDefault()}),onKeyDown:W(e.onKeyDown,e=>{let t=e.currentTarget.contains(e.target),n=bf[s.dir].includes(e.key);t&&n&&(o.onOpenChange(!1),c.trigger?.focus(),e.preventDefault())})})})})})});Tp.displayName=wp;function Ep(e){return e?`open`:`closed`}function Dp(e){return e===`indeterminate`}function Op(e){return Dp(e)?`indeterminate`:e?`checked`:`unchecked`}function kp(e){let t=document.activeElement;for(let n of e)if(n===t||(n.focus(),document.activeElement!==t))return}function Ap(e,t){return e.map((n,r)=>e[(t+r)%e.length])}function jp(e,t,n){let r=t.length>1&&Array.from(t).every(e=>e===t[0])?t[0]:t,i=n?e.indexOf(n):-1,a=Ap(e,Math.max(i,0));r.length===1&&(a=a.filter(e=>e!==n));let o=a.find(e=>e.toLowerCase().startsWith(r.toLowerCase()));return o===n?void 0:o}function Mp(e,t){let{x:n,y:r}=e,i=!1;for(let e=0,a=t.length-1;e<t.length;a=e++){let o=t[e],s=t[a],c=o.x,l=o.y,u=s.x,d=s.y;l>r!=d>r&&n<(u-c)*(r-l)/(d-l)+c&&(i=!i)}return i}function Np(e,t){return t?Mp({x:e.clientX,y:e.clientY},t):!1}function Pp(e){return t=>t.pointerType===`mouse`?e(t):void 0}var Fp=Nf,Ip=Ff,Lp=zf,Rp=Uf,zp=Yf,Bp=Zf,Vp=ep,Hp=rp,Up=sp,Wp=lp,Gp=pp,Kp=hp,qp=_p,Jp=Cp,Yp=Tp,Xp=`DropdownMenu`,[Zp,Qp]=G(Xp,[Ef]),$p=Ef(),[em,tm]=Zp(Xp),nm=e=>{let{__scopeDropdownMenu:t,children:n,dir:r,open:i,defaultOpen:a,onOpenChange:o,modal:s=!0}=e,c=$p(t),l=F.useRef(null),[u,d]=Fi({prop:i,defaultProp:a??!1,onChange:o,caller:Xp});return(0,I.jsx)(em,{scope:t,triggerId:Ni(),triggerRef:l,contentId:Ni(),open:u,onOpenChange:d,onOpenToggle:F.useCallback(()=>d(e=>!e),[d]),modal:s,children:(0,I.jsx)(Fp,{...c,open:u,onOpenChange:d,dir:r,modal:s,children:n})})};nm.displayName=Xp;var rm=`DropdownMenuTrigger`,im=F.forwardRef((e,t)=>{let{__scopeDropdownMenu:n,disabled:r=!1,...i}=e,a=tm(rm,n),o=$p(n),s=Un(t,a.triggerRef);return(0,I.jsx)(Ip,{asChild:!0,...o,children:(0,I.jsx)(zi.button,{type:`button`,id:a.triggerId,"aria-haspopup":`menu`,"aria-expanded":a.open,"aria-controls":a.open?a.contentId:void 0,"data-state":a.open?`open`:`closed`,"data-disabled":r?``:void 0,disabled:r,...i,ref:s,onPointerDown:W(e.onPointerDown,e=>{!r&&e.button===0&&e.ctrlKey===!1&&(a.onOpenToggle(),a.open||e.preventDefault())}),onKeyDown:W(e.onKeyDown,e=>{r||([`Enter`,` `].includes(e.key)&&a.onOpenToggle(),e.key===`ArrowDown`&&a.onOpenChange(!0),[`Enter`,` `,`ArrowDown`].includes(e.key)&&e.preventDefault())})})})});im.displayName=rm;var am=`DropdownMenuPortal`,om=e=>{let{__scopeDropdownMenu:t,...n}=e,r=$p(t);return(0,I.jsx)(Lp,{...r,...n})};om.displayName=am;var sm=`DropdownMenuContent`,cm=F.forwardRef((e,t)=>{let{__scopeDropdownMenu:n,...r}=e,i=tm(sm,n),a=$p(n),o=F.useRef(!1);return(0,I.jsx)(Rp,{id:i.contentId,"aria-labelledby":i.triggerId,...a,...r,ref:t,onCloseAutoFocus:W(e.onCloseAutoFocus,e=>{o.current||i.triggerRef.current?.focus(),o.current=!1,e.preventDefault()}),onInteractOutside:W(e.onInteractOutside,e=>{let t=e.detail.originalEvent,n=t.button===0&&t.ctrlKey===!0,r=t.button===2||n;(!i.modal||r)&&(o.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)`}})});cm.displayName=sm;var lm=`DropdownMenuGroup`,um=F.forwardRef((e,t)=>{let{__scopeDropdownMenu:n,...r}=e,i=$p(n);return(0,I.jsx)(zp,{...i,...r,ref:t})});um.displayName=lm;var dm=`DropdownMenuLabel`,fm=F.forwardRef((e,t)=>{let{__scopeDropdownMenu:n,...r}=e,i=$p(n);return(0,I.jsx)(Bp,{...i,...r,ref:t})});fm.displayName=dm;var pm=`DropdownMenuItem`,mm=F.forwardRef((e,t)=>{let{__scopeDropdownMenu:n,...r}=e,i=$p(n);return(0,I.jsx)(Vp,{...i,...r,ref:t})});mm.displayName=pm;var hm=`DropdownMenuCheckboxItem`,gm=F.forwardRef((e,t)=>{let{__scopeDropdownMenu:n,...r}=e,i=$p(n);return(0,I.jsx)(Hp,{...i,...r,ref:t})});gm.displayName=hm;var _m=`DropdownMenuRadioGroup`,vm=F.forwardRef((e,t)=>{let{__scopeDropdownMenu:n,...r}=e,i=$p(n);return(0,I.jsx)(Up,{...i,...r,ref:t})});vm.displayName=_m;var ym=`DropdownMenuRadioItem`,bm=F.forwardRef((e,t)=>{let{__scopeDropdownMenu:n,...r}=e,i=$p(n);return(0,I.jsx)(Wp,{...i,...r,ref:t})});bm.displayName=ym;var xm=`DropdownMenuItemIndicator`,Sm=F.forwardRef((e,t)=>{let{__scopeDropdownMenu:n,...r}=e,i=$p(n);return(0,I.jsx)(Gp,{...i,...r,ref:t})});Sm.displayName=xm;var Cm=`DropdownMenuSeparator`,wm=F.forwardRef((e,t)=>{let{__scopeDropdownMenu:n,...r}=e,i=$p(n);return(0,I.jsx)(Kp,{...i,...r,ref:t})});wm.displayName=Cm;var Tm=`DropdownMenuArrow`,Em=F.forwardRef((e,t)=>{let{__scopeDropdownMenu:n,...r}=e,i=$p(n);return(0,I.jsx)(qp,{...i,...r,ref:t})});Em.displayName=Tm;var Dm=`DropdownMenuSubTrigger`,Om=F.forwardRef((e,t)=>{let{__scopeDropdownMenu:n,...r}=e,i=$p(n);return(0,I.jsx)(Jp,{...i,...r,ref:t})});Om.displayName=Dm;var km=`DropdownMenuSubContent`,Am=F.forwardRef((e,t)=>{let{__scopeDropdownMenu:n,...r}=e,i=$p(n);return(0,I.jsx)(Yp,{...i,...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)`}})});Am.displayName=km;var jm=nm,Mm=im,Nm=om,Pm=cm,Fm=fm,Im=mm,Lm=wm,Rm=jm,zm=Mm,Bm=F.forwardRef(({className:e,sideOffset:t=4,...n},r)=>(0,I.jsx)(Nm,{children:(0,I.jsx)(Pm,{ref:r,sideOffset:t,className:H(`z-50 min-w-[8rem] overflow-hidden rounded-lg border border-[var(--glass-border)] bg-card backdrop-blur-md p-1 text-foreground shadow-[var(--glass-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]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2`,e),...n})}));Bm.displayName=Pm.displayName;var Vm=F.forwardRef(({className:e,inset:t,...n},r)=>(0,I.jsx)(Im,{ref:r,className:H(`relative flex cursor-default select-none items-center gap-2 rounded-sm px-2 py-1.5 text-sm outline-none transition-colors focus:bg-accent focus:text-accent-foreground data-[disabled]:pointer-events-none data-[disabled]:opacity-50`,t&&`ps-8`,e),...n}));Vm.displayName=Im.displayName;var Hm=F.forwardRef(({className:e,inset:t,...n},r)=>(0,I.jsx)(Fm,{ref:r,className:H(`px-2 py-1.5 text-sm font-semibold text-primary`,t&&`ps-8`,e),...n}));Hm.displayName=Fm.displayName;var Um=F.forwardRef(({className:e,...t},n)=>(0,I.jsx)(Lm,{ref:n,className:H(`-mx-1 my-1 h-px bg-[var(--glass-border)]`,e),...t}));Um.displayName=Lm.displayName;function Wm(e){return Array.isArray(e.items)}function Gm({group:e,pathname:t,search:n}){return(0,I.jsxs)(Xs,{children:[e.title&&(0,I.jsx)(Zs,{title:e.title,children:e.title}),(0,I.jsx)(Qs,{children:e.items.map(e=>(0,I.jsx)(qm,{item:e,pathname:t,search:n},Km(e)))})]})}function Km(e){return Wm(e)?`g:${e.title}`:`l:${e.url}`}function qm({item:e,pathname:t,search:n}){let{state:r,isMobile:i}=Hs();return Wm(e)?r===`collapsed`&&!i?(0,I.jsx)(Qm,{item:e,pathname:t,search:n}):(0,I.jsx)(Ym,{item:e,pathname:t,search:n}):(0,I.jsx)(Jm,{item:e,pathname:t,search:n})}function Jm({item:e,pathname:t,search:n}){let{setOpenMobile:r}=Hs();return(0,I.jsx)($s,{children:(0,I.jsx)(tc,{asChild:!0,isActive:$m(e,t,n),children:(0,I.jsxs)(`a`,{href:e.url,title:e.title,"data-tour":Zm(e.url),onClick:()=>r(!1),...e.external?{target:`_blank`,rel:`noreferrer`}:null,children:[e.icon&&(0,I.jsx)(e.icon,{"aria-hidden":!0}),(0,I.jsx)(`span`,{"data-sidebar-label":!0,className:`flex-1 truncate`,children:e.title}),e.marker&&(0,I.jsx)(e.marker,{"aria-hidden":!0,"data-sidebar-label":!0,className:`size-3.5 text-muted-foreground`})]})})})}function Ym({item:e,pathname:t,search:n}){let r=eh(e,t,n);return(0,I.jsx)(nl,{defaultOpen:r,className:`group/collapsible`,asChild:!0,children:(0,I.jsxs)($s,{children:[(0,I.jsx)(rl,{asChild:!0,children:(0,I.jsxs)(tc,{isActive:r,"data-tour":Zm(e.items[0]?.url),children:[e.icon&&(0,I.jsx)(e.icon,{"aria-hidden":!0}),(0,I.jsx)(`span`,{"data-sidebar-label":!0,className:`flex-1 truncate`,title:e.title,children:e.title}),e.marker&&(0,I.jsx)(e.marker,{"aria-hidden":!0,"data-sidebar-label":!0,className:`size-3.5 text-muted-foreground`}),(0,I.jsx)(Et,{"aria-hidden":!0,"data-sidebar-label":!0,className:`transition-transform duration-200 group-data-[state=open]/collapsible:rotate-90 rtl:rotate-180 rtl:group-data-[state=open]/collapsible:-rotate-90`})]})}),(0,I.jsx)(il,{children:(0,I.jsx)(nc,{children:e.items.map(e=>(0,I.jsx)(Xm,{link:e,pathname:t,search:n},e.url))})})]})})}function Xm({link:e,pathname:t,search:n}){let{setOpenMobile:r}=Hs();return(0,I.jsx)(rc,{children:(0,I.jsx)(ic,{asChild:!0,isActive:$m(e,t,n),children:(0,I.jsxs)(`a`,{href:e.url,title:e.title,"data-tour":Zm(e.url),onClick:()=>r(!1),children:[e.icon&&(0,I.jsx)(e.icon,{"aria-hidden":!0}),(0,I.jsx)(`span`,{children:e.title})]})})})}function Zm(e){if(!e)return;if(e===`/admin`)return`nav-home`;if(e===`/admin/settings`)return`nav-settings`;let t=e.match(/^\/admin\/c\/([^/?]+)$/);if(t)return`nav-c-${decodeURIComponent(t[1])}`}function Qm({item:e,pathname:t,search:n}){let r=eh(e,t,n),{direction:i}=J();return(0,I.jsx)($s,{children:(0,I.jsxs)(Rm,{children:[(0,I.jsx)(zm,{asChild:!0,children:(0,I.jsxs)(tc,{isActive:r,children:[e.icon&&(0,I.jsx)(e.icon,{"aria-hidden":!0}),(0,I.jsx)(`span`,{"data-sidebar-label":!0,title:e.title,children:e.title}),(0,I.jsx)(Et,{"aria-hidden":!0,"data-sidebar-label":!0,className:`ms-auto`})]})}),(0,I.jsxs)(Bm,{side:i===`rtl`?`left`:`right`,align:`start`,sideOffset:4,children:[(0,I.jsx)(Hm,{children:e.title}),(0,I.jsx)(Um,{}),e.items.map(e=>(0,I.jsx)(Vm,{asChild:!0,children:(0,I.jsx)(`a`,{href:e.url,className:H($m(e,t,n)&&`font-medium`),children:e.title})},e.url))]})]})})}function $m(e,t,n){let r=new URL(e.url,`http://x`);if(r.pathname!==t)return!1;if(!r.search)return!0;let i=new URLSearchParams(r.search),a=new URLSearchParams(n);for(let[e,t]of i.entries())if(a.get(e)!==t)return!1;return!0}function eh(e,t,n){return e.items.some(e=>$m(e,t,n))?!0:e.items.some(e=>new URL(e.url,`http://x`).pathname===t)}function th(){fetch(`/api/auth/sign-out`,{method:`POST`,credentials:`include`}).then(()=>{window.location.href=`/admin/sign-in`})}function nh({login:e,role:t}){let{isMobile:n}=Hs(),{language:r}=J(),i=(e??`?`).charAt(0).toUpperCase(),a=e?`https://github.com/${encodeURIComponent(e)}.png?size=80`:null;return(0,I.jsx)(Qs,{children:(0,I.jsx)($s,{children:(0,I.jsxs)(Rm,{children:[(0,I.jsx)(zm,{asChild:!0,children:(0,I.jsxs)(tc,{size:`lg`,className:`data-[state=open]:bg-accent/40`,children:[(0,I.jsx)(rh,{avatarUrl:a,initial:i}),(0,I.jsxs)(`div`,{"data-sidebar-label":!0,className:`grid flex-1 text-start text-sm leading-tight`,children:[(0,I.jsx)(`span`,{className:`truncate font-semibold`,children:e??`—`}),(0,I.jsx)(`span`,{className:`truncate text-xs text-muted-foreground`,children:t??Y(r,`common.signedIn`)})]}),(0,I.jsx)(Dt,{"data-sidebar-label":!0,className:`ms-auto size-4 text-muted-foreground`,"aria-hidden":!0})]})}),(0,I.jsxs)(Bm,{align:`end`,side:n?`bottom`:`right`,sideOffset:6,className:`w-(--radix-dropdown-menu-trigger-width) min-w-56 rounded-lg`,children:[(0,I.jsxs)(Hm,{className:`flex items-center gap-3 py-2`,children:[(0,I.jsx)(rh,{avatarUrl:a,initial:i,large:!0}),(0,I.jsxs)(`div`,{className:`flex min-w-0 flex-col`,children:[(0,I.jsx)(`span`,{className:`truncate text-sm font-medium text-foreground`,children:e??`—`}),(0,I.jsx)(`span`,{className:`label-eyebrow truncate`,children:t??Y(r,`common.signedIn`)})]})]}),(0,I.jsx)(Um,{}),(0,I.jsx)(Vm,{asChild:!0,children:(0,I.jsxs)(`a`,{href:`/admin/preferences`,className:`flex items-center gap-2`,children:[(0,I.jsx)(hn,{className:`size-4`,"aria-hidden":!0}),Y(r,`preferences.page.open`)]})}),(0,I.jsx)(Um,{}),(0,I.jsx)(Vm,{asChild:!0,className:`text-destructive focus:text-destructive focus:bg-destructive/10`,children:(0,I.jsxs)(`button`,{type:`button`,onClick:th,className:`flex w-full cursor-pointer items-center gap-2`,children:[(0,I.jsx)(en,{className:`size-4`,"aria-hidden":!0}),Y(r,`common.signOut`)]})})]})]})})})}function rh({avatarUrl:e,initial:t,large:n=!1}){let r=n?`size-9`:`size-8`,i=n?`text-sm`:`text-xs`;return(0,I.jsx)(`span`,{className:H(`shrink-0 inline-flex items-center justify-center rounded-lg`,`bg-primary/15 text-foreground/80 ring-1 ring-border`,r),"aria-hidden":!0,children:e?(0,I.jsx)(`img`,{src:e,alt:``,className:`size-full rounded-lg object-cover`,decoding:`async`}):(0,I.jsx)(`span`,{className:H(`font-medium`,i),children:t})})}function ih({brand:e,groups:t,pathname:n,search:r,user:i}){let{direction:a}=J();return(0,I.jsxs)(Us,{side:a===`rtl`?`right`:`left`,children:[(0,I.jsx)(Ks,{children:(0,I.jsxs)(`div`,{className:`sidebar-chrome-row`,children:[(0,I.jsx)(Uc,{brand:e}),(0,I.jsx)(Ws,{})]})}),(0,I.jsx)(Ys,{}),(0,I.jsx)(qs,{children:t.map((e,t)=>(0,I.jsx)(Gm,{group:e,pathname:n,search:r},e.title??`g-${t}`))}),(0,I.jsx)(Ys,{}),(0,I.jsx)(Js,{children:(0,I.jsx)(nh,{login:i.login,role:i.role})})]})}function ah({login:e,role:t}){let{language:n}=J(),r=(e??`?`).charAt(0).toUpperCase(),i=e?`https://github.com/${encodeURIComponent(e)}.png?size=80`:null;return(0,I.jsxs)(Rm,{children:[(0,I.jsx)(zm,{"aria-label":`Account menu`,className:H(`relative inline-flex size-8 items-center justify-center rounded-full`,`outline-hidden ring-1 ring-border`,`hover:ring-primary/40 transition-all`,`data-[state=open]:ring-primary`),children:(0,I.jsx)(oh,{avatarUrl:i,initial:r})}),(0,I.jsxs)(Bm,{align:`end`,sideOffset:6,className:`w-56`,children:[(0,I.jsxs)(Hm,{className:`flex items-center gap-3 py-2`,children:[(0,I.jsx)(oh,{avatarUrl:i,initial:r,large:!0}),(0,I.jsxs)(`div`,{className:`flex min-w-0 flex-col`,children:[(0,I.jsx)(`span`,{className:`truncate text-sm font-medium text-foreground`,children:e??`—`}),(0,I.jsx)(`span`,{className:`label-eyebrow truncate`,children:t??Y(n,`common.signedIn`)})]})]}),(0,I.jsx)(Um,{}),(0,I.jsx)(Vm,{asChild:!0,children:(0,I.jsxs)(`a`,{href:`/admin/preferences`,className:`flex items-center gap-2`,children:[(0,I.jsx)(hn,{className:`size-4`,"aria-hidden":!0}),Y(n,`preferences.page.open`)]})}),(0,I.jsx)(Um,{}),(0,I.jsx)(Vm,{asChild:!0,className:`text-destructive focus:text-destructive focus:bg-destructive/10`,children:(0,I.jsxs)(`button`,{type:`button`,onClick:th,className:`flex w-full cursor-pointer items-center gap-2`,children:[(0,I.jsx)(en,{className:`size-4`,"aria-hidden":!0}),Y(n,`common.signOut`)]})})]})]})}function oh({avatarUrl:e,initial:t,large:n=!1}){let r=n?`size-9`:`size-8`,i=n?`text-sm`:`text-xs`;return(0,I.jsx)(`span`,{className:H(`shrink-0 inline-flex items-center justify-center rounded-full overflow-hidden`,`bg-primary/15 text-foreground/80`,r),"aria-hidden":!0,children:e?(0,I.jsx)(`img`,{src:e,alt:``,className:`size-full object-cover`,decoding:`async`}):(0,I.jsx)(`span`,{className:H(`font-medium`,i),children:t})})}function sh(){let{language:e,setLanguage:t}=J(),n=Cc.find(t=>t.value===e)??Cc[0];return(0,I.jsxs)(Rm,{children:[(0,I.jsx)(zm,{asChild:!0,children:(0,I.jsxs)(U,{type:`button`,variant:`ghost`,size:`sm`,className:`h-8 gap-2 rounded-full border border-border/60 bg-background/30 px-2.5`,"aria-label":Y(e,`preferences.language`),children:[(0,I.jsx)(Jt,{className:`size-4 text-primary`,"aria-hidden":!0}),(0,I.jsx)(`span`,{className:`hidden text-xs font-medium sm:inline`,children:n.nativeLabel})]})}),(0,I.jsxs)(Bm,{align:`end`,className:`max-h-[min(28rem,80vh)] w-52 overflow-y-auto`,children:[(0,I.jsx)(Hm,{className:`label-eyebrow opacity-70`,children:Y(e,`preferences.language`)}),Cc.map(n=>(0,I.jsxs)(Vm,{onSelect:()=>t(n.value),className:`justify-between`,children:[(0,I.jsx)(`span`,{children:n.nativeLabel}),(0,I.jsx)(wt,{"aria-hidden":!0,className:H(`size-4 text-primary`,n.value===e?`opacity-100`:`opacity-0`)})]},n.value))]})]})}function ch(){let{language:e,theme:t,setTheme:n}=J(),r=lh(e).find(e=>e.value===t),i=r?.icon??tn;return(0,I.jsxs)(Rm,{children:[(0,I.jsx)(zm,{asChild:!0,children:(0,I.jsxs)(U,{type:`button`,variant:`ghost`,size:`sm`,className:`h-8 gap-2 rounded-full border border-border/60 bg-background/30 px-2.5`,"aria-label":Y(e,`preferences.appearance`),children:[(0,I.jsx)(i,{className:`size-4 text-primary`,"aria-hidden":!0}),(0,I.jsx)(`span`,{className:`hidden text-xs font-medium sm:inline`,children:r?.label??Y(e,`preferences.system`)})]})}),(0,I.jsxs)(Bm,{align:`end`,className:`w-44`,children:[(0,I.jsx)(Hm,{className:`label-eyebrow opacity-70`,children:Y(e,`preferences.appearance`)}),lh(e).map(e=>{let r=e.icon;return(0,I.jsxs)(Vm,{onSelect:()=>n(e.value),className:`justify-between`,children:[(0,I.jsxs)(`span`,{className:`flex items-center gap-2`,children:[(0,I.jsx)(r,{className:`size-4`,"aria-hidden":!0}),e.label]}),(0,I.jsx)(wt,{"aria-hidden":!0,className:H(`size-4 text-primary`,e.value===t?`opacity-100`:`opacity-0`)})]},e.value)})]})]})}function lh(e){return[{value:`light`,label:Y(e,`preferences.light`),icon:vn},{value:`dark`,label:Y(e,`preferences.dark`),icon:nn},{value:`system`,label:Y(e,`preferences.system`),icon:tn}]}function uh({fixed:e=!1,className:t,children:n,user:r,site:i,publicUrl:a,onOpenGuide:o}){let{language:s}=J(),[c,l]=F.useState(!1);return F.useEffect(()=>{if(!e)return;let t=()=>l(window.scrollY>10);return t(),window.addEventListener(`scroll`,t,{passive:!0}),()=>window.removeEventListener(`scroll`,t)},[e]),(0,I.jsxs)(`header`,{"data-slot":`header`,"data-scrolled":c||void 0,className:H(`admin-statusbar z-20 flex h-14 shrink-0 items-center gap-3 px-4`,e?`sticky top-0 w-[inherit] transition-shadow`:`border-b border-border/40`,c&&`shadow-sm`,t),children:[(0,I.jsx)(Ws,{className:`-ms-1 md:hidden`}),i?(0,I.jsxs)(`div`,{className:`admin-site-status`,"aria-label":`Current admin site`,children:[(0,I.jsx)(`span`,{children:i.title}),i.subtitle?(0,I.jsx)(`small`,{children:i.subtitle}):null]}):null,a?(0,I.jsx)(U,{asChild:!0,variant:`secondary`,size:`sm`,className:`shrink-0`,children:(0,I.jsxs)(`a`,{href:a,target:`_blank`,rel:`noreferrer`,title:Y(s,`common.viewSite`),children:[(0,I.jsx)(Rt,{className:`size-3.5`,"aria-hidden":!0}),(0,I.jsx)(`span`,{className:`hidden sm:inline`,children:Y(s,`common.viewSite`)})]})}):null,n,r?(0,I.jsxs)(`div`,{className:H(`flex items-center gap-2`,n?``:`ms-auto`),children:[o?(0,I.jsxs)(U,{type:`button`,variant:`ghost`,size:`sm`,onClick:o,"data-tour":`guide-button`,title:Y(s,`guide.open`),"aria-label":Y(s,`guide.open`),children:[(0,I.jsx)(At,{className:`size-4`,"aria-hidden":!0}),(0,I.jsx)(`span`,{className:`hidden sm:inline`,children:Y(s,`guide.open`)})]}):null,(0,I.jsx)(sh,{}),(0,I.jsx)(ch,{}),(0,I.jsx)(ah,{login:r.login,role:r.role})]}):null]})}var dh=`content`;function fh({className:e}){return(0,I.jsx)(`a`,{href:`#${dh}`,className:H(`fixed inset-inline-start-3 top-3 z-[999]`,`-translate-y-52 rounded-md bg-primary px-3 py-2 text-sm font-medium`,`text-primary-foreground shadow`,`focus-visible:translate-y-0 transition-transform`,`outline-2 outline-offset-2 outline-ring/40`,e),children:`Skip to main content`})}function ph({fixed:e=!1,fluid:t=!1,className:n,children:r}){return(0,I.jsx)(`div`,{id:dh,"data-layout":e?`fixed`:`auto`,className:H(`@container/content`,`w-full px-4 py-6 sm:px-6`,e&&`flex grow flex-col overflow-hidden`,!t&&`mx-auto max-w-[1440px]`,`flex-1`,n),children:r})}function mh(e,t){switch(t){case`draft`:return Y(e,`status.draft`);case`review`:return Y(e,`status.review`);case`published`:return Y(e,`status.published`);case`archived`:return Y(e,`status.archived`)}}var hh=`mantle.admin.guide.closed`;function gh(e){let t={key:`reopen`,selector:`[data-tour="guide-button"]`};if(!e)return[t];let n=`/admin/c/${encodeURIComponent(e.name)}`;return[{key:`collections`,selector:`[data-tour="nav-c-${e.name}"]`},{key:`filters`,selector:`[data-tour="status-filter"]`,href:n},{key:`actions`,selector:`[data-tour="entry-actions"]`,href:n},t]}var _h={collections:{title:`guide.collections.title`,body:`guide.collections.body`},filters:{title:`guide.filters.title`,body:`guide.filters.body`},actions:{title:`guide.actions.title`,body:`guide.actions.body`},reopen:{title:`guide.reopen.title`,body:`guide.reopen.body`}};function vh({language:e,firstCollection:t,onClose:n}){let[r,i]=F.useState(0),{location:a,navigate:o}=xc(),s=F.useMemo(()=>gh(t),[t]),c=s[r]??s[0],l=bh(c),u=F.useMemo(()=>xh(l),[l]),d=r===s.length-1;return F.useEffect(()=>{c.href&&`${a.pathname}${a.search}`!==c.href&&o(c.href)},[a.pathname,a.search,o,c]),(0,I.jsxs)(`div`,{className:`admin-guide-overlay`,role:`dialog`,"aria-modal":`false`,"aria-labelledby":`admin-guide-title`,children:[l?(0,I.jsx)(`div`,{className:`admin-guide-highlight`,style:{top:l.top-8,left:l.left-8,width:l.width+16,height:l.height+16}}):null,(0,I.jsxs)(`section`,{className:`admin-guide-popover`,style:u,children:[(0,I.jsxs)(`div`,{className:`admin-guide-progress`,children:[(0,I.jsx)(`span`,{children:r+1}),(0,I.jsx)(`small`,{children:s.length})]}),(0,I.jsxs)(`div`,{className:`admin-guide-copy`,children:[(0,I.jsx)(`p`,{className:`label-eyebrow`,children:`AotterMantle`}),(0,I.jsx)(`h2`,{id:`admin-guide-title`,children:Y(e,_h[c.key].title)}),(0,I.jsx)(`p`,{children:Y(e,_h[c.key].body)})]}),(0,I.jsxs)(`div`,{className:`admin-guide-controls`,children:[(0,I.jsx)(`button`,{type:`button`,className:`guide-icon-button`,onClick:()=>i(e=>Math.max(0,e-1)),disabled:r===0,title:Y(e,`guide.prev`),children:(0,I.jsx)(Tt,{className:`size-4`,"aria-hidden":!0})}),(0,I.jsxs)(`button`,{type:`button`,className:`guide-primary-button`,onClick:()=>d?n():i(e=>Math.min(s.length-1,e+1)),children:[d?Y(e,`guide.finish`):Y(e,`guide.next`),d?null:(0,I.jsx)(Et,{className:`size-4`,"aria-hidden":!0})]}),(0,I.jsx)(`button`,{type:`button`,className:`guide-icon-button`,onClick:n,title:Y(e,`guide.close`),children:(0,I.jsx)(Pn,{className:`size-4`,"aria-hidden":!0})})]})]})]})}function yh(){let{language:e}=J(),[t,n]=F.useState(()=>Sh());return{language:e,open:t,showGuide:F.useCallback(()=>{try{localStorage.removeItem(hh)}catch{}n(!0)},[]),closeGuide:F.useCallback(()=>{try{localStorage.setItem(hh,`1`)}catch{}n(!1)},[])}}function bh(e){let[t,n]=F.useState(null);return F.useEffect(()=>{let t=0,r=()=>{cancelAnimationFrame(t),t=requestAnimationFrame(()=>{let t=document.querySelector(e.selector);if(!t){n(null);return}t.scrollIntoView({block:`nearest`,inline:`nearest`});let r=t.getBoundingClientRect();n({top:r.top,left:r.left,width:r.width,height:r.height})})};return r(),window.addEventListener(`resize`,r),window.addEventListener(`scroll`,r,!0),()=>{cancelAnimationFrame(t),window.removeEventListener(`resize`,r),window.removeEventListener(`scroll`,r,!0)}},[e]),t}function xh(e){if(typeof window>`u`)return{};if(!e)return{top:`5rem`,left:`50%`,transform:`translateX(-50%)`};let t=Math.min(380,Math.max(280,window.innerWidth-32)),n=e.left+e.width+t+24<window.innerWidth,r=e.left-t-24>0,i=Math.min(window.innerHeight-220,Math.max(16,e.top));return n?{top:i,left:e.left+e.width+18}:r?{top:i,left:e.left-t-18}:{top:Math.min(window.innerHeight-220,e.top+e.height+18),left:`50%`,transform:`translateX(-50%)`}}function Sh(){if(typeof window>`u`)return!1;try{return localStorage.getItem(hh)!==`1`}catch{return!0}}var Ch={title:`CMS`,subtitle:`admin`,href:`/admin`};function wh({children:e}){let{pathname:t,search:n}=Sc(),{language:r}=J(),i=yh(),a=L({queryKey:[`me`],queryFn:()=>q.get(`/me`),retry:!1}),o=L({queryKey:[`collections`],queryFn:async()=>(await q.get(`/collections`)).collections}),s=L({queryKey:[`site`],queryFn:()=>q.get(`/site`)}),c=L(mc()),l=L(pc()),u=F.useMemo(()=>({...Ch,title:s.data?.brand??Ch.title,subtitle:s.data?.canonicalLocale??Ch.subtitle}),[s.data]),d=s.data?.canonicalLocale??null,f=F.useMemo(()=>Th(o.data??[],c.data??[],l.data??[],r,d,a.data?.role??null),[o.data,c.data,l.data,r,d,a.data?.role]),p=F.useMemo(()=>{let e=(o.data??[]).find(e=>!e.parent);return e?{name:e.name}:null},[o.data]);return(0,I.jsxs)(Vs,{defaultOpen:Ls()??!0,children:[(0,I.jsx)(fh,{}),(0,I.jsx)(ih,{brand:u,groups:f,pathname:t,search:n,user:{login:a.data?.login??null,role:a.data?.role??null}}),(0,I.jsxs)(Gs,{children:[(0,I.jsx)(uh,{fixed:!0,site:u,publicUrl:s.data?.publicUrl,onOpenGuide:i.showGuide,user:{login:a.data?.login??null,role:a.data?.role??null}}),(0,I.jsx)(ph,{children:e})]}),(0,I.jsx)(Vc,{}),i.open?(0,I.jsx)(vh,{language:i.language,firstCollection:p,onClose:i.closeGuide}):null]})}function Th(e,t,n,r,i,a){let o=e.filter(e=>!e.parent),s=o.filter(e=>e.lifecycle!==`none`),c=o.filter(e=>e.lifecycle===`none`),l=e.some(e=>e.lifecycle===`editorial`),u={items:[{title:Y(r,`nav.home`),url:`/admin`,icon:Ut}]},d={title:Y(r,`nav.content`),items:s.map(e=>Eh(e,r,i))},f=c.length>0?{title:Y(r,`nav.operations`),items:c.map(e=>Eh(e,r,i))}:null,p=t.filter(e=>e.rowBindings.length===0),m=p.length>0?{title:Y(r,`nav.ops`),items:p.map(e=>({title:lc(e.title,r,i)??uc(e.name),icon:Nn,url:`/admin/ops#${e.name}`}))}:null,h=n.length>0?{title:Y(r,`nav.reports`),items:n.map(e=>({title:lc(e.title,r,i)??uc(e.name),icon:Ct,url:`/admin/views/${encodeURIComponent(e.name)}`}))}:null,g={title:Y(r,`nav.more`),items:[...l?[{title:Y(r,`nav.approvals`),url:`/admin/approvals`,icon:Mt}]:[],{title:Y(r,`nav.media`),url:`/admin/media`,icon:Kt},{title:Y(r,`nav.settings`),url:`/admin/settings`,icon:hn},...a===`owner`?[{title:Y(r,`nav.staff`),url:`/admin/staff`,icon:An}]:[]]};return[u,d,...f?[f]:[],...m?[m]:[],...h?[h]:[],g]}function Eh(e,t,n){let r={title:lc(e.title,t,n)??uc(e.name),icon:Bt,marker:e.hasTranslations?Vt:void 0},i=Dh(e);return i.length===0?{...r,url:`/admin/c/${e.name}`}:{...r,items:[{title:Y(t,`collection.filter.all`),url:`/admin/c/${e.name}`},...i.map(n=>({title:mh(t,n),url:`/admin/c/${e.name}?status=${n}`}))]}}function Dh(e){return e.lifecycle===`editorial`?hc:e.lifecycle===`none`?[]:gc}function Oh(){return(0,I.jsx)(`div`,{className:`flex min-h-svh items-center justify-center p-6`,children:(0,I.jsxs)(`div`,{className:`glass-card w-full max-w-sm p-6`,children:[(0,I.jsx)(`div`,{className:`mb-4 h-4 w-24 animate-pulse rounded bg-muted`}),(0,I.jsxs)(`div`,{className:`space-y-2`,children:[(0,I.jsx)(`div`,{className:`h-3 w-full animate-pulse rounded bg-muted`}),(0,I.jsx)(`div`,{className:`h-3 w-2/3 animate-pulse rounded bg-muted`})]})]})})}function kh({error:e}){let{language:t}=J(),n=e instanceof Error?e.message:`Unknown error.`;return(0,I.jsx)(`div`,{className:`flex min-h-svh items-center justify-center p-6`,children:(0,I.jsxs)(`div`,{className:`glass-card animate-rise w-full max-w-sm p-8 text-center`,children:[(0,I.jsx)(`h1`,{className:`mb-2 text-xl`,children:Y(t,`auth.error.title`)}),(0,I.jsx)(`p`,{className:`text-sm text-muted-foreground`,children:n})]})})}function Ah({login:e}){let{language:t}=J();return(0,I.jsx)(`div`,{className:`flex min-h-svh items-center justify-center p-6`,children:(0,I.jsxs)(`div`,{className:`glass-card animate-rise w-full max-w-md p-8 text-center`,children:[(0,I.jsx)(`div`,{className:`mx-auto mb-3 inline-flex size-10 items-center justify-center rounded-full bg-destructive/10 text-destructive`,children:(0,I.jsx)(wn,{className:`size-5`,"aria-hidden":!0})}),(0,I.jsx)(`h1`,{className:`mb-2 text-xl`,children:Y(t,`auth.accessDenied.title`)}),e?(0,I.jsxs)(`p`,{className:`mb-1 text-sm font-medium text-foreground`,children:[`GitHub: `,e]}):null,(0,I.jsx)(`p`,{className:`mb-1 text-sm text-muted-foreground`,children:Y(t,`auth.accessDenied.noStaff`)}),(0,I.jsx)(`p`,{className:`mb-6 text-sm text-muted-foreground`,children:Y(t,`auth.accessDenied.askOwner`)}),(0,I.jsxs)(U,{variant:`outline`,className:`w-full`,onClick:th,children:[(0,I.jsx)(en,{className:`me-2 size-4`,"aria-hidden":!0}),Y(t,`common.signOut`)]})]})})}var jh=`w-full rounded border border-input bg-background px-3 py-2 text-sm placeholder:text-muted-foreground focus-visible:outline-none focus-visible:ring-1 focus-visible:ring-ring`,Mh=`first:mt-0 mt-4`,Nh=`first:mt-0 first:border-t-0 first:pt-0 mt-6 border-t border-border pt-4`;function Ph(e){return e&&e.startsWith(`/`)&&!e.startsWith(`//`)?e:`/admin`}function Fh(){let{language:e}=J(),t=Ph(new URLSearchParams(window.location.search).get(`return`)),n=L({queryKey:[`auth-methods`],queryFn:async()=>{let e=await fetch(`/api/auth/methods`,{credentials:`include`});if(!e.ok)throw Error(`HTTP ${e.status}`);return(await e.json()).methods??[]},retry:!1});return(0,I.jsx)(`div`,{className:`flex min-h-svh items-center justify-center p-6`,children:(0,I.jsxs)(`div`,{className:`glass-card animate-rise w-full max-w-sm p-8`,children:[(0,I.jsx)(`p`,{className:`label-eyebrow mb-2`,children:Y(e,`auth.signIn.eyebrow`)}),(0,I.jsx)(`h1`,{className:`mb-2 text-xl`,children:Y(e,`auth.signIn.title`)}),n.isError?(0,I.jsx)(`p`,{className:`mb-4 text-sm text-destructive`,children:Y(e,`auth.signIn.methodsLoadFailed`)}):null,n.isLoading?(0,I.jsx)(`div`,{className:`space-y-2`,children:(0,I.jsx)(`div`,{className:`h-9 w-full animate-pulse rounded bg-muted`})}):null,n.data?.length===0?(0,I.jsx)(`p`,{className:`text-sm text-muted-foreground`,children:Y(e,`auth.signIn.noMethods`)}):null,n.data&&n.data.length>0?(0,I.jsx)(`div`,{children:n.data.map(e=>(0,I.jsx)(Ih,{method:e,returnTo:t},e.kind===`social`?`social:${e.provider}`:e.kind===`oauth`?`oauth:${e.providerId}`:e.kind))}):null]})})}function Ih({method:e,returnTo:t}){switch(e.kind){case`social`:return(0,I.jsx)(Rh,{provider:e.provider,returnTo:t});case`oauth`:return(0,I.jsx)(zh,{providerId:e.providerId,displayName:e.displayName??e.providerId,returnTo:t});case`email-otp`:return(0,I.jsx)(Bh,{returnTo:t});case`magic-link`:return(0,I.jsx)(Vh,{returnTo:t});default:return(0,I.jsx)(Hh,{kind:e.kind})}}var Lh={github:`GitHub`,google:`Google`,apple:`Apple`,"microsoft-entra-id":`Microsoft`,facebook:`Facebook`,discord:`Discord`,twitter:`Twitter / X`,linkedin:`LinkedIn`,spotify:`Spotify`,twitch:`Twitch`,gitlab:`GitLab`,tiktok:`TikTok`,reddit:`Reddit`,kick:`Kick`,vk:`VK`,naver:`Naver`,kakao:`Kakao`,line:`LINE`,slack:`Slack`,atlassian:`Atlassian`,zoom:`Zoom`,notion:`Notion`,figma:`Figma`,linear:`Linear`,vercel:`Vercel`,paypal:`PayPal`,huggingface:`Hugging Face`,cognito:`Cognito`,salesforce:`Salesforce`,polar:`Polar`,railway:`Railway`,roblox:`Roblox`,paybin:`Paybin`,wechat:`WeChat`,dropbox:`Dropbox`};function Rh({provider:e,returnTo:t}){let{language:n}=J(),r=Lh[e]??e,i=async()=>{let n=await fetch(`/api/auth/sign-in/social`,{method:`POST`,credentials:`include`,headers:{"Content-Type":`application/json`},body:JSON.stringify({provider:e,callbackURL:t})});if(!n.ok)return;let r=await n.json();r.url&&(window.location.href=r.url)};return(0,I.jsx)(`div`,{className:Mh,children:(0,I.jsx)(U,{onClick:()=>void i(),className:`w-full`,children:Y(n,`auth.signIn.method.social.button`,{provider:r})})})}function zh({providerId:e,displayName:t,returnTo:n}){let{language:r}=J(),i=async()=>{let t=await fetch(`/api/auth/sign-in/oauth2`,{method:`POST`,credentials:`include`,headers:{"Content-Type":`application/json`},body:JSON.stringify({providerId:e,callbackURL:n})});if(!t.ok)return;let r=await t.json();r.url&&(window.location.href=r.url)};return(0,I.jsx)(`div`,{className:Mh,children:(0,I.jsx)(U,{onClick:()=>void i(),className:`w-full`,children:Y(r,`auth.signIn.method.oauth.button`,{provider:t})})})}function Bh({returnTo:e}){let{language:t}=J(),[n,r]=F.useState(`email`),[i,a]=F.useState(``),[o,s]=F.useState(``),[c,l]=F.useState(!1),[u,d]=F.useState(null),f=async e=>{l(!0),d(null);try{await e()}finally{l(!1)}};return(0,I.jsxs)(`div`,{className:Nh,children:[(0,I.jsx)(`p`,{className:`mb-2 text-sm text-muted-foreground`,children:Y(t,`auth.signIn.method.email-otp.body`)}),n===`email`?(0,I.jsxs)(`form`,{onSubmit:e=>{e.preventDefault(),i&&f(async()=>{if(!(await fetch(`/api/auth/email-otp/send-verification-otp`,{method:`POST`,credentials:`include`,headers:{"Content-Type":`application/json`},body:JSON.stringify({email:i,type:`sign-in`})})).ok){d(Y(t,`auth.signIn.method.email-otp.sendFailed`));return}r(`otp`)})},className:`space-y-2`,children:[(0,I.jsx)(`label`,{htmlFor:`signin-email`,className:`sr-only`,children:Y(t,`auth.signIn.method.email-otp.emailLabel`)}),(0,I.jsx)(`input`,{id:`signin-email`,type:`email`,value:i,onChange:e=>a(e.currentTarget.value),placeholder:Y(t,`auth.signIn.method.email-otp.emailPlaceholder`),required:!0,autoComplete:`email`,className:jh}),(0,I.jsx)(U,{type:`submit`,className:`w-full`,disabled:c||!i,children:Y(t,`auth.signIn.method.email-otp.sendButton`)})]}):(0,I.jsxs)(`form`,{onSubmit:n=>{n.preventDefault(),o&&f(async()=>{if(!(await fetch(`/api/auth/sign-in/email-otp`,{method:`POST`,credentials:`include`,headers:{"Content-Type":`application/json`},body:JSON.stringify({email:i,otp:o})})).ok){d(Y(t,`auth.signIn.method.email-otp.verifyFailed`));return}window.location.assign(e)})},className:`space-y-2`,children:[(0,I.jsx)(`p`,{className:`text-xs text-muted-foreground`,children:Y(t,`auth.signIn.method.email-otp.sentTo`,{email:i})}),(0,I.jsx)(`label`,{htmlFor:`signin-otp`,className:`sr-only`,children:Y(t,`auth.signIn.method.email-otp.otpLabel`)}),(0,I.jsx)(`input`,{id:`signin-otp`,type:`text`,inputMode:`numeric`,autoComplete:`one-time-code`,value:o,onChange:e=>s(e.currentTarget.value),placeholder:Y(t,`auth.signIn.method.email-otp.otpPlaceholder`),required:!0,className:jh}),(0,I.jsx)(U,{type:`submit`,className:`w-full`,disabled:c||!o,children:Y(t,`auth.signIn.method.email-otp.verifyButton`)}),(0,I.jsx)(`button`,{type:`button`,onClick:()=>r(`email`),className:`text-xs text-muted-foreground underline-offset-2 hover:underline`,children:Y(t,`auth.signIn.method.email-otp.back`)})]}),u?(0,I.jsx)(`p`,{className:`mt-2 text-xs text-destructive`,children:u}):null]})}function Vh({returnTo:e}){let{language:t}=J(),[n,r]=F.useState(``),[i,a]=F.useState(!1),[o,s]=F.useState(!1),[c,l]=F.useState(null),u=async e=>{a(!0),l(null);try{await e()}finally{a(!1)}};return(0,I.jsxs)(`div`,{className:Nh,children:[(0,I.jsx)(`p`,{className:`mb-2 text-sm text-muted-foreground`,children:Y(t,`auth.signIn.method.magic-link.body`)}),o?(0,I.jsxs)(`div`,{className:`space-y-2`,children:[(0,I.jsx)(`p`,{className:`text-sm text-foreground`,children:Y(t,`auth.signIn.method.magic-link.sentTo`,{email:n})}),(0,I.jsx)(`p`,{className:`text-xs text-muted-foreground`,children:Y(t,`auth.signIn.method.magic-link.clickHint`)}),(0,I.jsx)(`button`,{type:`button`,onClick:()=>{s(!1),r(``)},className:`text-xs text-muted-foreground underline-offset-2 hover:underline`,children:Y(t,`auth.signIn.method.magic-link.anotherEmail`)})]}):(0,I.jsxs)(`form`,{onSubmit:r=>{r.preventDefault(),n&&u(async()=>{if(!(await fetch(`/api/auth/sign-in/magic-link`,{method:`POST`,credentials:`include`,headers:{"Content-Type":`application/json`},body:JSON.stringify({email:n,callbackURL:e})})).ok){l(Y(t,`auth.signIn.method.magic-link.sendFailed`));return}s(!0)})},className:`space-y-2`,children:[(0,I.jsx)(`label`,{htmlFor:`signin-mlink-email`,className:`sr-only`,children:Y(t,`auth.signIn.method.magic-link.emailLabel`)}),(0,I.jsx)(`input`,{id:`signin-mlink-email`,type:`email`,value:n,onChange:e=>r(e.currentTarget.value),placeholder:Y(t,`auth.signIn.method.magic-link.emailPlaceholder`),required:!0,autoComplete:`email`,className:jh}),(0,I.jsx)(U,{type:`submit`,className:`w-full`,disabled:i||!n,children:Y(t,`auth.signIn.method.magic-link.sendButton`)})]}),c?(0,I.jsx)(`p`,{className:`mt-2 text-xs text-destructive`,children:c}):null]})}function Hh({kind:e}){let{language:t}=J();return(0,I.jsx)(`p`,{className:`mt-4 text-xs text-muted-foreground`,children:Y(t,`auth.signIn.unknownMethod`,{kind:e})})}function Uh({eyebrow:e,title:t,description:n,actions:r}){return(0,I.jsxs)(`div`,{className:`mb-6 flex flex-wrap items-end justify-between gap-4`,children:[(0,I.jsxs)(`div`,{className:`min-w-0`,children:[e?(0,I.jsx)(`p`,{className:`label-eyebrow mb-1`,children:e}):null,(0,I.jsx)(`h1`,{className:`text-2xl`,children:t}),n?(0,I.jsx)(`div`,{className:`mt-1 max-w-3xl text-sm text-muted-foreground`,children:n}):null]}),r?(0,I.jsx)(`div`,{className:`flex shrink-0 items-center gap-2`,children:r}):null]})}function Wh({id:e,className:t,children:n}){return(0,I.jsx)(`section`,{id:e,className:H(`glass-card p-5`,t),children:n})}function Gh({icon:e=Ot,title:t,description:n,action:r}){return(0,I.jsxs)(`div`,{className:`rounded-lg border border-dashed border-border p-8 text-center`,children:[(0,I.jsx)(`div`,{className:`mx-auto mb-3 inline-flex size-10 items-center justify-center rounded-full bg-accent text-accent-foreground`,children:(0,I.jsx)(e,{className:`size-5`,"aria-hidden":!0})}),(0,I.jsx)(`h2`,{className:`text-lg`,children:t}),n?(0,I.jsx)(`p`,{className:`mx-auto mt-1 max-w-md text-sm text-muted-foreground`,children:n}):null,r?(0,I.jsx)(`div`,{className:`mt-4`,children:r}):null]})}function Kh({error:e}){let{language:t}=J(),n=e instanceof oc&&e.status===401;if(F.useEffect(()=>{if(!n||typeof window>`u`)return;let e=window.location.pathname+window.location.search;window.location.href=`/admin/sign-in?return=${encodeURIComponent(e)}`},[n]),n)return null;let r=e instanceof Error?e.message:`Unknown error.`;return(0,I.jsxs)(`div`,{className:`rounded-lg border border-destructive/30 bg-destructive/5 p-4 text-sm text-destructive`,children:[Y(t,`common.failedToLoad`),`: `,r]})}function qh({error:e}){let{language:t}=J(),n=e instanceof oc&&e.status===401;if(F.useEffect(()=>{if(!n||typeof window>`u`)return;let e=window.location.pathname+window.location.search;window.location.href=`/admin/sign-in?return=${encodeURIComponent(e)}`},[n]),n)return null;let r=e instanceof Error?e.message:String(e);return(0,I.jsxs)(`div`,{className:`rounded-lg border border-destructive/30 bg-destructive/5 p-4 text-sm text-destructive`,children:[(0,I.jsx)(`p`,{children:Y(t,`ops.error.executionFailed`)}),(0,I.jsxs)(`details`,{className:`group mt-2`,children:[(0,I.jsx)(`summary`,{className:`inline-flex cursor-pointer list-none items-center rounded-md border border-destructive/30 bg-card/40 px-2.5 py-1 text-xs font-semibold text-destructive/80 transition hover:bg-destructive/10`,children:Y(t,`ops.error.detailsLabel`)}),(0,I.jsx)(`p`,{className:`mt-2 max-w-3xl whitespace-pre-wrap break-words rounded-md border border-destructive/20 bg-card/30 p-3 font-mono text-xs leading-relaxed text-destructive/90`,children:r})]})]})}function Jh({description:e,summaryLabel:t,collapsedIntro:n}){return Yh(e)?(0,I.jsxs)(`div`,{className:`space-y-2`,children:[(0,I.jsx)(`p`,{children:n}),(0,I.jsxs)(`details`,{className:`group`,children:[(0,I.jsx)(`summary`,{className:`inline-flex cursor-pointer list-none items-center rounded-md border border-border bg-card/70 px-2.5 py-1 text-xs font-semibold text-foreground/70 transition hover:bg-accent hover:text-accent-foreground`,children:t}),(0,I.jsx)(`p`,{className:`mt-2 max-w-3xl rounded-md border border-border bg-card/55 p-3 text-xs leading-relaxed text-muted-foreground`,children:e})]})]}):(0,I.jsx)(I.Fragment,{children:e})}function Yh(e){return e.length>180||e.includes("`")}function Xh({label:e,value:t,href:n}){let{language:r}=J(),[i,a]=F.useState(!1);async function o(){try{await navigator.clipboard.writeText(t),a(!0),window.setTimeout(()=>a(!1),1400)}catch{a(!1)}}return(0,I.jsxs)(`div`,{className:`rounded-lg border border-border/70 bg-background/30 p-3`,children:[(0,I.jsxs)(`div`,{className:`mb-1 flex items-center justify-between gap-3`,children:[(0,I.jsx)(`span`,{className:`label-eyebrow`,children:e}),(0,I.jsxs)(`div`,{className:`flex items-center gap-1`,children:[n?(0,I.jsx)(U,{asChild:!0,variant:`ghost`,size:`icon`,className:`size-7`,children:(0,I.jsx)(`a`,{href:n,target:`_blank`,rel:`noreferrer`,"aria-label":`${Y(r,`common.open`)} ${e}`,children:(0,I.jsx)(Rt,{className:`size-3.5`,"aria-hidden":!0})})}):null,(0,I.jsx)(U,{type:`button`,variant:`ghost`,size:`icon`,className:`size-7`,onClick:o,"aria-label":`${Y(r,`common.copy`)} ${e}`,children:i?(0,I.jsx)(wt,{className:`size-3.5 text-[color:var(--success)]`,"aria-hidden":!0}):(0,I.jsx)(Pt,{className:`size-3.5`,"aria-hidden":!0})})]})]}),(0,I.jsx)(`code`,{className:`block truncate font-mono text-xs text-foreground`,children:t})]})}var Zh=[on,zt,Ft],Qh=`https://claude.ai/customize/connectors?modal=add-custom-connector`,$h=`https://claude.ai/new`;function eg(){let{language:e}=J(),t=L({queryKey:[`site`],queryFn:()=>q.get(`/site`)}),n=L({queryKey:[`collections`],queryFn:async()=>(await q.get(`/collections`)).collections}),r=(n.data??[]).filter(e=>!e.parent),i=t.data,a=i?.canonicalLocale??null;return(0,I.jsxs)(`div`,{className:`space-y-6`,children:[(0,I.jsx)(Uh,{eyebrow:Y(e,`console.eyebrow`),title:i?.brand??`AotterMantle`,description:i?Y(e,`console.description`,{title:i.title}):Y(e,`console.descriptionFallback`),actions:i?.publicUrl?(0,I.jsx)(U,{asChild:!0,variant:`outline`,children:(0,I.jsxs)(`a`,{href:i.publicUrl,target:`_blank`,rel:`noreferrer`,children:[(0,I.jsx)(Vt,{className:`size-4`,"aria-hidden":!0}),Y(e,`common.viewSite`)]})}):null}),t.isLoading?(0,I.jsx)(`div`,{className:`glass-card h-72 animate-pulse`}):t.isError?(0,I.jsx)(Kh,{error:t.error}):i?(0,I.jsxs)(Wh,{className:`overflow-hidden p-0`,children:[(0,I.jsxs)(`div`,{className:`flex flex-wrap items-start justify-between gap-4 border-b border-border/70 p-5`,children:[(0,I.jsxs)(`div`,{className:`flex items-start gap-3`,children:[(0,I.jsx)(`div`,{className:`rounded-xl bg-primary/15 p-2 text-primary`,children:(0,I.jsx)(St,{className:`size-5`,"aria-hidden":!0})}),(0,I.jsxs)(`div`,{children:[(0,I.jsx)(`h2`,{className:`text-lg`,children:Y(e,`console.connector.title`)}),(0,I.jsx)(`p`,{className:`text-sm text-muted-foreground`,children:Y(e,`console.connector.body`)})]})]}),(0,I.jsxs)(`div`,{className:`flex gap-2`,children:[(0,I.jsx)(`span`,{className:`badge-status bg-foreground text-background`,children:`Claude`}),(0,I.jsx)(`span`,{className:`badge-status bg-accent text-accent-foreground`,children:`MCP`})]})]}),(0,I.jsxs)(`div`,{className:`grid divide-y divide-border/70 md:grid-cols-3 md:divide-x md:divide-y-0`,children:[(0,I.jsxs)(`div`,{className:`flex min-w-0 flex-col gap-4 p-5`,children:[(0,I.jsx)(tg,{children:`1`}),(0,I.jsxs)(`div`,{children:[(0,I.jsx)(`h3`,{children:Y(e,`console.connector.step1.title`)}),(0,I.jsx)(`p`,{className:`mt-1 text-sm text-muted-foreground`,children:Y(e,`console.connector.step1.body`)})]}),(0,I.jsx)(`div`,{className:`mt-auto`,children:(0,I.jsx)(Xh,{label:Y(e,`console.connector.step1.label`),value:i.mcpUrl})})]}),(0,I.jsxs)(`div`,{className:`flex min-w-0 flex-col gap-4 p-5`,children:[(0,I.jsx)(tg,{children:`2`}),(0,I.jsxs)(`div`,{children:[(0,I.jsx)(`h3`,{children:Y(e,`console.connector.step2.title`)}),(0,I.jsx)(`p`,{className:`mt-1 text-sm text-muted-foreground`,children:Y(e,`console.connector.step2.body`)})]}),(0,I.jsx)(`div`,{className:`mt-auto`,children:(0,I.jsx)(U,{asChild:!0,variant:`outline`,children:(0,I.jsxs)(`a`,{href:Qh,target:`_blank`,rel:`noreferrer`,children:[(0,I.jsx)(Rt,{className:`size-4`,"aria-hidden":!0}),Y(e,`console.connector.step2.action`)]})})})]}),(0,I.jsxs)(`div`,{className:`flex min-w-0 flex-col gap-4 p-5`,children:[(0,I.jsx)(tg,{children:`3`}),(0,I.jsxs)(`div`,{children:[(0,I.jsx)(`h3`,{children:Y(e,`console.connector.step3.title`)}),(0,I.jsx)(`p`,{className:`mt-1 text-sm text-muted-foreground`,children:Y(e,`console.connector.step3.body`)})]}),(0,I.jsx)(`div`,{className:`mt-auto`,children:(0,I.jsx)(U,{asChild:!0,children:(0,I.jsxs)(`a`,{href:$h,target:`_blank`,rel:`noreferrer`,children:[Y(e,`console.connector.step3.action`),(0,I.jsx)(Rt,{className:`size-4`,"aria-hidden":!0})]})})})]})]})]}):null,(0,I.jsx)(`div`,{className:`grid grid-cols-1 gap-4`,children:(0,I.jsxs)(Wh,{className:`admin-dashboard-panel`,children:[(0,I.jsxs)(`div`,{className:`mb-4 flex items-start gap-3`,children:[(0,I.jsx)(`div`,{className:`rounded-xl bg-primary/15 p-2 text-primary`,children:(0,I.jsx)(on,{className:`size-5`,"aria-hidden":!0})}),(0,I.jsxs)(`div`,{children:[(0,I.jsx)(`h2`,{className:`text-lg`,children:Y(e,`console.workspace.title`)}),(0,I.jsx)(`p`,{className:`text-sm text-muted-foreground`,children:Y(e,`console.workspace.body`)})]})]}),(0,I.jsx)(`div`,{className:`grid grid-cols-1 gap-2 sm:grid-cols-3`,children:r.slice(0,3).map((t,n)=>(0,I.jsx)(ng,{href:`/admin/c/${encodeURIComponent(t.name)}`,icon:Zh[n%Zh.length],label:lc(t.title,e,a)??t.name},t.name))})]})}),(0,I.jsxs)(`section`,{children:[(0,I.jsx)(Uh,{eyebrow:Y(e,`console.collections.eyebrow`),title:Y(e,`console.collections.title`),description:Y(e,`console.collections.body`)}),n.isLoading&&(0,I.jsx)(`div`,{className:`grid grid-cols-1 gap-4 md:grid-cols-2 xl:grid-cols-3`,children:[0,1,2].map(e=>(0,I.jsx)(`div`,{className:`glass-card h-36 animate-pulse`},e))}),n.isError&&(0,I.jsx)(Kh,{error:n.error}),n.data&&r.length===0&&(0,I.jsx)(Gh,{icon:Ft,title:Y(e,`console.collections.emptyTitle`),description:Y(e,`console.collections.emptyBody`)}),r.length>0&&(0,I.jsx)(`div`,{className:`grid grid-cols-1 gap-4 md:grid-cols-2 xl:grid-cols-3`,children:r.map(t=>{let n=lc(t.title,e,a)??t.name,r=lc(t.description,e,a);return(0,I.jsxs)(`a`,{href:`/admin/c/${encodeURIComponent(t.name)}`,className:`glass-card card-lift block p-5 no-underline text-foreground`,children:[(0,I.jsxs)(`div`,{className:`mb-3 flex items-start justify-between gap-3`,children:[(0,I.jsxs)(`div`,{className:`min-w-0`,children:[(0,I.jsx)(`h2`,{className:`truncate text-lg`,title:n,children:n}),(0,I.jsx)(`p`,{className:`font-mono text-xs text-muted-foreground`,children:t.name})]}),(0,I.jsx)(zt,{className:`size-5 shrink-0 text-muted-foreground`,"aria-hidden":!0})]}),r?(0,I.jsx)(`p`,{className:`line-clamp-2 text-sm text-muted-foreground`,children:rg(r)}):(0,I.jsx)(`p`,{className:`text-sm text-muted-foreground`,children:Y(e,`console.collections.noDescription`)}),(0,I.jsxs)(`div`,{className:`mt-4 flex flex-wrap gap-2`,children:[t.hasTranslations?(0,I.jsx)(`span`,{className:`badge-status bg-[color-mix(in_srgb,var(--info)_16%,transparent)] text-[color:var(--info)]`,children:`i18n`}):null,t.mediaFields?.length?(0,I.jsx)(`span`,{className:`badge-status bg-[color-mix(in_srgb,var(--success)_16%,transparent)] text-[color:var(--success)]`,children:`media`}):null]})]},t.name)})})]})]})}function tg({children:e}){return(0,I.jsx)(`span`,{className:`inline-flex size-6 items-center justify-center rounded-full bg-foreground/10 text-xs font-semibold text-foreground`,children:e})}function ng({href:e,icon:t,label:n}){return(0,I.jsxs)(`a`,{href:e,title:n,className:`quick-action`,children:[(0,I.jsx)(t,{className:`size-4`,"aria-hidden":!0}),(0,I.jsx)(`span`,{children:n})]})}function rg(e){let t=/^(.*?(?:。|\. ))/.exec(e);return(t?t[1]:e).trim()}function ig({children:e,className:t}){return(0,I.jsx)(`div`,{className:H(`glass-card overflow-hidden`,t),children:(0,I.jsx)(`div`,{className:`overflow-x-auto`,children:(0,I.jsx)(`table`,{className:`w-full min-w-[720px] text-sm`,children:e})})})}function ag({children:e,className:t}){return(0,I.jsx)(`th`,{className:H(`label-eyebrow px-3 py-2 text-left`,t),children:e})}function og({children:e,className:t}){return(0,I.jsx)(`td`,{className:H(`px-3 py-2 align-middle`,t),children:e})}function sg({...e}){return(0,I.jsx)(ts,{"data-slot":`dialog`,...e})}function cg({...e}){return(0,I.jsx)(ss,{"data-slot":`dialog-portal`,...e})}function lg({className:e,...t}){return(0,I.jsx)(ls,{"data-slot":`dialog-overlay`,className:H(`fixed inset-0 z-50 bg-black/50 data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:animate-in data-[state=open]:fade-in-0`,e),...t})}function ug({className:e,children:t,showCloseButton:n=!0,...r}){return(0,I.jsxs)(cg,{children:[(0,I.jsx)(lg,{}),(0,I.jsxs)(ps,{"data-slot":`dialog-content`,className:H(`fixed left-1/2 top-1/2 z-50 grid w-full max-w-lg -translate-x-1/2 -translate-y-1/2 gap-4 rounded-xl border border-[var(--glass-border)] bg-background p-6 shadow-[var(--glass-shadow-lg)] transition ease-in-out data-[state=closed]:animate-out data-[state=closed]:duration-200 data-[state=open]:animate-in data-[state=open]:duration-200 data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95`,e),...r,children:[t,n&&(0,I.jsxs)(Ss,{className:`absolute top-4 right-4 rounded-xs opacity-70 ring-offset-background transition-opacity hover:opacity-100 focus:ring-2 focus:ring-ring focus:ring-offset-2 focus:outline-hidden disabled:pointer-events-none data-[state=open]:bg-secondary`,children:[(0,I.jsx)(Pn,{className:`size-4`}),(0,I.jsx)(`span`,{className:`sr-only`,children:`Close`})]})]})]})}function dg({className:e,...t}){return(0,I.jsx)(`div`,{"data-slot":`dialog-header`,className:H(`flex flex-col gap-1.5`,e),...t})}function fg({className:e,...t}){return(0,I.jsx)(`div`,{"data-slot":`dialog-footer`,className:H(`flex justify-end gap-2`,e),...t})}function pg({className:e,...t}){return(0,I.jsx)(vs,{"data-slot":`dialog-title`,className:H(`font-semibold text-foreground`,e),...t})}function mg({className:e,...t}){return(0,I.jsx)(bs,{"data-slot":`dialog-description`,className:H(`text-sm text-muted-foreground`,e),...t})}var hg=F.createContext(null);function gg({children:e}){let{language:t}=J(),[n,r]=F.useState(null),i=F.useCallback(e=>new Promise(t=>{r({...e,resolve:t})}),[]);function a(e){n?.resolve(e),r(null)}let o=F.useMemo(()=>({confirm:i}),[i]);return(0,I.jsxs)(hg.Provider,{value:o,children:[e,(0,I.jsx)(sg,{open:n!=null,onOpenChange:e=>{e||a(!1)},children:(0,I.jsxs)(ug,{children:[(0,I.jsxs)(dg,{children:[(0,I.jsx)(pg,{children:Y(t,`confirm.title`)}),(0,I.jsx)(mg,{children:n?.description})]}),(0,I.jsxs)(fg,{children:[(0,I.jsx)(U,{type:`button`,variant:`secondary`,onClick:()=>a(!1),children:Y(t,`confirm.cancel`)}),(0,I.jsx)(U,{type:`button`,variant:`destructive`,onClick:()=>a(!0),children:Y(t,`confirm.confirm`)})]})]})})]})}function _g(){let e=F.useContext(hg);if(!e)throw Error(`useConfirm() must be used within <ConfirmProvider>.`);return e.confirm}var vg={draft:`bg-muted text-muted-foreground`,review:`bg-[color-mix(in_srgb,var(--warning)_18%,transparent)] text-[color:var(--warning)]`,approved:`bg-[color-mix(in_srgb,var(--success)_18%,transparent)] text-[color:var(--success)]`,scheduled:`bg-[color-mix(in_srgb,var(--info)_18%,transparent)] text-[color:var(--info)]`,published:`bg-[color-mix(in_srgb,var(--success)_18%,transparent)] text-[color:var(--success)]`,archived:`bg-secondary text-muted-foreground`},yg={draft:`status.draft`,review:`status.review`,published:`status.published`,archived:`status.archived`};function bg({status:e,className:t}){let{language:n}=J(),r=xg(e),i=yg[e];return(0,I.jsx)(`span`,{className:H(`badge-status`,r?vg[e]:`bg-accent text-accent-foreground`,t),children:i?Y(n,i):e})}function xg(e){return e in vg}var Sg=new Intl.DateTimeFormat(void 0,{dateStyle:`short`,timeStyle:`short`});function Cg(e){return e?.[`x-mcp-hint`]===`money-minor`}function wg(e){return e?.[`x-mcp-hint`]===`timestamp-ms`}function Tg(e,t){if(typeof e!=`number`||!Number.isFinite(e))return null;let n=e/100;if(typeof t==`string`&&t)try{return new Intl.NumberFormat(void 0,{style:`currency`,currency:t}).format(n)}catch{}return new Intl.NumberFormat().format(n)}function Eg(e){if(typeof e!=`number`||!Number.isFinite(e))return null;try{return Sg.format(new Date(e))}catch{return null}}function Dg(e,t){return e===`money-minor`?Y(t,`field.hint.moneyMinor`):e===`timestamp-ms`?Y(t,`field.hint.timestampMs`):e}function Og(e,t=8){return e.length<=t?e:e.slice(-t)}function kg(e){if(e instanceof oc){let t=e.body?.diagnostic?.message;if(t)return Error(t)}return e}var Ag=F.createContext(null),jg=3200;function Mg({children:e}){let[t,n]=F.useState([]),r=F.useRef(0),i=F.useCallback(e=>{let t=r.current++;n(n=>[...n,{id:t,message:e}]),window.setTimeout(()=>{n(e=>e.filter(e=>e.id!==t))},jg)},[]),a=F.useMemo(()=>({showToast:i}),[i]);return(0,I.jsxs)(Ag.Provider,{value:a,children:[e,(0,I.jsx)(`div`,{className:`pointer-events-none fixed bottom-4 right-4 z-[100] flex flex-col gap-2`,role:`status`,"aria-live":`polite`,children:t.map(e=>(0,I.jsxs)(`div`,{className:H(`pointer-events-auto flex items-center gap-2 rounded-lg border border-[var(--glass-border)] bg-background px-4 py-3 text-sm shadow-[var(--glass-shadow-lg)]`,`animate-in slide-in-from-bottom-2 fade-in-0 duration-200`),children:[(0,I.jsx)(kt,{className:`size-4 shrink-0 text-[color:var(--success)]`,"aria-hidden":!0}),(0,I.jsx)(`span`,{className:`text-foreground`,children:e.message})]},e.id))})]})}function Ng(){let e=F.useContext(Ag);if(!e)throw Error(`useToast() must be used within <ToastProvider>.`);return e}async function Pg(e){let t=Fg(e.purposes,e.preferredPurpose);if(!t)throw Error(`No media upload purpose is configured for this site.`);let n=await Rg(e.file,t,e.language??`en`),r=await q.post(`/media/uploads`,{filename:e.file.name,purpose:t.name,variants:n.map(e=>({mimeType:e.mimeType,byteSize:e.blob.size,role:e.role})),alt:e.alt??Jg(e.file),caption:e.caption});for(let e of n){let t=r.capabilities.find(t=>t.mimeType===e.mimeType&&t.role===e.role);if(!t)throw Error(`Upload capability missing for ${e.mimeType}.`);await fetch(t.uploadUrl,{method:t.method,headers:t.requiredHeaders??{"Content-Type":e.mimeType},body:e.blob})}return q.post(`/media/uploads/${encodeURIComponent(r.uploadGroupId)}/commit`,{alt:e.alt??Jg(e.file),caption:e.caption})}function Fg(e,t){if(t){let n=e.find(e=>e.name===t);if(n)return n}return e.find(e=>e.name===`content`)??e[0]??null}function Ig(e,t,n){let r=n[n.length-1]??``,i=qg(t.replace(/-translations$/,``)),a=[];/cover/i.test(r)&&a.push(`${i}-cover`),/image|asset|media/i.test(r)&&(a.push(`${i}-image`),a.push(`${i}-media`)),a.push(`content`);for(let t of a)if(e.some(e=>e.name===t))return t;return e[0]?.name}function Lg(e){return(e.variants.find(e=>e.role===`primary`)??e.variants[0])?.publicUrl??null}async function Rg(e,t,n){if(!e.type.startsWith(`image/`)||e.type===`image/svg+xml`)throw Error(`Only raster image uploads are supported in the admin UI.`);let r=zg(t.required);if(r.length===0)throw Error(`Media purpose '${t.name}' does not declare required image variants.`);let i=await createImageBitmap(e);try{let e=await Promise.all(r.map(e=>Ug(e,t,n))),a=e.find(Kg)??e[0],o=[];for(let r of e){let e=t.maxBytes[r]??2**53-1;o.push({mimeType:r,role:r===a?`primary`:`alternate`,blob:await Wg(i,r,e,n)})}return o}finally{i.close?.()}}function zg(e){return e.map(e=>e.split(`,`).map(Bg).filter(e=>!!e)).filter(e=>e.length>0)}function Bg(e){let t=e.trim().toLowerCase();return t?t===`jpg`||t===`jpeg`||t===`image/jpg`?`image/jpeg`:t===`png`?`image/png`:t===`webp`?`image/webp`:t===`avif`?`image/avif`:t===`gif`?`image/gif`:t.includes(`/`)?t:null:null}var Vg=new Map;function Hg(e){let t=Vg.get(e);return t||(t=(async()=>{try{let t=document.createElement(`canvas`);return t.width=1,t.height=1,(await new Promise(n=>t.toBlob(n,e)))?.type===e}catch{return!0}})(),Vg.set(e,t)),t}async function Ug(e,t,n){for(let n of e)if(n.startsWith(`image/`)&&t.maxBytes[n]!=null&&await Hg(n))return n;let r=e.find(e=>e.startsWith(`image/`)&&t.maxBytes[e]!=null);throw Error(Y(n,`media.encoderUnsupported`,{mime:r??e[0]??`?`}))}async function Wg(e,t,n,r){let i=1,a=t===`image/jpeg`?[.88,.78,.68,.58]:[.78,.68,.58,.48],o=null;for(let s=0;s<6;s+=1){for(let c of a){let a=await Gg(e,t,i,c);if(a.type!==t){if(s===0&&o===null)throw Error(Y(r,`media.encoderUnsupported`,{mime:t}));continue}if(o=a,a.size<=n)return a}i*=.82}if(o)return o;throw Error(`This browser cannot encode ${t}.`)}async function Gg(e,t,n,r){let i=document.createElement(`canvas`);i.width=Math.max(1,Math.round(e.width*n)),i.height=Math.max(1,Math.round(e.height*n));let a=i.getContext(`2d`);if(!a)throw Error(`Could not prepare image upload.`);a.drawImage(e,0,0,i.width,i.height);let o=await new Promise(e=>i.toBlob(e,t,r));if(!o)throw Error(`This browser cannot encode ${t}.`);return o}function Kg(e){return e===`image/jpeg`||e===`image/png`||e===`image/gif`}function qg(e){return e.endsWith(`ies`)?`${e.slice(0,-3)}y`:e.endsWith(`ses`)?e.slice(0,-2):e.endsWith(`s`)&&e.length>1?e.slice(0,-1):e}function Jg(e){return e.name.replace(/\.[^.]+$/,``)}function Yg({value:e,onChange:t,compact:n=!1}){let{language:r}=J(),i=F.useRef(null),a=F.useRef(null),[o,s]=F.useState(!1),[c,l]=F.useState(!1),[u,d]=F.useState(!1),[f,p]=F.useState(null),m=L({queryKey:[`site`],queryFn:()=>q.get(`/site`)}),h=F.useCallback((n,r=``,a=``)=>{let o=i.current;if(!o){t(`${e}${n}${a}${r}`);return}let s=o.selectionStart,c=o.selectionEnd,l=e.slice(s,c)||a;t(`${e.slice(0,s)}${n}${l}${r}${e.slice(c)}`),window.requestAnimationFrame(()=>{o.focus();let e=s+n.length,t=e+l.length;o.setSelectionRange(e,t)})},[t,e]),g=F.useCallback(t=>{let n=e.endsWith(`
|
|
135
|
+
`},Fo=0,Io=[];function Lo(e){var t=F.useRef([]),n=F.useRef([0,0]),r=F.useRef(),i=F.useState(Fo++)[0],a=F.useState(ao)[0],o=F.useRef(e);F.useEffect(function(){o.current=e},[e]),F.useEffect(function(){if(e.inert){document.body.classList.add(`block-interactivity-${i}`);var t=Pa([e.lockRef.current],(e.shards||[]).map(Mo),!0).filter(Boolean);return t.forEach(function(e){return e.classList.add(`allow-interactivity-${i}`)}),function(){document.body.classList.remove(`block-interactivity-${i}`),t.forEach(function(e){return e.classList.remove(`allow-interactivity-${i}`)})}}},[e.inert,e.lockRef.current,e.shards]);var s=F.useCallback(function(e,t){if(`touches`in e&&e.touches.length===2||e.type===`wheel`&&e.ctrlKey)return!o.current.allowPinchZoom;var i=Ao(e),a=n.current,s=`deltaX`in e?e.deltaX:a[0]-i[0],c=`deltaY`in e?e.deltaY:a[1]-i[1],l,u=e.target,d=Math.abs(s)>Math.abs(c)?`h`:`v`;if(`touches`in e&&d===`h`&&u.type===`range`)return!1;var f=window.getSelection(),p=f&&f.anchorNode;if(p&&(p===u||p.contains(u)))return!1;var m=Co(d,u);if(!m)return!0;if(m?l=d:(l=d===`v`?`h`:`v`,m=Co(d,u)),!m)return!1;if(!r.current&&`changedTouches`in e&&(s||c)&&(r.current=l),!l)return!0;var h=r.current||l;return ko(h,t,e,h===`h`?s:c,!0)},[]),c=F.useCallback(function(e){var n=e;if(!(!Io.length||Io[Io.length-1]!==a)){var r=`deltaY`in n?jo(n):Ao(n),i=t.current.filter(function(e){return e.name===n.type&&(e.target===n.target||n.target===e.shadowParent)&&No(e.delta,r)})[0];if(i&&i.should){n.cancelable&&n.preventDefault();return}if(!i){var c=(o.current.shards||[]).map(Mo).filter(Boolean).filter(function(e){return e.contains(n.target)});(c.length>0?s(n,c[0]):!o.current.noIsolation)&&n.cancelable&&n.preventDefault()}}},[]),l=F.useCallback(function(e,n,r,i){var a={name:e,delta:n,target:r,should:i,shadowParent:Ro(r)};t.current.push(a),setTimeout(function(){t.current=t.current.filter(function(e){return e!==a})},1)},[]),u=F.useCallback(function(e){n.current=Ao(e),r.current=void 0},[]),d=F.useCallback(function(t){l(t.type,jo(t),t.target,s(t,e.lockRef.current))},[]),f=F.useCallback(function(t){l(t.type,Ao(t),t.target,s(t,e.lockRef.current))},[]);F.useEffect(function(){return Io.push(a),e.setCallbacks({onScrollCapture:d,onWheelCapture:d,onTouchMoveCapture:f}),document.addEventListener(`wheel`,c,vo),document.addEventListener(`touchmove`,c,vo),document.addEventListener(`touchstart`,u,vo),function(){Io=Io.filter(function(e){return e!==a}),document.removeEventListener(`wheel`,c,vo),document.removeEventListener(`touchmove`,c,vo),document.removeEventListener(`touchstart`,u,vo)}},[]);var p=e.removeScrollBar,m=e.inert;return F.createElement(F.Fragment,null,m?F.createElement(a,{styles:Po(i)}):null,p?F.createElement(ho,{noRelative:e.noRelative,gapMode:e.gapMode}):null)}function Ro(e){for(var t=null;e!==null;)e instanceof ShadowRoot&&(t=e.host,e=e.host),e=e.parentNode;return t}var zo=Ja(Ya,Lo),Bo=F.forwardRef(function(e,t){return F.createElement(Za,Ma({},e,{ref:t,sideCar:zo}))});Bo.classNames=Za.classNames;var Vo=function(e){return typeof document>`u`?null:(Array.isArray(e)?e[0]:e).ownerDocument.body},Ho=new WeakMap,Uo=new WeakMap,Wo={},Go=0,Ko=function(e){return e&&(e.host||Ko(e.parentNode))},qo=function(e,t){return t.map(function(t){if(e.contains(t))return t;var n=Ko(t);return n&&e.contains(n)?n:(console.error(`aria-hidden`,t,`in not contained inside`,e,`. Doing nothing`),null)}).filter(function(e){return!!e})},Jo=function(e,t,n,r){var i=qo(t,Array.isArray(e)?e:[e]);Wo[n]||(Wo[n]=new WeakMap);var a=Wo[n],o=[],s=new Set,c=new Set(i),l=function(e){!e||s.has(e)||(s.add(e),l(e.parentNode))};i.forEach(l);var u=function(e){!e||c.has(e)||Array.prototype.forEach.call(e.children,function(e){if(s.has(e))u(e);else try{var t=e.getAttribute(r),i=t!==null&&t!==`false`,c=(Ho.get(e)||0)+1,l=(a.get(e)||0)+1;Ho.set(e,c),a.set(e,l),o.push(e),c===1&&i&&Uo.set(e,!0),l===1&&e.setAttribute(n,`true`),i||e.setAttribute(r,`true`)}catch(t){console.error(`aria-hidden: cannot operate on `,e,t)}})};return u(t),s.clear(),Go++,function(){o.forEach(function(e){var t=Ho.get(e)-1,i=a.get(e)-1;Ho.set(e,t),a.set(e,i),t||(Uo.has(e)||e.removeAttribute(r),Uo.delete(e)),i||e.removeAttribute(n)}),Go--,Go||(Ho=new WeakMap,Ho=new WeakMap,Uo=new WeakMap,Wo={})}},Yo=function(e,t,n){n===void 0&&(n=`data-aria-hidden`);var r=Array.from(Array.isArray(e)?e:[e]),i=t||Vo(e);return i?(r.push.apply(r,Array.from(i.querySelectorAll(`[aria-live], script`))),Jo(r,i,n,`aria-hidden`)):function(){return null}},Xo=`Dialog`,[Zo,Qo]=G(Xo),[$o,es]=Zo(Xo),ts=e=>{let{__scopeDialog:t,children:n,open:r,defaultOpen:i,onOpenChange:a,modal:o=!0}=e,s=F.useRef(null),c=F.useRef(null),[l,u]=Fi({prop:r,defaultProp:i??!1,onChange:a,caller:Xo});return(0,I.jsx)($o,{scope:t,triggerRef:s,contentRef:c,contentId:Ni(),titleId:Ni(),descriptionId:Ni(),open:l,onOpenChange:u,onOpenToggle:F.useCallback(()=>u(e=>!e),[u]),modal:o,children:n})};ts.displayName=Xo;var ns=`DialogTrigger`,rs=F.forwardRef((e,t)=>{let{__scopeDialog:n,...r}=e,i=es(ns,n),a=Un(t,i.triggerRef);return(0,I.jsx)(zi.button,{type:`button`,"aria-haspopup":`dialog`,"aria-expanded":i.open,"aria-controls":i.open?i.contentId:void 0,"data-state":Cs(i.open),...r,ref:a,onClick:W(e.onClick,i.onOpenToggle)})});rs.displayName=ns;var is=`DialogPortal`,[as,os]=Zo(is,{forceMount:void 0}),ss=e=>{let{__scopeDialog:t,forceMount:n,children:r,container:i}=e,a=es(is,t);return(0,I.jsx)(as,{scope:t,forceMount:n,children:F.Children.map(r,e=>(0,I.jsx)(Sa,{present:n||a.open,children:(0,I.jsx)(ba,{asChild:!0,container:i,children:e})}))})};ss.displayName=is;var cs=`DialogOverlay`,ls=F.forwardRef((e,t)=>{let n=os(cs,e.__scopeDialog),{forceMount:r=n.forceMount,...i}=e,a=es(cs,e.__scopeDialog);return a.modal?(0,I.jsx)(Sa,{present:r||a.open,children:(0,I.jsx)(ds,{...i,ref:t})}):null});ls.displayName=cs;var us=Wn(`DialogOverlay.RemoveScroll`),ds=F.forwardRef((e,t)=>{let{__scopeDialog:n,...r}=e,i=es(cs,n),a=Un(t,Zi());return(0,I.jsx)(Bo,{as:us,allowPinchZoom:!0,shards:[i.contentRef],children:(0,I.jsx)(zi.div,{"data-state":Cs(i.open),...r,ref:a,style:{pointerEvents:`auto`,...r.style}})})}),fs=`DialogContent`,ps=F.forwardRef((e,t)=>{let n=os(fs,e.__scopeDialog),{forceMount:r=n.forceMount,...i}=e,a=es(fs,e.__scopeDialog);return(0,I.jsx)(Sa,{present:r||a.open,children:a.modal?(0,I.jsx)(ms,{...i,ref:t}):(0,I.jsx)(hs,{...i,ref:t})})});ps.displayName=fs;var ms=F.forwardRef((e,t)=>{let n=es(fs,e.__scopeDialog),r=F.useRef(null),i=Un(t,n.contentRef,r);return F.useEffect(()=>{let e=r.current;if(e)return Yo(e)},[]),(0,I.jsx)(gs,{...e,ref:i,trapFocus:n.open,disableOutsidePointerEvents:n.open,onCloseAutoFocus:W(e.onCloseAutoFocus,e=>{e.preventDefault(),n.triggerRef.current?.focus()}),onPointerDownOutside:W(e.onPointerDownOutside,e=>{let t=e.detail.originalEvent,n=t.button===0&&t.ctrlKey===!0;(t.button===2||n)&&e.preventDefault()}),onFocusOutside:W(e.onFocusOutside,e=>e.preventDefault())})}),hs=F.forwardRef((e,t)=>{let n=es(fs,e.__scopeDialog),r=F.useRef(!1),i=F.useRef(!1);return(0,I.jsx)(gs,{...e,ref:t,trapFocus:!1,disableOutsidePointerEvents:!1,onCloseAutoFocus:t=>{e.onCloseAutoFocus?.(t),t.defaultPrevented||(r.current||n.triggerRef.current?.focus(),t.preventDefault()),r.current=!1,i.current=!1},onInteractOutside:t=>{e.onInteractOutside?.(t),t.defaultPrevented||(r.current=!0,t.detail.originalEvent.type===`pointerdown`&&(i.current=!0));let a=t.target;n.triggerRef.current?.contains(a)&&t.preventDefault(),t.detail.originalEvent.type===`focusin`&&i.current&&t.preventDefault()}})}),gs=F.forwardRef((e,t)=>{let{__scopeDialog:n,trapFocus:r,onOpenAutoFocus:i,onCloseAutoFocus:a,...o}=e,s=es(fs,n);return Aa(),(0,I.jsx)(I.Fragment,{children:(0,I.jsx)(sa,{asChild:!0,loop:!0,trapped:r,onMountAutoFocus:i,onUnmountAutoFocus:a,children:(0,I.jsx)(Ji,{role:`dialog`,id:s.contentId,"aria-describedby":s.descriptionId,"aria-labelledby":s.titleId,"data-state":Cs(s.open),...o,ref:t,deferPointerDownOutside:!0,onDismiss:()=>s.onOpenChange(!1)})})})}),_s=`DialogTitle`,vs=F.forwardRef((e,t)=>{let{__scopeDialog:n,...r}=e,i=es(_s,n);return(0,I.jsx)(zi.h2,{id:i.titleId,...r,ref:t})});vs.displayName=_s;var ys=`DialogDescription`,bs=F.forwardRef((e,t)=>{let{__scopeDialog:n,...r}=e,i=es(ys,n);return(0,I.jsx)(zi.p,{id:i.descriptionId,...r,ref:t})});bs.displayName=ys;var xs=`DialogClose`,Ss=F.forwardRef((e,t)=>{let{__scopeDialog:n,...r}=e,i=es(xs,n);return(0,I.jsx)(zi.button,{type:`button`,...r,ref:t,onClick:W(e.onClick,()=>i.onOpenChange(!1))})});Ss.displayName=xs;function Cs(e){return e?`open`:`closed`}function ws({...e}){return(0,I.jsx)(ts,{"data-slot":`sheet`,...e})}function Ts({...e}){return(0,I.jsx)(ss,{"data-slot":`sheet-portal`,...e})}function Es({className:e,...t}){return(0,I.jsx)(ls,{"data-slot":`sheet-overlay`,className:H(`fixed inset-0 z-50 bg-black/50 data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:animate-in data-[state=open]:fade-in-0`,e),...t})}function Ds({className:e,children:t,side:n=`right`,...r}){return(0,I.jsxs)(Ts,{children:[(0,I.jsx)(Es,{}),(0,I.jsxs)(ps,{"data-slot":`sheet-content`,className:H(`fixed z-50 flex flex-col gap-4 bg-background shadow-lg transition ease-in-out data-[state=closed]:animate-out data-[state=closed]:duration-300 data-[state=open]:animate-in data-[state=open]:duration-500`,n===`right`&&`inset-y-0 right-0 h-full w-3/4 shadow-[-12px_0_32px_-12px_rgba(0,0,0,0.4)] data-[state=closed]:slide-out-to-right data-[state=open]:slide-in-from-right sm:max-w-sm`,n===`left`&&`inset-y-0 left-0 h-full w-3/4 shadow-[12px_0_32px_-12px_rgba(0,0,0,0.4)] data-[state=closed]:slide-out-to-left data-[state=open]:slide-in-from-left sm:max-w-sm`,e),...r,children:[t,(0,I.jsxs)(Ss,{className:`absolute top-4 right-4 rounded-xs opacity-70 ring-offset-background transition-opacity hover:opacity-100 focus:ring-2 focus:ring-ring focus:ring-offset-2 focus:outline-hidden disabled:pointer-events-none data-[state=open]:bg-secondary`,children:[(0,I.jsx)(Pn,{className:`size-4`}),(0,I.jsx)(`span`,{className:`sr-only`,children:`Close`})]})]})]})}function Os({className:e,...t}){return(0,I.jsx)(`div`,{"data-slot":`sheet-header`,className:H(`flex flex-col gap-1.5 p-4`,e),...t})}function ks({className:e,...t}){return(0,I.jsx)(vs,{"data-slot":`sheet-title`,className:H(`font-semibold text-foreground`,e),...t})}function As({className:e,...t}){return(0,I.jsx)(bs,{"data-slot":`sheet-description`,className:H(`text-sm text-muted-foreground`,e),...t})}var js=`16rem`,Ms=`3.25rem`,Ns=`18rem`,Ps=`b`,Fs=`sidebar_state`,Is=3600*24*7;function Ls(){if(typeof document>`u`)return null;let e=document.cookie.match(RegExp(`(?:^|;\\s*)${Fs}=([^;]+)`)),t=e?decodeURIComponent(e[1]):null;return t===`true`||t!==`false`&&null}function Rs(e){typeof document>`u`||(document.cookie=`${Fs}=${String(e)}; Path=/; Max-Age=${Is}; SameSite=Lax`)}var zs=F.createContext(null);function Bs(){let[e,t]=F.useState(!1);return F.useEffect(()=>{let e=window.matchMedia(`(max-width: 767px)`),n=()=>t(window.innerWidth<768);return e.addEventListener(`change`,n),t(window.innerWidth<768),()=>e.removeEventListener(`change`,n)},[]),e}function Vs({defaultOpen:e=!0,className:t,style:n,children:r,...i}){let a=Bs(),[o,s]=F.useState(!1),[c,l]=F.useState(e),u=F.useCallback(e=>{Rs(e),l(e)},[]),d=F.useCallback(()=>a?s(e=>!e):u(!c),[a,c,u]);F.useEffect(()=>{let e=e=>{e.key===Ps&&(e.metaKey||e.ctrlKey)&&(e.preventDefault(),d())};return window.addEventListener(`keydown`,e),()=>window.removeEventListener(`keydown`,e)},[d]);let f=c?`expanded`:`collapsed`,p=F.useMemo(()=>({state:f,open:c,setOpen:u,isMobile:a,openMobile:o,setOpenMobile:s,toggleSidebar:d}),[f,c,u,a,o,d]);return(0,I.jsx)(zs.Provider,{value:p,children:(0,I.jsx)(`div`,{"data-slot":`sidebar-wrapper`,style:{"--sidebar-width":js,"--sidebar-width-icon":Ms,...n},className:H(`group/sidebar-wrapper flex min-h-svh w-full rtl:flex-row-reverse`,t),...i,children:r})})}function Hs(){let e=F.useContext(zs);if(!e)throw Error(`useSidebar must be used within a SidebarProvider.`);return e}function Us({side:e=`left`,className:t,children:n,...r}){let{isMobile:i,state:a,openMobile:o,setOpenMobile:s}=Hs();return i?(0,I.jsx)(ws,{open:o,onOpenChange:s,...r,children:(0,I.jsxs)(Ds,{"data-sidebar":`sidebar`,"data-slot":`sidebar`,"data-mobile":`true`,className:`w-(--sidebar-width) glass-strip p-0 text-sidebar-foreground [&>button]:hidden`,style:{"--sidebar-width":Ns},side:e,children:[(0,I.jsxs)(Os,{className:`sr-only`,children:[(0,I.jsx)(ks,{children:`Sidebar`}),(0,I.jsx)(As,{children:`Displays the mobile sidebar.`})]}),(0,I.jsx)(`div`,{className:`flex h-full w-full flex-col`,children:n})]})}):(0,I.jsxs)(`div`,{className:`group peer hidden text-sidebar-foreground md:block`,"data-state":a,"data-side":e,"data-slot":`sidebar`,children:[(0,I.jsx)(`div`,{"data-slot":`sidebar-gap`,className:`relative w-(--sidebar-width) bg-transparent transition-[width] duration-200 group-data-[state=collapsed]:w-(--sidebar-width-icon)`}),(0,I.jsx)(`div`,{"data-slot":`sidebar-container`,className:H(`fixed inset-y-0 z-10 hidden h-svh w-(--sidebar-width) transition-[width] duration-200 md:flex group-data-[state=collapsed]:w-(--sidebar-width-icon)`,e===`left`?`left-0`:`right-0`,t),...r,children:(0,I.jsx)(`div`,{"data-sidebar":`sidebar`,"data-slot":`sidebar-inner`,className:`glass-strip flex h-full w-full flex-col`,children:n})})]})}function Ws({className:e,onClick:t,...n}){let{toggleSidebar:r}=Hs();return(0,I.jsxs)(U,{"data-sidebar":`trigger`,"data-slot":`sidebar-trigger`,variant:`ghost`,size:`icon`,className:H(`size-7`,e),onClick:e=>{t?.(e),r()},...n,children:[(0,I.jsx)(an,{}),(0,I.jsx)(`span`,{className:`sr-only`,children:`Toggle Sidebar`})]})}function Gs({className:e,...t}){return(0,I.jsx)(`main`,{"data-slot":`sidebar-inset`,className:H(`relative flex w-full min-w-0 flex-1 flex-col overflow-x-clip bg-background`,e),...t})}function Ks({className:e,...t}){return(0,I.jsx)(`div`,{"data-slot":`sidebar-header`,"data-sidebar":`header`,className:H(`flex flex-col gap-2 p-2`,e),...t})}function qs({className:e,...t}){return(0,I.jsx)(`div`,{"data-slot":`sidebar-content`,"data-sidebar":`content`,className:H(`flex min-h-0 flex-1 flex-col gap-2 overflow-auto`,e),...t})}function Js({className:e,...t}){return(0,I.jsx)(`div`,{"data-slot":`sidebar-footer`,"data-sidebar":`footer`,className:H(`flex flex-col gap-2 p-2`,e),...t})}function Ys({className:e,...t}){return(0,I.jsx)(`hr`,{"data-slot":`sidebar-separator`,"data-sidebar":`separator`,className:H(`mx-4 my-1 h-px w-auto border-0`,`bg-linear-to-r from-transparent via-[color-mix(in_srgb,var(--primary)_24%,transparent)] to-transparent`,`opacity-70 dark:via-[color-mix(in_srgb,var(--palette-teal-light)_18%,transparent)]`,e),...t})}function Xs({className:e,...t}){return(0,I.jsx)(`div`,{"data-slot":`sidebar-group`,"data-sidebar":`group`,className:H(`relative flex w-full min-w-0 flex-col p-2`,e),...t})}function Zs({className:e,...t}){return(0,I.jsx)(`div`,{"data-slot":`sidebar-group-label`,"data-sidebar":`group-label`,className:H(`flex h-8 shrink-0 items-center rounded-md px-2 text-xs font-medium text-sidebar-foreground/70`,e),...t})}function Qs({className:e,...t}){return(0,I.jsx)(`ul`,{"data-slot":`sidebar-menu`,"data-sidebar":`menu`,className:H(`flex w-full min-w-0 flex-col gap-1`,e),...t})}function $s({className:e,...t}){return(0,I.jsx)(`li`,{"data-slot":`sidebar-menu-item`,"data-sidebar":`menu-item`,className:H(`group/menu-item relative`,e),...t})}var ec=Bn(`peer/menu-button relative flex w-full items-center gap-2 overflow-hidden rounded-md p-2 text-left text-sm outline-hidden hover:bg-sidebar-accent hover:text-sidebar-accent-foreground active:bg-sidebar-accent active:text-sidebar-accent-foreground disabled:pointer-events-none disabled:opacity-50 data-[active=true]:bg-sidebar-accent data-[active=true]:font-medium data-[active=true]:text-sidebar-accent-foreground data-[state=open]:hover:bg-sidebar-accent data-[state=open]:hover:text-sidebar-accent-foreground [&>span:last-child]:truncate [&>svg]:size-4 [&>svg]:shrink-0`,{variants:{size:{default:`h-8 text-sm`,sm:`h-7 text-xs`,lg:`h-12 text-sm`}},defaultVariants:{size:`default`}});function tc({asChild:e=!1,isActive:t=!1,size:n=`default`,className:r,...i}){return(0,I.jsx)(e?Gn:`button`,{"data-slot":`sidebar-menu-button`,"data-sidebar":`menu-button`,"data-size":n,"data-active":t,className:H(ec({size:n}),r),...i})}function nc({className:e,...t}){return(0,I.jsx)(`ul`,{"data-slot":`sidebar-menu-sub`,"data-sidebar":`menu-sub`,className:H(`mx-3.5 flex min-w-0 translate-x-px flex-col gap-1 border-l border-sidebar-border px-2.5 py-0.5 rtl:-translate-x-px rtl:border-l-0 rtl:border-r`,e),...t})}function rc({className:e,...t}){return(0,I.jsx)(`li`,{"data-slot":`sidebar-menu-sub-item`,"data-sidebar":`menu-sub-item`,className:H(`group/menu-sub-item relative`,e),...t})}function ic({asChild:e=!1,size:t=`md`,isActive:n=!1,className:r,...i}){return(0,I.jsx)(e?Gn:`a`,{"data-slot":`sidebar-menu-sub-button`,"data-sidebar":`menu-sub-button`,"data-size":t,"data-active":n,className:H(`flex h-7 min-w-0 -translate-x-px items-center gap-2 overflow-hidden rounded-md px-2 text-sidebar-foreground outline-hidden hover:bg-sidebar-accent hover:text-sidebar-accent-foreground active:bg-sidebar-accent active:text-sidebar-accent-foreground disabled:pointer-events-none disabled:opacity-50 data-[active=true]:bg-sidebar-accent data-[active=true]:text-sidebar-accent-foreground data-[active=true]:font-medium [&>span:last-child]:truncate [&>svg]:size-4 [&>svg]:shrink-0`,`rtl:translate-x-px`,t===`sm`&&`text-xs`,t===`md`&&`text-sm`,r),...i})}var ac=`/admin/api`,oc=class extends Error{status;body;constructor(e,t,n){super(e),this.status=t,this.body=n,this.name=`ApiError`}};async function sc(e,t){let n=await fetch(`${ac}${e}`,{credentials:`same-origin`,...t,headers:{Accept:`application/json`,...t?.headers??{}}}),r=await n.text(),i=null;if(r)try{i=JSON.parse(r)}catch{i=r}if(!n.ok)throw new oc(`${n.status} ${n.statusText}`,n.status,i);return i}var q={get:e=>sc(e),post:(e,t)=>sc(e,cc(`POST`,t)),patch:(e,t)=>sc(e,cc(`PATCH`,t)),delete:e=>sc(e,{method:`DELETE`})};function cc(e,t){return{method:e,headers:{"Content-Type":`application/json`},body:t===void 0?void 0:JSON.stringify(t)}}function lc(e,t,n){if(e==null)return null;if(typeof e==`string`)return e;if(Object.prototype.hasOwnProperty.call(e,t))return e[t];if(n&&Object.prototype.hasOwnProperty.call(e,n))return e[n];let r=Object.keys(e)[0];return r===void 0?null:e[r]}function uc(e){return e.replace(/([a-z0-9])([A-Z])/g,`$1 $2`).replace(/[_-]+/g,` `).replace(/\b\w/g,e=>e.toUpperCase())}function dc(e,t,n,r){return lc(t?.title,n,r)??uc(e)}function fc(e,t,n){return lc(e?.description,t,n)??void 0}function pc(){return{queryKey:[`views-manifest`],queryFn:async()=>(await q.get(`/views-manifest`)).views}}function mc(){return{queryKey:[`operations`],queryFn:async()=>(await q.get(`/operations`)).operations}}var hc=[`draft`,`review`,`published`,`archived`],gc=[`draft`,`published`,`archived`],_c=F.createContext(null);function vc(){return typeof window>`u`?{pathname:`/admin`,search:``}:{pathname:window.location.pathname,search:window.location.search}}function yc(e){if(typeof window>`u`)return!1;let t=new URL(e,window.location.href);return!(t.origin!==window.location.origin||!t.pathname.startsWith(`/admin`)||t.pathname.startsWith(`/admin/api/`)||t.pathname.startsWith(`/admin/auth/`))}function bc({children:e}){let[t,n]=F.useState(vc),r=F.useCallback((e,t={})=>{if(typeof window>`u`)return;let r=new URL(e,window.location.href),i=`${r.pathname}${r.search}${r.hash}`;i!==`${window.location.pathname}${window.location.search}${window.location.hash}`&&(t.replace?window.history.replaceState(null,``,i):window.history.pushState(null,``,i));let a={pathname:r.pathname,search:r.search};(0,Ri.flushSync)(()=>n(a))},[]);F.useEffect(()=>{let e=()=>n(vc());return window.addEventListener(`popstate`,e),()=>window.removeEventListener(`popstate`,e)},[]),F.useEffect(()=>{let e=e=>{if(e.defaultPrevented||e.button!==0||e.metaKey||e.ctrlKey||e.shiftKey||e.altKey)return;let t=e.target;if(!(t instanceof Element))return;let n=t.closest(`a[href]`);n instanceof HTMLAnchorElement&&(n.target&&n.target!==`_self`||n.hasAttribute(`download`)||yc(n.href)&&(e.preventDefault(),r(n.href)))};return document.addEventListener(`click`,e,{capture:!0}),()=>document.removeEventListener(`click`,e,{capture:!0})},[r]);let i=F.useMemo(()=>({location:t,navigate:r}),[t,r]);return(0,I.jsx)(_c.Provider,{value:i,children:e})}function xc(){let e=F.useContext(_c);if(!e)throw Error(`useAdminRouter must be used inside AdminRouterProvider.`);return e}function Sc(){return xc().location}var Cc=[{value:`en`,label:`English`,nativeLabel:`English`,htmlLang:`en`,direction:`ltr`},{value:`de`,label:`German`,nativeLabel:`Deutsch`,htmlLang:`de`,direction:`ltr`},{value:`es`,label:`Spanish`,nativeLabel:`Español`,htmlLang:`es`,direction:`ltr`},{value:`fr`,label:`French`,nativeLabel:`Français`,htmlLang:`fr`,direction:`ltr`},{value:`it`,label:`Italian`,nativeLabel:`Italiano`,htmlLang:`it`,direction:`ltr`},{value:`ja`,label:`Japanese`,nativeLabel:`日本語`,htmlLang:`ja`,direction:`ltr`},{value:`ko`,label:`Korean`,nativeLabel:`한국어`,htmlLang:`ko`,direction:`ltr`},{value:`pt-BR`,label:`Portuguese (Brazil)`,nativeLabel:`Português (BR)`,htmlLang:`pt-BR`,direction:`ltr`},{value:`ru`,label:`Russian`,nativeLabel:`Русский`,htmlLang:`ru`,direction:`ltr`},{value:`zh-CN`,label:`Simplified Chinese`,nativeLabel:`简体中文`,htmlLang:`zh-Hans-CN`,direction:`ltr`},{value:`zh-TW`,label:`Traditional Chinese`,nativeLabel:`繁體中文`,htmlLang:`zh-Hant-TW`,direction:`ltr`},{value:`id`,label:`Indonesian`,nativeLabel:`Bahasa Indonesia`,htmlLang:`id`,direction:`ltr`},{value:`nl`,label:`Dutch`,nativeLabel:`Nederlands`,htmlLang:`nl`,direction:`ltr`},{value:`pl`,label:`Polish`,nativeLabel:`Polski`,htmlLang:`pl`,direction:`ltr`},{value:`tr`,label:`Turkish`,nativeLabel:`Türkçe`,htmlLang:`tr`,direction:`ltr`},{value:`vi`,label:`Vietnamese`,nativeLabel:`Tiếng Việt`,htmlLang:`vi`,direction:`ltr`},{value:`cs`,label:`Czech`,nativeLabel:`Čeština`,htmlLang:`cs`,direction:`ltr`},{value:`uk`,label:`Ukrainian`,nativeLabel:`Українська`,htmlLang:`uk`,direction:`ltr`},{value:`ar`,label:`Arabic`,nativeLabel:`العربية`,htmlLang:`ar`,direction:`rtl`},{value:`he`,label:`Hebrew`,nativeLabel:`עברית`,htmlLang:`he`,direction:`rtl`},{value:`fa`,label:`Persian`,nativeLabel:`فارسی`,htmlLang:`fa`,direction:`rtl`},{value:`th`,label:`Thai`,nativeLabel:`ไทย`,htmlLang:`th`,direction:`ltr`}],wc=`cms.preference.language`,Tc=`cms.preference.theme`,Ec=F.createContext(null);function Dc({children:e}){let[t,n]=F.useState(Oc),r=Pc(t),[i,a]=F.useState(kc),o=F.useCallback(e=>{jc(wc,e),n(e)},[]),s=F.useCallback(e=>{jc(Tc,e),a(e)},[]);F.useEffect(()=>{document.documentElement.lang=Cc.find(e=>e.value===t)?.htmlLang??`en`,document.documentElement.dir=r},[t,r]),F.useEffect(()=>{let e=()=>{let e=typeof matchMedia<`u`&&matchMedia(`(prefers-color-scheme: dark)`).matches;document.documentElement.classList.toggle(`dark`,i===`dark`||i===`system`&&e)};if(e(),i!==`system`||typeof matchMedia>`u`)return;let t=matchMedia(`(prefers-color-scheme: dark)`);return t.addEventListener(`change`,e),()=>t.removeEventListener(`change`,e)},[i]);let c=F.useMemo(()=>({language:t,direction:r,theme:i,setLanguage:o,setTheme:s}),[t,r,i,o,s]);return(0,I.jsx)(Ec.Provider,{value:c,children:e})}function J(){let e=F.useContext(Ec);if(!e)throw Error(`usePreferences must be used inside PreferencesProvider.`);return e}function Oc(){let e=Ac(wc);if(Mc(e))return e;if(typeof navigator>`u`)return`en`;for(let e of navigator.languages??[]){let t=Nc(e);if(t!==`en`||e.toLowerCase().startsWith(`en`))return t}return Nc(navigator.language)}function kc(){let e=Ac(Tc);return e===`light`||e===`dark`||e===`system`?e:`system`}function Ac(e){try{return localStorage.getItem(e)}catch{return null}}function jc(e,t){try{localStorage.setItem(e,t)}catch{}}function Mc(e){return Cc.some(t=>t.value===e)}function Nc(e){let t=(e??``).toLowerCase();if(t===`zh-tw`||t===`zh-hant`||t.startsWith(`zh-hant`))return`zh-TW`;if(t===`zh-cn`||t===`zh-hans`||t.startsWith(`zh-hans`))return`zh-CN`;if(t.startsWith(`pt-br`)||t===`pt`)return`pt-BR`;let n=t.split(`-`)[0];return n===`ar`?`ar`:n===`cs`?`cs`:n===`de`?`de`:n===`es`?`es`:n===`fa`?`fa`:n===`fr`?`fr`:n===`he`||n===`iw`?`he`:n===`id`?`id`:n===`it`?`it`:n===`ja`?`ja`:n===`ko`?`ko`:n===`nl`?`nl`:n===`pl`?`pl`:n===`pt`?`pt-BR`:n===`ru`?`ru`:n===`th`?`th`:n===`tr`?`tr`:n===`uk`?`uk`:n===`vi`?`vi`:n===`zh`?`zh-TW`:`en`}function Pc(e){return Cc.find(t=>t.value===e)?.direction??`ltr`}var Fc=`@aotter/mantle`,Ic=`0.0.11-alpha.71`,Lc=`https://www.npmjs.com/package/@aotter/mantle`,Rc=`https://github.com/aotter/mantle`,zc=`M62.27,18.91c-24.86,0-45.09,20.23-45.09,45.09s20.23,45.09,45.09,45.09,45.09-20.23,45.09-45.09-20.23-45.09-45.09-45.09ZM65.07,102.86v-18.98h5.49c1.26,0,2.29-1.03,2.29-2.29v-4.47h11.6c1.26,0,2.29-1.03,2.29-2.29v-20.57c0-1.26-1.03-2.29-2.29-2.29h-5.13v-12.73c0-1.55-1.26-2.8-2.8-2.8s-2.8,1.26-2.8,2.8v12.73h-22.89v-12.73c0-1.55-1.26-2.8-2.81-2.8s-2.8,1.26-2.8,2.8v12.73h-5.13c-1.26,0-2.29,1.03-2.29,2.29v20.57c0,1.26,1.03,2.29,2.29,2.29h11.6v4.47c0,1.26,1.03,2.29,2.29,2.29h5.49v18.98c-20.32-1.45-36.16-18.42-36.16-38.86,0-21.49,17.48-38.97,38.97-38.97s38.97,17.48,38.97,38.97-15.84,37.42-36.16,38.86ZM41.89,73.03v-16.96h14.46c1.94,2.28,5.02,5.87,5.11,5.97.19.19.39.23.52.23s.34-.04.54-.25c.07-.06,1.33-1.44,4.33-4.69.4-.44.8-.87,1.17-1.26h14.63v16.96h-40.75ZM55.78,79.79v-3.15h12.98v3.15h-12.98Z`;function Bc({className:e}){return(0,I.jsx)(`svg`,{viewBox:`0 0 128 128`,"aria-hidden":!0,className:H(e),children:(0,I.jsx)(`path`,{fill:`currentColor`,d:zc})})}function Vc(){return(0,I.jsxs)(`div`,{className:H(`fixed bottom-3 end-3 z-30 hidden items-center gap-2 rounded-full`,`border border-border/60 bg-background/65 px-2.5 py-1.5 text-xs`,`text-muted-foreground shadow-[var(--glass-shadow)] backdrop-blur-md md:flex`),children:[(0,I.jsx)(Bc,{className:`size-4 text-primary`}),(0,I.jsx)(`a`,{href:Lc,target:`_blank`,rel:`noreferrer`,className:`font-medium text-foreground/80 hover:text-primary`,children:Fc}),(0,I.jsx)(`span`,{"aria-hidden":!0,children:`·`}),(0,I.jsx)(`a`,{href:Rc,target:`_blank`,rel:`noreferrer`,className:`hover:text-primary`,children:`GitHub`}),(0,I.jsxs)(`span`,{"aria-label":`version ${Ic}`,children:[`v`,Ic]})]})}var Hc={en:{"admin.consoleTitle":`Admin console`,"auth.accessDenied.title":`Access denied`,"auth.accessDenied.noStaff":`You're signed in, but this account isn't on the admin staff list.`,"auth.accessDenied.askOwner":`Ask a site owner to add your GitHub login, or sign out to try a different account.`,"auth.error.title":`Something went wrong`,"auth.signIn.eyebrow":`AotterMantle admin`,"auth.signIn.title":`Sign in`,"auth.signIn.methodsLoadFailed":`Couldn't load sign-in methods. Try refreshing.`,"auth.signIn.noMethods":`No sign-in methods are configured for this site.`,"auth.signIn.unknownMethod":`Unsupported sign-in method: {kind}.`,"auth.signIn.method.social.button":`Continue with {provider}`,"auth.signIn.method.oauth.button":`Continue with {provider}`,"auth.signIn.method.email-otp.body":`Sign in with a one-time code sent to your email.`,"auth.signIn.method.email-otp.emailLabel":`Email address`,"auth.signIn.method.email-otp.emailPlaceholder":`you@example.com`,"auth.signIn.method.email-otp.sendButton":`Send code`,"auth.signIn.method.email-otp.sendFailed":`Couldn't send the code. Check the email and try again.`,"auth.signIn.method.email-otp.sentTo":`We sent a code to {email}.`,"auth.signIn.method.email-otp.otpLabel":`One-time code`,"auth.signIn.method.email-otp.otpPlaceholder":`Enter the 6-digit code`,"auth.signIn.method.email-otp.verifyButton":`Verify and sign in`,"auth.signIn.method.email-otp.verifyFailed":`That code didn't match. Try again.`,"auth.signIn.method.email-otp.back":`Use a different email`,"auth.signIn.method.magic-link.body":`We'll email you a one-tap sign-in link.`,"auth.signIn.method.magic-link.emailLabel":`Email address`,"auth.signIn.method.magic-link.emailPlaceholder":`you@example.com`,"auth.signIn.method.magic-link.sendButton":`Send sign-in link`,"auth.signIn.method.magic-link.sendFailed":`Couldn't send the link. Check the email and try again.`,"auth.signIn.method.magic-link.sentTo":`We sent a sign-in link to {email}.`,"auth.signIn.method.magic-link.clickHint":`Click the link in the email to finish signing in. The link expires shortly.`,"auth.signIn.method.magic-link.anotherEmail":`Use a different email`,"common.signOut":`Sign out`,"common.viewSite":`View site`,"common.copy":`Copy`,"common.open":`Open`,"common.failedToLoad":`Failed to load`,"common.signedIn":`Signed in`,"console.eyebrow":`Owner console`,"console.description":`Manage {title}'s content and operations here. MCP-capable agents can work alongside you.`,"console.descriptionFallback":`Manage this site's content and operations here. MCP-capable agents can work alongside you.`,"console.connector.title":`Connect Claude to this site`,"console.connector.body":`Give Claude secure access to this site's staff tools.`,"console.connector.step1.title":`Copy the Staff MCP URL`,"console.connector.step1.body":`You'll paste this URL into Claude in the next step.`,"console.connector.step1.label":`Staff MCP URL`,"console.connector.step2.title":`Add a custom connector`,"console.connector.step2.body":`Open Claude Customize, name the connector, and paste the URL.`,"console.connector.step2.action":`Open Claude Customize`,"console.connector.step3.title":`Sign in and start`,"console.connector.step3.body":`Authorize with your staff account, then ask Claude to work on this site.`,"console.connector.step3.action":`Open Claude`,"console.workspace.title":`Start editing here`,"console.workspace.body":`Your content collections, pages, and settings are all editable from this console. Pick a common action to begin.`,"console.collections.eyebrow":`Content model`,"console.collections.title":`Content lists`,"console.collections.body":`All of this site's content collections are listed here. Translated content is merged into its main entry.`,"console.collections.emptyTitle":`No collections defined yet`,"console.collections.emptyBody":`No data collections yet. Start from a template, or ask your agent to create the first one.`,"console.collections.noDescription":`No description.`,"collection.breadcrumb":`Collections`,"collection.create":`New entry`,"collection.schemaDetails":`Schema notes`,"collection.searchPlaceholder":`Search title, id, status...`,"collection.filter.all":`All`,"collection.empty.title":`No entries yet`,"collection.empty.search":`No entries matched “{search}”.`,"collection.empty.withStatus":`No {status} entries in this collection.`,"collection.empty.all":`This collection has no entries yet.`,"collection.refreshing":`Updating the list...`,"collection.loadMore":`Load more`,"collection.export":`Export CSV`,"collection.copyId":`Copy full ID`,"collection.table.id":`ID`,"collection.table.title":`Title`,"collection.table.status":`Status`,"collection.table.locale":`Locale`,"collection.table.version":`Version`,"collection.table.updated":`Updated`,"collection.table.actions":`Actions`,"collection.table.selectAll":`Select all rows on this page`,"collection.table.selectRow":`Select {name}`,"rowActions.menuLabel":`Row operations`,"rowActions.cancel":`Cancel`,"collection.untitled":`(untitled)`,"collection.bulk.selectedCount":`{count} selected`,"collection.bulk.publish":`Publish`,"collection.bulk.unpublish":`Unpublish`,"collection.bulk.delete":`Delete`,"collection.bulk.deleteConfirm":`Delete {count} selected entries? This cannot be undone.`,"crud.editTooltip":`Edit {name}.`,"crud.deleteTooltip":`Delete {name}.`,"crud.saveTitle":`Save title`,"crud.cancelTitle":`Cancel editing`,"crud.deleteConfirm":`Delete {name}? This cannot be undone.`,"crud.saving":`Saving...`,"entryEdit.back":`Back to {name}`,"entryEdit.body":`Edit this {name} entry. Related records show up alongside automatically.`,"entryEdit.parent":`Parent: {name}`,"entryEdit.save":`Save changes`,"entryEdit.saveTooltip":`Save this entry.`,"entryEdit.fields":`Entry fields`,"entryEdit.meta":`Entry details`,"entryEdit.related":`Related entries`,"entryEdit.noRelated":`No child collections were inferred for this entry.`,"entryEdit.noChildEntries":`No child entries match this entry yet.`,"entryEdit.relationship":`Joined by {child} from parent {parent}.`,"entryEdit.addItem":`Add item`,"entryEdit.removeItem":`Remove item`,"entryEdit.emptyOption":`No value`,"entryEdit.boolean":`Enabled`,"entryEdit.operationalHint":`System-written record — edits may be overwritten by the next sync.`,"entryEdit.publish":`Publish`,"entryEdit.publishing":`Publishing...`,"entryEdit.publishTooltip":`Publish this draft.`,"entryEdit.publishDisabledDirty":`Save changes before publishing.`,"entryEdit.unpublish":`Unpublish`,"entryEdit.unpublishing":`Unpublishing...`,"entryEdit.unpublishTooltip":`Move this entry back to draft so it can be edited.`,"entryEdit.uploadMedia":`Upload`,"entryEdit.uploadingMedia":`Uploading...`,"entryEdit.noMediaPurpose":`No media upload purpose is configured.`,"settings.page.title":`Store settings`,"settings.page.body":`Manage site-level brand copy and default service information used across the storefront.`,"settings.tabsLabel":`Store settings sections`,"settings.tab.brand":`Brand`,"settings.tab.tracking":`Tracking`,"settings.brandSection":`Brand and service`,"settings.brandSectionBody":`Default site copy shared across generated pages.`,"settings.siteBrand":`Site brand`,"settings.siteTitle":`Site title`,"settings.siteDescription":`Site description`,"settings.trackingSection":`Tracking codes`,"settings.trackingSectionBody":`Fill in analytics IDs and Mantle will inject the matching tracking scripts into generated storefront pages.`,"settings.ga4MeasurementId":`GA4 Measurement ID`,"settings.ga4MeasurementIdHelp":`Use the ID only, for example G-XXXXXXXXXX. Do not paste the whole gtag script.`,"settings.facebookPixelId":`Facebook Pixel ID`,"settings.facebookPixelIdHelp":`Use the numeric Pixel ID only. Mantle will generate the base Pixel code.`,"guide.close":`Close guide`,"guide.open":`Guide`,"guide.next":`Next`,"guide.prev":`Previous`,"guide.finish":`Finish`,"guide.collections.title":`Start with your content`,"guide.collections.body":`Open your first collection to manage its entries, statuses, and localized copy.`,"guide.filters.title":`Filter publishing states`,"guide.filters.body":`Switch between all, draft, published, and archived entries without leaving the list.`,"guide.actions.title":`Edit from the list`,"guide.actions.body":`Use the row actions to edit an entry or remove it from the site.`,"guide.reopen.title":`Reopen this guide anytime`,"guide.reopen.body":`The guide button stays in the status bar, so users can turn this walkthrough on again whenever they need it.`,"nav.home":`Home`,"nav.content":`Content`,"nav.operations":`Records`,"nav.media":`Media library`,"nav.more":`More`,"nav.approvals":`Approvals`,"nav.settings":`Settings`,"nav.staff":`Staff`,"nav.ops":`Operations`,"nav.reports":`Reports`,"ops.page.title":`Operations`,"ops.page.body":`Run site operations here. Fill in the fields and press Run — the result shows up right below.`,"ops.run":`Run`,"ops.running":`Running...`,"ops.result.title":`Result`,"ops.empty.title":`No staff operations are exposed yet`,"ops.empty.body":`No operations are available yet. Once your site's config opens an operation to staff, its form appears here automatically.`,"ops.triggers.mcp":`MCP`,"ops.triggers.http":`HTTP`,"views.page.body":`A read-only report over {schema}.`,"views.params.title":`Parameters`,"views.run":`Query`,"views.running":`Querying...`,"views.empty.title":`No rows`,"views.empty.body":`No data under the current filters.`,"views.notFound.title":`View not found`,"staff.page.title":`Staff`,"staff.page.body":`Invite staff by email, assign roles, and revoke pending invitations. Only owners can see this page.`,"staff.invite.title":`Invite staff`,"staff.invite.emailLabel":`Email address`,"staff.invite.emailPlaceholder":`teammate@example.com`,"staff.invite.roleLabel":`Role`,"staff.invite.button":`Invite`,"staff.invite.sending":`Inviting…`,"staff.invite.revoke":`Revoke`,"staff.invite.hint":`Invitees sign in at /admin/sign-in with the invited email (magic link, email code, or a social account on the same address) and land with their role already in effect.`,"staff.table.name":`Name`,"staff.table.email":`Email`,"staff.table.status":`Status / sign-in`,"staff.table.role":`Role`,"staff.role.owner":`Owner`,"staff.role.editor":`Editor`,"staff.role.contributor":`Contributor`,"staff.role.none":`No role`,"staff.badge.invited":`Invited`,"staff.status.emailSignIn":`Email sign-in`,"staff.self":`you`,"status.draft":`Drafts`,"status.review":`In Review`,"status.published":`Published`,"status.archived":`Archived`,"preferences.heading":`Preferences`,"preferences.language":`Admin language`,"preferences.language.search":`Search languages...`,"preferences.language.noResults":`No languages found.`,"preferences.direction":`Text direction`,"preferences.direction.auto":`Text direction follows the selected language.`,"preferences.appearance":`Appearance`,"preferences.light":`Light`,"preferences.dark":`Dark`,"preferences.system":`System`,"preferences.ltr":`Left to right`,"preferences.rtl":`Right to left`,"preferences.page.title":`Personal preferences`,"preferences.page.body":`These preferences stay on this browser. They change the admin console only and do not modify site settings.`,"preferences.page.languageBody":`Choose the language used by system pages and admin chrome.`,"preferences.page.appearanceBody":`Choose light, dark, or follow your operating system.`,"preferences.page.open":`Preferences`,"system.notFound.title":`Not found`,"system.notFound.body":`No view registered for`,"system.notFound.back":`Back to home`,"editor.page.title":`Content editor`,"editor.page.body":`Draft copy in Markdown, HTML, or rich text before handing it to an agent or publishing workflow.`,"editor.mode.markdown":`Markdown`,"editor.mode.html":`HTML`,"editor.mode.rich":`Rich editor`,"editor.titleLabel":`Title`,"editor.slugLabel":`Slug`,"editor.bodyLabel":`Body`,"editor.preview":`Preview`,"editor.saveDraft":`Save draft`,"editor.markdownHint":`Supports headings, lists, links, and fenced code blocks.`,"editor.htmlHint":`Edit trusted HTML fragments with a plain source view.`,"editor.richHint":`Format sections, callouts, and copy without touching markup.`,"editor.toolbar":`Rich editor toolbar`,"editor.undo":`Undo`,"editor.redo":`Redo`,"editor.aiClean":`Insert callout`,"editor.uploadImage":`Upload image`,"editor.uploading":`Uploading image...`,"editor.textStyle":`Text style`,"editor.headingPlaceholder":`Heading`,"editor.selectedText":`selected text`,"editor.bold":`Bold`,"editor.italic":`Italic`,"editor.underline":`Underline`,"editor.strike":`Strikethrough`,"editor.inlineCode":`Inline code`,"editor.textColor":`Text color`,"editor.highlight":`Highlight`,"editor.palette":`Brand color`,"editor.alignLeft":`Align left`,"editor.alignCenter":`Align center`,"editor.alignRight":`Align right`,"editor.bulletList":`Bullet list`,"editor.numberList":`Numbered list`,"editor.checkList":`Checklist`,"editor.indent":`Indent`,"editor.link":`Link`,"editor.linkText":`link text`,"editor.table":`Table`,"editor.mediaLibrary":`Media library`,"editor.imageUrl":`Image URL`,"editor.insertImage":`Insert image`,"editor.videoUrl":`YouTube / Dailymotion URL`,"editor.insertVideo":`Insert video`,"media.alt":`Alt text`,"media.title":`Media library`,"media.description":`Every image uploaded to this site. Reuse one in an entry, tidy up its alt text, or remove it.`,"media.upload":`Upload`,"media.uploading":`Uploading...`,"media.dropHere":`Drop images here to upload`,"media.searchPlaceholder":`Search alt text, caption, or id`,"media.empty.title":`No images yet`,"media.empty.all":`Upload an image to start building the library.`,"media.empty.search":`No images match “{search}”.`,"media.noPurpose":`No upload purpose is configured for this site, so uploads are disabled.`,"media.caption":`Caption`,"media.altPlaceholder":`Describe this image`,"media.captionPlaceholder":`Optional caption`,"media.save":`Save`,"media.saving":`Saving...`,"media.saved":`Saved`,"media.delete":`Delete`,"media.deleteConfirm":`Delete this image? It will be removed everywhere it is used.`,"media.open":`Open original`,"media.copyId":`Copy id`,"media.uploaded":`Uploaded {date}`,"media.pick":`Choose from library`,"media.pickTitle":`Choose an image`,"media.pickDescription":`Pick an existing image to reuse, or upload a new one.`,"media.use":`Use this image`,"media.loadMore":`Load more`,"media.uploadFailed":`{count} of {total} uploads failed.`,"media.encoderUnsupported":`This site's media policy requires an image format this browser cannot produce ({mime}). Contact the site developer to update the policy.`,"approvals.title":`Approvals`,"approvals.body":`Review editorial entries that are waiting for approval before they go live.`,"approvals.emptyTitle":`Nothing is waiting for review`,"approvals.emptyBody":`Entries submitted for review will appear here by collection.`,"approvals.groupBody":`{count} entries are currently marked {status}.`,"approvals.openCollection":`Open collection`,"approvals.reviewEntry":`Review`,"ops.error.executionFailed":`The operation ran but failed to complete.`,"ops.error.detailsLabel":`Show details`,"ops.success":`{name} completed.`,"confirm.title":`Are you sure?`,"confirm.cancel":`Cancel`,"confirm.confirm":`Confirm`,"collection.schemaSummary.lifecycleAndI18n":`Manage items, publishing state, and localized content for {name}.`,"collection.schemaSummary.lifecycleOnly":`Manage items and publishing state for {name}.`,"collection.schemaSummary.i18nOnly":`Manage items and localized content for {name}.`,"collection.schemaSummary.plain":`Manage items for {name}.`,"entryEdit.mediaMissing":`This image is missing or was deleted.`,"field.hint.moneyMinor":`amount (minor units)`,"field.hint.timestampMs":`timestamp (ms)`},"zh-TW":{"admin.consoleTitle":`管理後台`,"auth.accessDenied.title":`無法存取`,"auth.accessDenied.noStaff":`你已登入,但這個帳號不在 admin staff 清單內。`,"auth.accessDenied.askOwner":`請網站 owner 加入你的 GitHub login,或登出改用其他帳號。`,"auth.error.title":`發生錯誤`,"auth.signIn.eyebrow":`AotterMantle 後台`,"auth.signIn.title":`登入`,"auth.signIn.methodsLoadFailed":`讀取登入方式失敗,請重新整理頁面。`,"auth.signIn.noMethods":`這個站台還沒設定任何登入方式。`,"auth.signIn.unknownMethod":`不支援的登入方式:{kind}。`,"auth.signIn.method.social.button":`使用 {provider} 繼續`,"auth.signIn.method.oauth.button":`使用 {provider} 繼續`,"auth.signIn.method.email-otp.body":`輸入 email,我們會寄一次性驗證碼給你。`,"auth.signIn.method.email-otp.emailLabel":`電子郵件`,"auth.signIn.method.email-otp.emailPlaceholder":`you@example.com`,"auth.signIn.method.email-otp.sendButton":`寄送驗證碼`,"auth.signIn.method.email-otp.sendFailed":`驗證碼寄送失敗,請確認 email 後重試。`,"auth.signIn.method.email-otp.sentTo":`已寄驗證碼到 {email}。`,"auth.signIn.method.email-otp.otpLabel":`驗證碼`,"auth.signIn.method.email-otp.otpPlaceholder":`輸入 6 位驗證碼`,"auth.signIn.method.email-otp.verifyButton":`驗證並登入`,"auth.signIn.method.email-otp.verifyFailed":`驗證碼錯誤,請再試一次。`,"auth.signIn.method.email-otp.back":`用其他 email`,"auth.signIn.method.magic-link.body":`我們會寄一個一鍵登入連結給你。`,"auth.signIn.method.magic-link.emailLabel":`電子郵件`,"auth.signIn.method.magic-link.emailPlaceholder":`you@example.com`,"auth.signIn.method.magic-link.sendButton":`寄送登入連結`,"auth.signIn.method.magic-link.sendFailed":`連結寄送失敗,請確認 email 後重試。`,"auth.signIn.method.magic-link.sentTo":`已將登入連結寄到 {email}。`,"auth.signIn.method.magic-link.clickHint":`請點 email 裡的連結完成登入。連結很快會過期。`,"auth.signIn.method.magic-link.anotherEmail":`用其他 email`,"common.signOut":`登出`,"common.viewSite":`查看網站`,"common.copy":`複製`,"common.open":`開啟`,"common.failedToLoad":`載入失敗`,"common.signedIn":`已登入`,"console.eyebrow":`Owner console`,"console.description":`在這裡管理 {title} 的內容與營運資料。支援 MCP 的 agent 也能與你並行協作。`,"console.descriptionFallback":`在這裡管理這個網站的內容與營運資料。支援 MCP 的 agent 也能與你並行協作。`,"console.connector.title":`把 Claude 連接到這個網站`,"console.connector.body":`讓 Claude 安全地使用這個網站的 Staff MCP 工具。`,"console.connector.step1.title":`複製 Staff MCP URL`,"console.connector.step1.body":`下一步會把這個網址貼到 Claude。`,"console.connector.step1.label":`Staff MCP URL`,"console.connector.step2.title":`新增自訂 connector`,"console.connector.step2.body":`開啟 Claude Customize,命名 connector,再貼上網址。`,"console.connector.step2.action":`開啟 Claude Customize`,"console.connector.step3.title":`登入並開始使用`,"console.connector.step3.body":`用 staff 帳號完成授權,接著請 Claude 處理這個網站。`,"console.connector.step3.action":`前往 Claude`,"console.workspace.title":`從這裡開始編輯`,"console.workspace.body":`你的內容 collection、頁面與設定都能在這個後台管理。先選一個常用操作開始。`,"console.collections.eyebrow":`內容模型`,"console.collections.title":`內容清單`,"console.collections.body":`這裡列出網站的所有資料集合。翻譯內容會併入主項目顯示。`,"console.collections.emptyTitle":`尚未定義 collections`,"console.collections.emptyBody":`還沒有任何資料集合。可以從範本開始,或請你的 agent 建立第一個。`,"console.collections.noDescription":`沒有描述。`,"collection.breadcrumb":`內容清單`,"collection.create":`新增`,"collection.schemaDetails":`Schema 說明`,"collection.searchPlaceholder":`搜尋標題、ID、狀態...`,"collection.filter.all":`全部`,"collection.empty.title":`目前沒有 entries`,"collection.empty.search":`沒有符合「{search}」的資料。`,"collection.empty.withStatus":`這個 collection 目前沒有 {status} entries。`,"collection.empty.all":`這個 collection 目前沒有 entries。`,"collection.refreshing":`清單更新中...`,"collection.loadMore":`載入更多`,"collection.export":`匯出 CSV`,"collection.copyId":`複製完整 ID`,"collection.table.id":`ID`,"collection.table.title":`標題`,"collection.table.status":`狀態`,"collection.table.locale":`語言`,"collection.table.version":`版本`,"collection.table.updated":`更新時間`,"collection.table.actions":`操作`,"collection.table.selectAll":`選取這一頁的所有項目`,"collection.table.selectRow":`選取 {name}`,"rowActions.menuLabel":`資料列操作`,"rowActions.cancel":`取消`,"collection.untitled":`(未命名)`,"collection.bulk.selectedCount":`已選取 {count} 筆`,"collection.bulk.publish":`發布`,"collection.bulk.unpublish":`下架`,"collection.bulk.delete":`刪除`,"collection.bulk.deleteConfirm":`刪除已選取的 {count} 筆資料?這個動作無法復原。`,"crud.editTooltip":`編輯{name}。`,"crud.deleteTooltip":`刪除{name}。`,"crud.saveTitle":`儲存標題`,"crud.cancelTitle":`取消編輯`,"crud.deleteConfirm":`確定要刪除{name}?這個動作無法復原。`,"crud.saving":`儲存中...`,"entryEdit.back":`回到 {name}`,"entryEdit.body":`編輯 {name} 的內容,相關資料會自動帶出。`,"entryEdit.parent":`父層:{name}`,"entryEdit.save":`儲存變更`,"entryEdit.saveTooltip":`儲存這筆資料。`,"entryEdit.fields":`資料欄位`,"entryEdit.meta":`資料資訊`,"entryEdit.related":`相關資料`,"entryEdit.noRelated":`目前沒有推導出這筆資料的子 collection。`,"entryEdit.noChildEntries":`目前沒有符合這筆資料的子資料。`,"entryEdit.relationship":`透過子欄位 {child} 對應父欄位 {parent}。`,"entryEdit.addItem":`新增項目`,"entryEdit.removeItem":`移除項目`,"entryEdit.emptyOption":`無值`,"entryEdit.boolean":`啟用`,"entryEdit.operationalHint":`系統寫入的資料——手動修改可能在下次同步時被覆蓋。`,"settings.page.title":`商店設定`,"settings.page.body":`管理全站品牌文案與預設服務資訊,讓商品與首頁可以共用。`,"settings.tabsLabel":`商店設定分頁`,"settings.tab.brand":`品牌`,"settings.tab.tracking":`追蹤碼`,"settings.brandSection":`品牌與服務`,"settings.brandSectionBody":`產生頁面時共用的預設站台文案。`,"settings.siteBrand":`網站品牌`,"settings.siteTitle":`網站標題`,"settings.siteDescription":`網站描述`,"settings.trackingSection":`追蹤碼`,"settings.trackingSectionBody":`填入 analytics ID 後,Mantle 會在產生的前台頁面自動埋入對應追蹤碼。`,"settings.ga4MeasurementId":`GA4 Measurement ID`,"settings.ga4MeasurementIdHelp":`只需要填 ID,例如 G-XXXXXXXXXX,不要貼整段 gtag script。`,"settings.facebookPixelId":`Facebook Pixel ID`,"settings.facebookPixelIdHelp":`只需要填數字 Pixel ID,Mantle 會產生標準 Pixel base code。`,"guide.close":`關閉引導`,"guide.open":`使用者引導`,"guide.next":`下一步`,"guide.prev":`上一步`,"guide.finish":`完成`,"guide.collections.title":`從內容開始`,"guide.collections.body":`打開第一個 collection,管理裡面的項目、狀態與多語內容。`,"guide.filters.title":`切換發布狀態`,"guide.filters.body":`在清單上直接切換全部、草稿、已發布與已封存,不需要離開目前頁面。`,"guide.actions.title":`在清單裡直接操作`,"guide.actions.body":`用每列右側操作編輯項目,或從網站移除。`,"guide.reopen.title":`隨時重新打開引導`,"guide.reopen.body":`右上角會保留使用者引導按鈕,需要時可以再次開啟或關閉這套逐步導覽。`,"nav.home":`首頁`,"nav.content":`內容`,"nav.operations":`營運資料`,"nav.media":`媒體庫`,"nav.more":`更多`,"nav.approvals":`審核`,"nav.settings":`設定`,"nav.staff":`員工管理`,"nav.ops":`操作`,"nav.reports":`報表`,"ops.page.title":`操作`,"ops.page.body":`站務操作都在這裡。填好欄位、按執行,結果會直接顯示在下方。`,"ops.run":`執行`,"ops.running":`執行中...`,"ops.result.title":`結果`,"ops.empty.title":`目前沒有開放給 staff 的操作`,"ops.empty.body":`目前沒有可用的操作。網站設定檔把操作開放給站務人員後,表單會自動出現在這裡。`,"ops.triggers.mcp":`MCP`,"ops.triggers.http":`HTTP`,"views.page.body":`{schema} 的唯讀報表。`,"views.params.title":`查詢參數`,"views.run":`查詢`,"views.running":`查詢中...`,"views.empty.title":`沒有資料`,"views.empty.body":`目前的條件下沒有資料。`,"views.notFound.title":`找不到這個 View`,"staff.page.title":`員工管理`,"staff.page.body":`以 email 邀請員工、指派角色、撤銷尚未使用的邀請。僅 owner 可見此頁。`,"staff.invite.title":`邀請員工`,"staff.invite.emailLabel":`Email`,"staff.invite.emailPlaceholder":`teammate@example.com`,"staff.invite.roleLabel":`角色`,"staff.invite.button":`建立邀請`,"staff.invite.sending":`邀請中…`,"staff.invite.revoke":`撤銷`,"staff.invite.hint":`受邀者到 /admin/sign-in 用受邀的 email 登入(magic link、email 驗證碼,或同信箱的社群帳號),登入時角色即已生效。`,"staff.table.name":`姓名`,"staff.table.email":`Email`,"staff.table.status":`狀態/登入方式`,"staff.table.role":`角色`,"staff.role.owner":`管理者`,"staff.role.editor":`編輯`,"staff.role.contributor":`協作者`,"staff.role.none":`無角色`,"staff.badge.invited":`邀請中`,"staff.status.emailSignIn":`Email 登入`,"staff.self":`你自己`,"status.draft":`草稿`,"status.review":`審核中`,"status.published":`已發布`,"status.archived":`已封存`,"preferences.heading":`偏好設定`,"preferences.language":`後台語言`,"preferences.language.search":`搜尋語言...`,"preferences.language.noResults":`找不到語言。`,"preferences.direction":`文字方向`,"preferences.direction.auto":`文字方向會跟隨選擇的語言。`,"preferences.appearance":`外觀`,"preferences.light":`淺色`,"preferences.dark":`深色`,"preferences.system":`跟隨系統`,"preferences.ltr":`左到右`,"preferences.rtl":`右到左`,"preferences.page.title":`個人偏好`,"preferences.page.body":`這些偏好只保存在這個瀏覽器,只影響 admin console,不會改動站台設定。`,"preferences.page.languageBody":`選擇系統頁與 admin chrome 使用的語言。`,"preferences.page.appearanceBody":`選擇淺色、深色,或跟隨作業系統。`,"preferences.page.open":`個人偏好`,"system.notFound.title":`找不到頁面`,"system.notFound.body":`沒有 view 註冊在`,"system.notFound.back":`回首頁`,"editor.page.title":`內容編輯器`,"editor.page.body":`在交給 agent 或發布流程之前,先用 Markdown、HTML 或 Rich Editor 編輯內容草稿。`,"editor.mode.markdown":`Markdown`,"editor.mode.html":`HTML`,"editor.mode.rich":`Rich Editor`,"editor.titleLabel":`標題`,"editor.slugLabel":`Slug`,"editor.bodyLabel":`本文`,"editor.preview":`預覽`,"editor.saveDraft":`儲存草稿`,"editor.markdownHint":`支援標題、清單、連結與 fenced code blocks。`,"editor.htmlHint":`用原始碼模式編輯可信任的 HTML 片段。`,"editor.richHint":`不碰 markup 也能整理段落、提示框與內文。`,"editor.toolbar":`Rich Editor 工具列`,"editor.undo":`復原`,"editor.redo":`重做`,"editor.aiClean":`插入提示區塊`,"editor.uploadImage":`上傳圖片`,"editor.uploading":`圖片上傳中...`,"editor.textStyle":`文字樣式`,"editor.headingPlaceholder":`標題`,"editor.selectedText":`選取文字`,"editor.bold":`粗體`,"editor.italic":`斜體`,"editor.underline":`底線`,"editor.strike":`刪除線`,"editor.inlineCode":`行內程式碼`,"editor.textColor":`文字顏色`,"editor.highlight":`螢光標記`,"editor.palette":`品牌色`,"editor.alignLeft":`靠左對齊`,"editor.alignCenter":`置中對齊`,"editor.alignRight":`靠右對齊`,"editor.bulletList":`項目清單`,"editor.numberList":`編號清單`,"editor.checkList":`待辦清單`,"editor.indent":`縮排`,"editor.link":`連結`,"editor.linkText":`連結文字`,"editor.table":`表格`,"editor.mediaLibrary":`媒體庫`,"editor.imageUrl":`圖片網址`,"editor.insertImage":`插入圖片`,"editor.videoUrl":`YouTube / Dailymotion 連結`,"editor.insertVideo":`插入影片`,"media.alt":`替代文字`,"media.title":`媒體庫`,"media.description":`這個網站上傳過的所有圖片。可以在內容中重複使用、整理替代文字,或刪除不需要的圖片。`,"media.upload":`上傳`,"media.uploading":`上傳中...`,"media.dropHere":`把圖片拖曳到這裡上傳`,"media.searchPlaceholder":`搜尋替代文字、說明或 id`,"media.empty.title":`還沒有圖片`,"media.empty.all":`上傳一張圖片,開始建立媒體庫。`,"media.empty.search":`沒有符合「{search}」的圖片。`,"media.noPurpose":`這個網站沒有設定上傳用途,無法上傳。`,"media.caption":`說明文字`,"media.altPlaceholder":`描述這張圖片`,"media.captionPlaceholder":`選填說明`,"media.save":`儲存`,"media.saving":`儲存中...`,"media.saved":`已儲存`,"media.delete":`刪除`,"media.deleteConfirm":`確定要刪除這張圖片嗎?所有使用到的地方都會一併移除。`,"media.open":`開啟原圖`,"media.copyId":`複製 id`,"media.uploaded":`上傳於 {date}`,"media.pick":`從媒體庫選擇`,"media.pickTitle":`選擇圖片`,"media.pickDescription":`挑一張現有圖片重複使用,或上傳新圖片。`,"media.use":`使用這張圖片`,"media.loadMore":`載入更多`,"media.uploadFailed":`{total} 張圖片中有 {count} 張上傳失敗。`,"media.encoderUnsupported":`這個網站的媒體政策要求此瀏覽器無法產生的圖片格式({mime})。請聯絡網站開發者調整政策。`,"approvals.title":`審核中心`,"approvals.body":`集中查看等待審核的 editorial entries,發布前可以逐筆檢查內容。`,"approvals.emptyTitle":`目前沒有等待審核的內容`,"approvals.emptyBody":`送出審核的資料會依 collection 分組顯示在這裡。`,"approvals.groupBody":`目前有 {count} 筆內容標記為「{status}」。`,"approvals.openCollection":`開啟清單`,"approvals.reviewEntry":`審核`,"entryEdit.publish":`發布`,"entryEdit.publishing":`發布中...`,"entryEdit.publishTooltip":`發布這筆草稿。`,"entryEdit.publishDisabledDirty":`請先儲存變更才能發布。`,"entryEdit.unpublish":`取消發布`,"entryEdit.unpublishing":`取消發布中...`,"entryEdit.unpublishTooltip":`將這筆資料改回草稿以便編輯。`,"ops.error.executionFailed":`操作已執行,但未能完成。`,"ops.error.detailsLabel":`顯示詳細資訊`,"ops.success":`{name} 已完成。`,"confirm.title":`確定要這麼做嗎?`,"confirm.cancel":`取消`,"confirm.confirm":`確定`,"collection.schemaSummary.lifecycleAndI18n":`管理 {name} 的項目、發布狀態與多語內容。`,"collection.schemaSummary.lifecycleOnly":`管理 {name} 的項目與發布狀態。`,"collection.schemaSummary.i18nOnly":`管理 {name} 的項目與多語內容。`,"collection.schemaSummary.plain":`管理 {name} 的項目。`,"entryEdit.mediaMissing":`這張圖片已遺失或已被刪除。`,"field.hint.moneyMinor":`金額(最小單位)`,"field.hint.timestampMs":`時間戳記(毫秒)`},"zh-CN":{"admin.consoleTitle":`管理后台`,"auth.signIn.title":`登录`,"common.signOut":`登出`,"common.viewSite":`查看网站`,"common.copy":`复制`,"common.open":`打开`,"common.failedToLoad":`加载失败`,"common.signedIn":`已登录`,"console.description":`在这里管理 {title} 的内容与运营数据。支持 MCP 的 agent 也能与你并行协作。`,"console.descriptionFallback":`在这里管理这个网站的内容与运营数据。支持 MCP 的 agent 也能与你并行协作。`,"console.connector.title":`把 Claude 连接到这个网站`,"console.connector.body":`让 Claude 安全地使用这个网站的 Staff MCP 工具。`,"console.connector.step1.title":`复制 Staff MCP URL`,"console.connector.step1.body":`下一步会把这个网址粘贴到 Claude。`,"console.connector.step1.label":`Staff MCP URL`,"console.connector.step2.title":`添加自定义 connector`,"console.connector.step2.body":`打开 Claude Customize,命名 connector,再粘贴网址。`,"console.connector.step2.action":`打开 Claude Customize`,"console.connector.step3.title":`登录并开始使用`,"console.connector.step3.body":`用 staff 账号完成授权,然后请 Claude 处理这个网站。`,"console.connector.step3.action":`前往 Claude`,"console.workspace.title":`从这里开始编辑`,"console.workspace.body":`你的内容 collection、页面与设置都能在这个后台管理。先选一个常用操作开始。`,"console.collections.title":`内容清单`,"console.collections.body":`这里列出网站的所有资料集合。翻译内容会并入主项目显示。`,"collection.breadcrumb":`内容清单`,"collection.create":`新增`,"collection.filter.all":`全部`,"collection.table.title":`标题`,"collection.table.status":`状态`,"collection.table.locale":`语言`,"collection.table.version":`版本`,"collection.table.updated":`更新时间`,"collection.table.actions":`操作`,"rowActions.menuLabel":`数据行操作`,"rowActions.cancel":`取消`,"collection.untitled":`(未命名)`,"collection.searchPlaceholder":`搜索标题、ID、状态...`,"collection.empty.search":`没有符合“{search}”的资料。`,"collection.refreshing":`列表更新中...`,"collection.loadMore":`加载更多`,"collection.export":`导出 CSV`,"collection.copyId":`复制完整 ID`,"collection.table.id":`ID`,"collection.table.selectAll":`选取本页所有项目`,"collection.table.selectRow":`选取 {name}`,"collection.bulk.selectedCount":`已选取 {count} 笔`,"collection.bulk.publish":`发布`,"collection.bulk.unpublish":`下架`,"collection.bulk.delete":`删除`,"collection.bulk.deleteConfirm":`删除已选取的 {count} 笔资料?这个动作无法复原。`,"crud.editTooltip":`编辑{name}。`,"crud.deleteTooltip":`删除{name}。`,"crud.saveTitle":`保存标题`,"crud.cancelTitle":`取消编辑`,"crud.deleteConfirm":`确定要删除{name}?这个动作无法复原。`,"crud.saving":`保存中...`,"entryEdit.back":`回到 {name}`,"entryEdit.body":`编辑 {name} 的内容,相关资料会自动带出。`,"entryEdit.parent":`父层:{name}`,"entryEdit.save":`保存变更`,"entryEdit.saveTooltip":`保存这笔资料。`,"entryEdit.fields":`资料字段`,"entryEdit.meta":`资料信息`,"entryEdit.related":`相关资料`,"entryEdit.noRelated":`目前没有推导出这笔资料的子 collection。`,"entryEdit.noChildEntries":`目前没有符合这笔资料的子资料。`,"entryEdit.relationship":`透过子字段 {child} 对应父字段 {parent}。`,"entryEdit.addItem":`新增项目`,"entryEdit.removeItem":`移除项目`,"entryEdit.emptyOption":`无值`,"entryEdit.boolean":`启用`,"entryEdit.operationalHint":`系统写入的资料——手动修改可能在下次同步时被覆盖。`,"settings.page.title":`商店设置`,"settings.page.body":`管理全站品牌文案与预设服务信息,让商品与首页可以共用。`,"settings.tabsLabel":`商店设置分页`,"settings.tab.brand":`品牌`,"settings.tab.tracking":`追踪码`,"settings.brandSection":`品牌与服务`,"settings.brandSectionBody":`生成页面时共用的默认站台文案。`,"settings.siteBrand":`网站品牌`,"settings.siteTitle":`网站标题`,"settings.siteDescription":`网站描述`,"settings.trackingSection":`追踪码`,"settings.trackingSectionBody":`填入 analytics ID 后,Mantle 会在生成的前台页面自动埋入对应追踪码。`,"settings.ga4MeasurementId":`GA4 Measurement ID`,"settings.ga4MeasurementIdHelp":`只需要填 ID,例如 G-XXXXXXXXXX,不要贴整段 gtag script。`,"settings.facebookPixelId":`Facebook Pixel ID`,"settings.facebookPixelIdHelp":`只需要填数字 Pixel ID,Mantle 会生成标准 Pixel base code。`,"guide.close":`关闭引导`,"guide.open":`使用者引导`,"guide.next":`下一步`,"guide.prev":`上一步`,"guide.finish":`完成`,"guide.collections.title":`从内容开始`,"guide.collections.body":`打开第一个 collection,管理里面的项目、状态与多语内容。`,"guide.filters.title":`切换发布状态`,"guide.filters.body":`在清单上直接切换全部、草稿、已发布与已归档,不需要离开当前页面。`,"guide.actions.title":`在清单里直接操作`,"guide.actions.body":`用每列右侧操作编辑项目,或从网站移除。`,"guide.reopen.title":`随时重新打开引导`,"guide.reopen.body":`右上角会保留使用者引导按钮,需要时可以再次开启或关闭这套逐步导览。`,"nav.home":`首页`,"nav.content":`内容`,"nav.operations":`运营数据`,"nav.media":`媒体库`,"nav.more":`更多`,"nav.approvals":`审核`,"nav.settings":`设置`,"nav.ops":`操作`,"nav.reports":`报表`,"ops.page.title":`操作`,"ops.page.body":`站务操作都在这里。填好字段、按执行,结果会直接显示在下方。`,"ops.run":`执行`,"ops.running":`执行中...`,"ops.result.title":`结果`,"ops.empty.title":`目前没有开放给 staff 的操作`,"ops.empty.body":`目前没有可用的操作。网站配置把操作开放给站务人员后,表单会自动出现在这里。`,"ops.triggers.mcp":`MCP`,"ops.triggers.http":`HTTP`,"views.page.body":`{schema} 的只读报表。`,"views.params.title":`查询参数`,"views.run":`查询`,"views.running":`查询中...`,"views.empty.title":`没有数据`,"views.empty.body":`当前条件下没有数据。`,"views.notFound.title":`找不到这个 View`,"status.draft":`草稿`,"status.review":`审核中`,"status.published":`已发布`,"status.archived":`已归档`,"preferences.heading":`偏好设置`,"preferences.language":`后台语言`,"preferences.language.search":`搜索语言...`,"preferences.language.noResults":`找不到语言。`,"preferences.direction":`文字方向`,"preferences.direction.auto":`文字方向会跟随选择的语言。`,"preferences.appearance":`外观`,"preferences.light":`浅色`,"preferences.dark":`深色`,"preferences.system":`跟随系统`,"preferences.ltr":`从左到右`,"preferences.rtl":`从右到左`,"preferences.page.open":`个人偏好`,"preferences.page.title":`个人偏好`,"preferences.page.body":`这些偏好只保存在此浏览器,只影响 admin console,不会修改站点设置。`,"preferences.page.languageBody":`选择系统页面和 admin chrome 使用的语言。`,"preferences.page.appearanceBody":`选择浅色、深色,或跟随操作系统。`,"editor.page.title":`内容编辑器`,"editor.page.body":`在交给 agent 或发布流程前,先用 Markdown、HTML 或 Rich Editor 编辑内容草稿。`,"editor.mode.markdown":`Markdown`,"editor.mode.html":`HTML`,"editor.mode.rich":`Rich Editor`,"editor.titleLabel":`标题`,"editor.slugLabel":`Slug`,"editor.bodyLabel":`正文`,"editor.preview":`预览`,"editor.saveDraft":`保存草稿`,"editor.markdownHint":`支持标题、列表、链接与 fenced code blocks。`,"editor.htmlHint":`用源码模式编辑可信任的 HTML 片段。`,"editor.richHint":`不用碰 markup 也能整理段落、提示框与内文。`,"editor.toolbar":`Rich Editor 工具栏`,"editor.undo":`撤销`,"editor.redo":`重做`,"editor.aiClean":`插入提示区块`,"editor.uploadImage":`上传图片`,"editor.uploading":`图片上传中...`,"editor.textStyle":`文字样式`,"editor.headingPlaceholder":`标题`,"editor.selectedText":`选取文字`,"editor.bold":`粗体`,"editor.italic":`斜体`,"editor.underline":`下划线`,"editor.strike":`删除线`,"editor.inlineCode":`行内代码`,"editor.textColor":`文字颜色`,"editor.highlight":`高亮标记`,"editor.palette":`品牌色`,"editor.alignLeft":`左对齐`,"editor.alignCenter":`居中对齐`,"editor.alignRight":`右对齐`,"editor.bulletList":`项目列表`,"editor.numberList":`编号列表`,"editor.checkList":`待办列表`,"editor.indent":`缩进`,"editor.link":`链接`,"editor.linkText":`链接文字`,"editor.table":`表格`,"editor.mediaLibrary":`媒体库`,"editor.imageUrl":`图片网址`,"editor.insertImage":`插入图片`,"editor.videoUrl":`YouTube / Dailymotion 链接`,"editor.insertVideo":`插入视频`,"media.alt":`替代文字`,"media.title":`媒体库`,"media.description":`这个网站上传过的所有图片。可以在内容中重复使用、整理替代文字,或删除不需要的图片。`,"media.upload":`上传`,"media.uploading":`上传中...`,"media.dropHere":`把图片拖到这里上传`,"media.searchPlaceholder":`搜索替代文字、说明或 id`,"media.empty.title":`还没有图片`,"media.empty.all":`上传一张图片,开始建立媒体库。`,"media.empty.search":`没有符合“{search}”的图片。`,"media.noPurpose":`这个网站没有设置上传用途,无法上传。`,"media.caption":`说明文字`,"media.altPlaceholder":`描述这张图片`,"media.captionPlaceholder":`选填说明`,"media.save":`保存`,"media.saving":`保存中...`,"media.saved":`已保存`,"media.delete":`删除`,"media.deleteConfirm":`确定要删除这张图片吗?所有使用到的地方都会一并移除。`,"media.open":`打开原图`,"media.copyId":`复制 id`,"media.uploaded":`上传于 {date}`,"media.pick":`从媒体库选择`,"media.pickTitle":`选择图片`,"media.pickDescription":`挑一张现有图片重复使用,或上传新图片。`,"media.use":`使用这张图片`,"media.loadMore":`加载更多`,"media.uploadFailed":`{total} 张图片中有 {count} 张上传失败。`,"media.encoderUnsupported":`这个网站的媒体政策要求此浏览器无法生成的图片格式({mime})。请联系网站开发者调整政策。`,"approvals.title":`审核中心`,"approvals.body":`集中查看等待审核的 editorial entries,发布前可以逐笔检查内容。`,"approvals.emptyTitle":`目前没有等待审核的内容`,"approvals.emptyBody":`送出审核的资料会依 collection 分组显示在这里。`,"approvals.groupBody":`目前有 {count} 笔内容标记为“{status}”。`,"approvals.openCollection":`打开清单`,"approvals.reviewEntry":`审核`,"entryEdit.publish":`发布`,"entryEdit.publishing":`发布中...`,"entryEdit.publishTooltip":`发布这笔草稿。`,"entryEdit.publishDisabledDirty":`请先保存变更才能发布。`,"entryEdit.unpublish":`取消发布`,"entryEdit.unpublishing":`取消发布中...`,"entryEdit.unpublishTooltip":`将这笔资料改回草稿以便编辑。`,"ops.error.executionFailed":`操作已执行,但未能完成。`,"ops.error.detailsLabel":`显示详细信息`,"ops.success":`{name} 已完成。`,"confirm.title":`确定要这么做吗?`,"confirm.cancel":`取消`,"confirm.confirm":`确定`,"collection.schemaSummary.lifecycleAndI18n":`管理 {name} 的项目、发布状态与多语内容。`,"collection.schemaSummary.lifecycleOnly":`管理 {name} 的项目与发布状态。`,"collection.schemaSummary.i18nOnly":`管理 {name} 的项目与多语内容。`,"collection.schemaSummary.plain":`管理 {name} 的项目。`,"entryEdit.mediaMissing":`这张图片已丢失或已被删除。`,"field.hint.moneyMinor":`金额(最小单位)`,"field.hint.timestampMs":`时间戳(毫秒)`},de:{"auth.signIn.title":`Anmelden`,"common.signOut":`Abmelden`,"common.viewSite":`Website ansehen`,"common.copy":`Kopieren`,"common.open":`Öffnen`,"common.failedToLoad":`Laden fehlgeschlagen`,"common.signedIn":`Angemeldet`,"collection.filter.all":`Alle`,"nav.home":`Start`,"nav.content":`Inhalte`,"nav.more":`Mehr`,"nav.approvals":`Freigaben`,"nav.settings":`Einstellungen`,"status.draft":`Entwürfe`,"status.review":`In Prüfung`,"status.published":`Veröffentlicht`,"status.archived":`Archiviert`,"preferences.heading":`Präferenzen`,"preferences.language":`Admin-Sprache`,"preferences.language.search":`Sprachen suchen...`,"preferences.language.noResults":`Keine Sprachen gefunden.`,"preferences.direction":`Textrichtung`,"preferences.direction.auto":`Die Textrichtung folgt der gewählten Sprache.`,"preferences.appearance":`Darstellung`,"preferences.light":`Hell`,"preferences.dark":`Dunkel`,"preferences.system":`System`,"preferences.ltr":`Links nach rechts`,"preferences.rtl":`Rechts nach links`,"preferences.page.open":`Präferenzen`,"preferences.page.title":`Persönliche Präferenzen`,"preferences.page.body":`Diese Präferenzen bleiben in diesem Browser. Sie ändern nur die Admin-Konsole und keine Website-Einstellungen.`,"preferences.page.languageBody":`Wähle die Sprache für Systemseiten und Admin-Chrome.`,"preferences.page.appearanceBody":`Wähle hell, dunkel oder dein Betriebssystem.`},es:{"auth.signIn.title":`Iniciar sesión`,"common.signOut":`Cerrar sesión`,"common.viewSite":`Ver sitio`,"common.copy":`Copiar`,"common.open":`Abrir`,"common.failedToLoad":`Error al cargar`,"common.signedIn":`Sesión iniciada`,"collection.filter.all":`Todo`,"nav.home":`Inicio`,"nav.content":`Contenido`,"nav.more":`Más`,"nav.approvals":`Aprobaciones`,"nav.settings":`Configuración`,"status.draft":`Borradores`,"status.review":`En revisión`,"status.published":`Publicado`,"status.archived":`Archivado`,"preferences.heading":`Preferencias`,"preferences.language":`Idioma del admin`,"preferences.language.search":`Buscar idiomas...`,"preferences.language.noResults":`No se encontraron idiomas.`,"preferences.direction":`Dirección del texto`,"preferences.direction.auto":`La dirección del texto sigue el idioma seleccionado.`,"preferences.appearance":`Apariencia`,"preferences.light":`Claro`,"preferences.dark":`Oscuro`,"preferences.system":`Sistema`,"preferences.ltr":`Izquierda a derecha`,"preferences.rtl":`Derecha a izquierda`,"preferences.page.open":`Preferencias`,"preferences.page.title":`Preferencias personales`,"preferences.page.body":`Estas preferencias se guardan en este navegador. Solo cambian la consola de administración y no modifican la configuración del sitio.`,"preferences.page.languageBody":`Elige el idioma de las páginas del sistema y la interfaz de administración.`,"preferences.page.appearanceBody":`Elige claro, oscuro o seguir el sistema operativo.`},fr:{"auth.signIn.title":`Se connecter`,"common.signOut":`Se déconnecter`,"common.viewSite":`Voir le site`,"common.copy":`Copier`,"common.open":`Ouvrir`,"common.failedToLoad":`Échec du chargement`,"common.signedIn":`Connecté`,"collection.filter.all":`Tout`,"nav.home":`Accueil`,"nav.content":`Contenu`,"nav.more":`Plus`,"nav.approvals":`Approbations`,"nav.settings":`Paramètres`,"status.draft":`Brouillons`,"status.review":`En révision`,"status.published":`Publié`,"status.archived":`Archivé`,"preferences.heading":`Préférences`,"preferences.language":`Langue admin`,"preferences.language.search":`Rechercher une langue...`,"preferences.language.noResults":`Aucune langue trouvée.`,"preferences.direction":`Direction du texte`,"preferences.direction.auto":`La direction du texte suit la langue sélectionnée.`,"preferences.appearance":`Apparence`,"preferences.light":`Clair`,"preferences.dark":`Sombre`,"preferences.system":`Système`,"preferences.ltr":`Gauche à droite`,"preferences.rtl":`Droite à gauche`,"preferences.page.open":`Préférences`,"preferences.page.title":`Préférences personnelles`,"preferences.page.body":`Ces préférences restent dans ce navigateur. Elles modifient seulement la console admin, pas les paramètres du site.`,"preferences.page.languageBody":`Choisissez la langue des pages système et de l'interface admin.`,"preferences.page.appearanceBody":`Choisissez clair, sombre ou le thème du système.`},it:{"auth.signIn.title":`Accedi`,"common.signOut":`Esci`,"common.viewSite":`Vedi sito`,"common.copy":`Copia`,"common.open":`Apri`,"common.failedToLoad":`Caricamento non riuscito`,"common.signedIn":`Accesso effettuato`,"collection.filter.all":`Tutto`,"nav.home":`Home`,"nav.content":`Contenuti`,"nav.more":`Altro`,"nav.approvals":`Approvazioni`,"nav.settings":`Impostazioni`,"status.draft":`Bozze`,"status.review":`In revisione`,"status.published":`Pubblicato`,"status.archived":`Archiviato`,"preferences.heading":`Preferenze`,"preferences.language":`Lingua admin`,"preferences.language.search":`Cerca lingue...`,"preferences.language.noResults":`Nessuna lingua trovata.`,"preferences.direction":`Direzione testo`,"preferences.direction.auto":`La direzione del testo segue la lingua selezionata.`,"preferences.appearance":`Aspetto`,"preferences.light":`Chiaro`,"preferences.dark":`Scuro`,"preferences.system":`Sistema`,"preferences.ltr":`Da sinistra a destra`,"preferences.rtl":`Da destra a sinistra`,"preferences.page.open":`Preferenze`,"preferences.page.title":`Preferenze personali`,"preferences.page.body":`Queste preferenze restano in questo browser. Modificano solo la console admin e non le impostazioni del sito.`,"preferences.page.languageBody":`Scegli la lingua delle pagine di sistema e dell'interfaccia admin.`,"preferences.page.appearanceBody":`Scegli chiaro, scuro o segui il sistema operativo.`},ja:{"auth.signIn.title":`サインイン`,"auth.signIn.methodsLoadFailed":`サインイン方法を読み込めませんでした。再読み込みしてください。`,"auth.signIn.noMethods":`このサイトにはサインイン方法が設定されていません。`,"auth.signIn.unknownMethod":`未対応のサインイン方法: {kind}`,"auth.signIn.method.social.button":`{provider} でサインイン`,"auth.signIn.method.email-otp.body":`メールに届くワンタイムコードでサインインします。`,"auth.signIn.method.email-otp.emailLabel":`メールアドレス`,"auth.signIn.method.email-otp.emailPlaceholder":`you@example.com`,"auth.signIn.method.email-otp.sendButton":`コードを送信`,"auth.signIn.method.email-otp.sendFailed":`コードの送信に失敗しました。メールを確認してもう一度お試しください。`,"auth.signIn.method.email-otp.sentTo":`{email} にコードを送信しました。`,"auth.signIn.method.email-otp.otpLabel":`ワンタイムコード`,"auth.signIn.method.email-otp.otpPlaceholder":`6 桁のコードを入力`,"auth.signIn.method.email-otp.verifyButton":`コードを確認してサインイン`,"auth.signIn.method.email-otp.verifyFailed":`コードが一致しません。もう一度入力してください。`,"auth.signIn.method.email-otp.back":`別のメールアドレスを使う`,"auth.signIn.method.magic-link.body":`ワンタップでサインインできるリンクをメールでお送りします。`,"auth.signIn.method.magic-link.emailLabel":`メールアドレス`,"auth.signIn.method.magic-link.emailPlaceholder":`you@example.com`,"auth.signIn.method.magic-link.sendButton":`サインインリンクを送信`,"auth.signIn.method.magic-link.sendFailed":`リンクの送信に失敗しました。メールを確認してもう一度お試しください。`,"auth.signIn.method.magic-link.sentTo":`{email} にサインインリンクを送信しました。`,"auth.signIn.method.magic-link.clickHint":`メール内のリンクをクリックしてサインインを完了してください。リンクはまもなく失効します。`,"auth.signIn.method.magic-link.anotherEmail":`別のメールアドレスを使う`,"common.signOut":`サインアウト`,"common.viewSite":`サイトを見る`,"common.copy":`コピー`,"common.open":`開く`,"common.failedToLoad":`読み込みに失敗しました`,"common.signedIn":`サインイン済み`,"collection.filter.all":`すべて`,"nav.home":`ホーム`,"nav.content":`コンテンツ`,"nav.more":`その他`,"nav.approvals":`承認`,"nav.settings":`設定`,"status.draft":`下書き`,"status.review":`レビュー中`,"status.published":`公開済み`,"status.archived":`アーカイブ済み`,"preferences.heading":`環境設定`,"preferences.language":`管理画面の言語`,"preferences.language.search":`言語を検索...`,"preferences.language.noResults":`言語が見つかりません。`,"preferences.direction":`文字方向`,"preferences.direction.auto":`文字方向は選択した言語に従います。`,"preferences.appearance":`外観`,"preferences.light":`ライト`,"preferences.dark":`ダーク`,"preferences.system":`システム`,"preferences.ltr":`左から右`,"preferences.rtl":`右から左`,"preferences.page.open":`環境設定`,"preferences.page.title":`個人設定`,"preferences.page.body":`これらの設定はこのブラウザにのみ保存されます。管理コンソールだけに影響し、サイト設定は変更しません。`,"preferences.page.languageBody":`システムページと管理 UI で使う言語を選びます。`,"preferences.page.appearanceBody":`ライト、ダーク、またはシステム設定に合わせます。`},ko:{"auth.signIn.title":`로그인`,"common.signOut":`로그아웃`,"common.viewSite":`사이트 보기`,"common.copy":`복사`,"common.open":`열기`,"common.failedToLoad":`로드 실패`,"common.signedIn":`로그인됨`,"collection.filter.all":`전체`,"nav.home":`홈`,"nav.content":`콘텐츠`,"nav.more":`더보기`,"nav.approvals":`승인`,"nav.settings":`설정`,"status.draft":`초안`,"status.review":`검토 중`,"status.published":`게시됨`,"status.archived":`보관됨`,"preferences.heading":`환경설정`,"preferences.language":`관리 언어`,"preferences.language.search":`언어 검색...`,"preferences.language.noResults":`언어를 찾을 수 없습니다.`,"preferences.direction":`텍스트 방향`,"preferences.direction.auto":`텍스트 방향은 선택한 언어를 따릅니다.`,"preferences.appearance":`화면 모드`,"preferences.light":`라이트`,"preferences.dark":`다크`,"preferences.system":`시스템`,"preferences.ltr":`왼쪽에서 오른쪽`,"preferences.rtl":`오른쪽에서 왼쪽`,"preferences.page.open":`환경설정`,"preferences.page.title":`개인 환경설정`,"preferences.page.body":`이 설정은 이 브라우저에만 저장됩니다. 관리 콘솔에만 적용되며 사이트 설정은 변경하지 않습니다.`,"preferences.page.languageBody":`시스템 페이지와 관리 UI에 사용할 언어를 선택합니다.`,"preferences.page.appearanceBody":`라이트, 다크 또는 운영체제 설정을 따르도록 선택합니다.`},"pt-BR":{"auth.signIn.title":`Entrar`,"common.signOut":`Sair`,"common.viewSite":`Ver site`,"common.copy":`Copiar`,"common.open":`Abrir`,"common.failedToLoad":`Falha ao carregar`,"common.signedIn":`Conectado`,"collection.filter.all":`Todos`,"nav.home":`Início`,"nav.content":`Conteúdo`,"nav.more":`Mais`,"nav.approvals":`Aprovações`,"nav.settings":`Configurações`,"status.draft":`Rascunhos`,"status.review":`Em revisão`,"status.published":`Publicado`,"status.archived":`Arquivado`,"preferences.heading":`Preferências`,"preferences.language":`Idioma do admin`,"preferences.language.search":`Pesquisar idiomas...`,"preferences.language.noResults":`Nenhum idioma encontrado.`,"preferences.direction":`Direção do texto`,"preferences.direction.auto":`A direção do texto segue o idioma selecionado.`,"preferences.appearance":`Aparência`,"preferences.light":`Claro`,"preferences.dark":`Escuro`,"preferences.system":`Sistema`,"preferences.ltr":`Esquerda para direita`,"preferences.rtl":`Direita para esquerda`,"preferences.page.open":`Preferências`,"preferences.page.title":`Preferências pessoais`,"preferences.page.body":`Estas preferências ficam neste navegador. Elas mudam apenas o console admin e não alteram as configurações do site.`,"preferences.page.languageBody":`Escolha o idioma das páginas do sistema e da interface admin.`,"preferences.page.appearanceBody":`Escolha claro, escuro ou seguir o sistema operacional.`},ru:{"auth.signIn.title":`Войти`,"common.signOut":`Выйти`,"common.viewSite":`Открыть сайт`,"common.copy":`Копировать`,"common.open":`Открыть`,"common.failedToLoad":`Не удалось загрузить`,"common.signedIn":`Вы вошли`,"collection.filter.all":`Все`,"nav.home":`Главная`,"nav.content":`Контент`,"nav.more":`Еще`,"nav.approvals":`Одобрения`,"nav.settings":`Настройки`,"status.draft":`Черновики`,"status.review":`На проверке`,"status.published":`Опубликовано`,"status.archived":`Архив`,"preferences.heading":`Предпочтения`,"preferences.language":`Язык админки`,"preferences.language.search":`Поиск языков...`,"preferences.language.noResults":`Языки не найдены.`,"preferences.direction":`Направление текста`,"preferences.direction.auto":`Направление текста следует выбранному языку.`,"preferences.appearance":`Внешний вид`,"preferences.light":`Светлая`,"preferences.dark":`Темная`,"preferences.system":`Система`,"preferences.ltr":`Слева направо`,"preferences.rtl":`Справа налево`,"preferences.page.open":`Предпочтения`,"preferences.page.title":`Личные предпочтения`,"preferences.page.body":`Эти предпочтения хранятся в этом браузере. Они меняют только админ-консоль и не изменяют настройки сайта.`,"preferences.page.languageBody":`Выберите язык системных страниц и интерфейса админки.`,"preferences.page.appearanceBody":`Выберите светлую, темную тему или тему системы.`},nl:{"auth.signIn.title":`Inloggen`,"common.signOut":`Uitloggen`,"common.viewSite":`Site bekijken`,"common.copy":`Kopiëren`,"common.open":`Openen`,"common.failedToLoad":`Laden mislukt`,"common.signedIn":`Ingelogd`,"collection.filter.all":`Alles`,"nav.home":`Home`,"nav.content":`Content`,"nav.more":`Meer`,"nav.approvals":`Goedkeuringen`,"nav.settings":`Instellingen`,"status.draft":`Concepten`,"status.review":`In review`,"status.published":`Gepubliceerd`,"status.archived":`Gearchiveerd`,"preferences.heading":`Voorkeuren`,"preferences.language":`Beheertaal`,"preferences.language.search":`Talen zoeken...`,"preferences.language.noResults":`Geen talen gevonden.`,"preferences.direction":`Tekstrichting`,"preferences.direction.auto":`De tekstrichting volgt de gekozen taal.`,"preferences.appearance":`Weergave`,"preferences.light":`Licht`,"preferences.dark":`Donker`,"preferences.system":`Systeem`,"preferences.ltr":`Links naar rechts`,"preferences.rtl":`Rechts naar links`,"preferences.page.open":`Voorkeuren`,"preferences.page.title":`Persoonlijke voorkeuren`,"preferences.page.body":`Deze voorkeuren blijven in deze browser. Ze wijzigen alleen de adminconsole en niet de site-instellingen.`,"preferences.page.languageBody":`Kies de taal voor systeempagina's en de admininterface.`,"preferences.page.appearanceBody":`Kies licht, donker of volg het besturingssysteem.`},pl:{"auth.signIn.title":`Zaloguj się`,"common.signOut":`Wyloguj się`,"common.viewSite":`Zobacz stronę`,"common.copy":`Kopiuj`,"common.open":`Otwórz`,"common.failedToLoad":`Nie udało się załadować`,"common.signedIn":`Zalogowano`,"collection.filter.all":`Wszystkie`,"nav.home":`Start`,"nav.content":`Treści`,"nav.more":`Więcej`,"nav.approvals":`Zatwierdzenia`,"nav.settings":`Ustawienia`,"status.draft":`Szkice`,"status.review":`W recenzji`,"status.published":`Opublikowane`,"status.archived":`Zarchiwizowane`,"preferences.heading":`Preferencje`,"preferences.language":`Język panelu`,"preferences.language.search":`Szukaj języków...`,"preferences.language.noResults":`Nie znaleziono języków.`,"preferences.direction":`Kierunek tekstu`,"preferences.direction.auto":`Kierunek tekstu wynika z wybranego języka.`,"preferences.appearance":`Wygląd`,"preferences.light":`Jasny`,"preferences.dark":`Ciemny`,"preferences.system":`System`,"preferences.ltr":`Od lewej do prawej`,"preferences.rtl":`Od prawej do lewej`,"preferences.page.open":`Preferencje`,"preferences.page.title":`Preferencje osobiste`,"preferences.page.body":`Te preferencje są zapisane w tej przeglądarce. Zmieniają tylko konsolę administracyjną, nie ustawienia strony.`,"preferences.page.languageBody":`Wybierz język stron systemowych i interfejsu admina.`,"preferences.page.appearanceBody":`Wybierz jasny, ciemny lub zgodny z systemem.`},tr:{"auth.signIn.title":`Oturum aç`,"common.signOut":`Çıkış yap`,"common.viewSite":`Siteyi görüntüle`,"common.copy":`Kopyala`,"common.open":`Aç`,"common.failedToLoad":`Yüklenemedi`,"common.signedIn":`Oturum açık`,"collection.filter.all":`Tümü`,"nav.home":`Ana sayfa`,"nav.content":`İçerik`,"nav.more":`Daha fazla`,"nav.approvals":`Onaylar`,"nav.settings":`Ayarlar`,"status.draft":`Taslaklar`,"status.review":`İncelemede`,"status.published":`Yayında`,"status.archived":`Arşivlendi`,"preferences.heading":`Tercihler`,"preferences.language":`Yönetici dili`,"preferences.language.search":`Dil ara...`,"preferences.language.noResults":`Dil bulunamadı.`,"preferences.direction":`Metin yönü`,"preferences.direction.auto":`Metin yönü seçilen dili izler.`,"preferences.appearance":`Görünüm`,"preferences.light":`Açık`,"preferences.dark":`Koyu`,"preferences.system":`Sistem`,"preferences.ltr":`Soldan sağa`,"preferences.rtl":`Sağdan sola`,"preferences.page.open":`Tercihler`,"preferences.page.title":`Kişisel tercihler`,"preferences.page.body":`Bu tercihler bu tarayıcıda kalır. Yalnızca yönetim konsolunu değiştirir, site ayarlarını değiştirmez.`,"preferences.page.languageBody":`Sistem sayfaları ve yönetim arayüzü için dili seçin.`,"preferences.page.appearanceBody":`Açık, koyu veya işletim sistemini takip et seçeneğini seçin.`},vi:{"auth.signIn.title":`Đăng nhập`,"common.signOut":`Đăng xuất`,"common.viewSite":`Xem trang`,"common.copy":`Sao chép`,"common.open":`Mở`,"common.failedToLoad":`Tải thất bại`,"common.signedIn":`Đã đăng nhập`,"collection.filter.all":`Tất cả`,"nav.home":`Trang chủ`,"nav.content":`Nội dung`,"nav.more":`Thêm`,"nav.approvals":`Phê duyệt`,"nav.settings":`Cài đặt`,"status.draft":`Bản nháp`,"status.review":`Đang duyệt`,"status.published":`Đã xuất bản`,"status.archived":`Đã lưu trữ`,"preferences.heading":`Tùy chọn`,"preferences.language":`Ngôn ngữ quản trị`,"preferences.language.search":`Tìm ngôn ngữ...`,"preferences.language.noResults":`Không tìm thấy ngôn ngữ.`,"preferences.direction":`Hướng văn bản`,"preferences.direction.auto":`Hướng văn bản theo ngôn ngữ đã chọn.`,"preferences.appearance":`Giao diện`,"preferences.light":`Sáng`,"preferences.dark":`Tối`,"preferences.system":`Hệ thống`,"preferences.ltr":`Trái sang phải`,"preferences.rtl":`Phải sang trái`,"preferences.page.open":`Tùy chọn`,"preferences.page.title":`Tùy chọn cá nhân`,"preferences.page.body":`Các tùy chọn này chỉ lưu trong trình duyệt này. Chúng chỉ thay đổi admin console và không sửa cài đặt trang.`,"preferences.page.languageBody":`Chọn ngôn ngữ cho trang hệ thống và giao diện quản trị.`,"preferences.page.appearanceBody":`Chọn sáng, tối hoặc theo hệ điều hành.`},cs:{"auth.signIn.title":`Přihlásit se`,"common.signOut":`Odhlásit se`,"common.viewSite":`Zobrazit web`,"common.copy":`Kopírovat`,"common.open":`Otevřít`,"common.failedToLoad":`Načtení selhalo`,"common.signedIn":`Přihlášeno`,"collection.filter.all":`Vše`,"nav.home":`Domů`,"nav.content":`Obsah`,"nav.more":`Více`,"nav.approvals":`Schválení`,"nav.settings":`Nastavení`,"status.draft":`Koncepty`,"status.review":`V kontrole`,"status.published":`Publikováno`,"status.archived":`Archivováno`,"preferences.heading":`Předvolby`,"preferences.language":`Jazyk administrace`,"preferences.language.search":`Hledat jazyky...`,"preferences.language.noResults":`Nenalezeny žádné jazyky.`,"preferences.direction":`Směr textu`,"preferences.direction.auto":`Směr textu se řídí vybraným jazykem.`,"preferences.appearance":`Vzhled`,"preferences.light":`Světlý`,"preferences.dark":`Tmavý`,"preferences.system":`Systém`,"preferences.ltr":`Zleva doprava`,"preferences.rtl":`Zprava doleva`,"preferences.page.open":`Předvolby`,"preferences.page.title":`Osobní předvolby`,"preferences.page.body":`Tyto předvolby zůstávají v tomto prohlížeči. Mění jen administrační konzoli, ne nastavení webu.`,"preferences.page.languageBody":`Vyberte jazyk systémových stránek a administračního rozhraní.`,"preferences.page.appearanceBody":`Vyberte světlý, tmavý nebo systémový režim.`},uk:{"auth.signIn.title":`Увійти`,"common.signOut":`Вийти`,"common.viewSite":`Переглянути сайт`,"common.copy":`Копіювати`,"common.open":`Відкрити`,"common.failedToLoad":`Не вдалося завантажити`,"common.signedIn":`Ви увійшли`,"collection.filter.all":`Усі`,"nav.home":`Головна`,"nav.content":`Контент`,"nav.more":`Більше`,"nav.approvals":`Схвалення`,"nav.settings":`Налаштування`,"status.draft":`Чернетки`,"status.review":`На перевірці`,"status.published":`Опубліковано`,"status.archived":`Архівовано`,"preferences.heading":`Параметри`,"preferences.language":`Мова адмінки`,"preferences.language.search":`Пошук мов...`,"preferences.language.noResults":`Мови не знайдено.`,"preferences.direction":`Напрям тексту`,"preferences.direction.auto":`Напрям тексту відповідає вибраній мові.`,"preferences.appearance":`Вигляд`,"preferences.light":`Світла`,"preferences.dark":`Темна`,"preferences.system":`Система`,"preferences.ltr":`Зліва направо`,"preferences.rtl":`Справа наліво`,"preferences.page.open":`Параметри`,"preferences.page.title":`Особисті параметри`,"preferences.page.body":`Ці параметри зберігаються в цьому браузері. Вони змінюють лише адмін-консоль, а не налаштування сайту.`,"preferences.page.languageBody":`Виберіть мову системних сторінок та адмін-інтерфейсу.`,"preferences.page.appearanceBody":`Виберіть світлу, темну тему або тему системи.`},ar:{"auth.signIn.title":`تسجيل الدخول`,"common.signOut":`تسجيل الخروج`,"common.viewSite":`عرض الموقع`,"common.copy":`نسخ`,"common.open":`فتح`,"common.failedToLoad":`فشل التحميل`,"common.signedIn":`تم تسجيل الدخول`,"collection.filter.all":`الكل`,"nav.home":`الرئيسية`,"nav.content":`المحتوى`,"nav.more":`المزيد`,"nav.approvals":`الموافقات`,"nav.settings":`الإعدادات`,"status.draft":`مسودات`,"status.review":`قيد المراجعة`,"status.published":`منشور`,"status.archived":`مؤرشف`,"preferences.heading":`التفضيلات`,"preferences.language":`لغة الإدارة`,"preferences.language.search":`ابحث عن اللغات...`,"preferences.language.noResults":`لم يتم العثور على لغات.`,"preferences.direction":`اتجاه النص`,"preferences.direction.auto":`يتبع اتجاه النص اللغة المحددة.`,"preferences.appearance":`المظهر`,"preferences.light":`فاتح`,"preferences.dark":`داكن`,"preferences.system":`النظام`,"preferences.ltr":`من اليسار إلى اليمين`,"preferences.rtl":`من اليمين إلى اليسار`,"preferences.page.open":`التفضيلات`,"preferences.page.title":`التفضيلات الشخصية`,"preferences.page.body":`تبقى هذه التفضيلات في هذا المتصفح. إنها تغيّر وحدة الإدارة فقط ولا تعدّل إعدادات الموقع.`,"preferences.page.languageBody":`اختر لغة صفحات النظام وواجهة الإدارة.`,"preferences.page.appearanceBody":`اختر الوضع الفاتح أو الداكن أو اتبع نظام التشغيل.`},he:{"auth.signIn.title":`כניסה`,"common.signOut":`יציאה`,"common.viewSite":`הצג אתר`,"common.copy":`העתק`,"common.open":`פתח`,"common.failedToLoad":`הטעינה נכשלה`,"common.signedIn":`מחובר`,"collection.filter.all":`הכול`,"nav.home":`בית`,"nav.content":`תוכן`,"nav.more":`עוד`,"nav.approvals":`אישורים`,"nav.settings":`הגדרות`,"status.draft":`טיוטות`,"status.review":`בבדיקה`,"status.published":`פורסם`,"status.archived":`בארכיון`,"preferences.heading":`העדפות`,"preferences.language":`שפת ניהול`,"preferences.language.search":`חפש שפות...`,"preferences.language.noResults":`לא נמצאו שפות.`,"preferences.direction":`כיוון טקסט`,"preferences.direction.auto":`כיוון הטקסט נקבע לפי השפה שנבחרה.`,"preferences.appearance":`מראה`,"preferences.light":`בהיר`,"preferences.dark":`כהה`,"preferences.system":`מערכת`,"preferences.ltr":`משמאל לימין`,"preferences.rtl":`מימין לשמאל`,"preferences.page.open":`העדפות`,"preferences.page.title":`העדפות אישיות`,"preferences.page.body":`העדפות אלה נשמרות בדפדפן הזה. הן משנות רק את מסוף הניהול ולא את הגדרות האתר.`,"preferences.page.languageBody":`בחר את שפת דפי המערכת וממשק הניהול.`,"preferences.page.appearanceBody":`בחר בהיר, כהה או לפי מערכת ההפעלה.`},fa:{"auth.signIn.title":`ورود`,"common.signOut":`خروج`,"common.viewSite":`مشاهده سایت`,"common.copy":`کپی`,"common.open":`باز کردن`,"common.failedToLoad":`بارگذاری ناموفق بود`,"common.signedIn":`وارد شدهاید`,"collection.filter.all":`همه`,"nav.home":`خانه`,"nav.content":`محتوا`,"nav.more":`بیشتر`,"nav.approvals":`تأییدها`,"nav.settings":`تنظیمات`,"status.draft":`پیشنویسها`,"status.review":`در بازبینی`,"status.published":`منتشر شده`,"status.archived":`بایگانی شده`,"preferences.heading":`ترجیحات`,"preferences.language":`زبان مدیریت`,"preferences.language.search":`جستجوی زبانها...`,"preferences.language.noResults":`زبانی پیدا نشد.`,"preferences.direction":`جهت متن`,"preferences.direction.auto":`جهت متن از زبان انتخابشده پیروی میکند.`,"preferences.appearance":`ظاهر`,"preferences.light":`روشن`,"preferences.dark":`تیره`,"preferences.system":`سیستم`,"preferences.ltr":`چپ به راست`,"preferences.rtl":`راست به چپ`,"preferences.page.open":`ترجیحات`,"preferences.page.title":`ترجیحات شخصی`,"preferences.page.body":`این ترجیحات در همین مرورگر ذخیره میشود. فقط کنسول مدیریت را تغییر میدهد و تنظیمات سایت را تغییر نمیدهد.`,"preferences.page.languageBody":`زبان صفحات سیستمی و رابط مدیریت را انتخاب کنید.`,"preferences.page.appearanceBody":`روشن، تیره یا پیروی از سیستمعامل را انتخاب کنید.`},th:{"auth.signIn.title":`เข้าสู่ระบบ`,"common.signOut":`ออกจากระบบ`,"common.viewSite":`ดูเว็บไซต์`,"common.copy":`คัดลอก`,"common.open":`เปิด`,"common.failedToLoad":`โหลดไม่สำเร็จ`,"common.signedIn":`เข้าสู่ระบบแล้ว`,"collection.filter.all":`ทั้งหมด`,"nav.home":`หน้าแรก`,"nav.content":`เนื้อหา`,"nav.more":`เพิ่มเติม`,"nav.approvals":`การอนุมัติ`,"nav.settings":`การตั้งค่า`,"status.draft":`ฉบับร่าง`,"status.review":`กำลังตรวจสอบ`,"status.published":`เผยแพร่แล้ว`,"status.archived":`เก็บถาวร`,"preferences.heading":`ค่ากำหนด`,"preferences.language":`ภาษาผู้ดูแล`,"preferences.language.search":`ค้นหาภาษา...`,"preferences.language.noResults":`ไม่พบภาษา`,"preferences.direction":`ทิศทางข้อความ`,"preferences.direction.auto":`ทิศทางข้อความจะตามภาษาที่เลือก`,"preferences.appearance":`รูปลักษณ์`,"preferences.light":`สว่าง`,"preferences.dark":`มืด`,"preferences.system":`ระบบ`,"preferences.ltr":`ซ้ายไปขวา`,"preferences.rtl":`ขวาไปซ้าย`,"preferences.page.open":`ค่ากำหนด`,"preferences.page.title":`ค่ากำหนดส่วนตัว`,"preferences.page.body":`ค่ากำหนดเหล่านี้จะอยู่ในเบราว์เซอร์นี้เท่านั้น และมีผลกับ admin console โดยไม่แก้การตั้งค่าเว็บไซต์`,"preferences.page.languageBody":`เลือกภาษาสำหรับหน้าระบบและส่วนติดต่อผู้ดูแล`,"preferences.page.appearanceBody":`เลือกสว่าง มืด หรือใช้ตามระบบปฏิบัติการ`},id:{"auth.signIn.title":`Masuk`,"common.signOut":`Keluar`,"common.viewSite":`Lihat situs`,"common.copy":`Salin`,"common.open":`Buka`,"common.failedToLoad":`Gagal memuat`,"common.signedIn":`Sudah masuk`,"collection.filter.all":`Semua`,"nav.home":`Beranda`,"nav.content":`Konten`,"nav.more":`Lainnya`,"nav.approvals":`Persetujuan`,"nav.settings":`Pengaturan`,"status.draft":`Draf`,"status.review":`Dalam ulasan`,"status.published":`Terbit`,"status.archived":`Arsip`,"preferences.heading":`Preferensi`,"preferences.language":`Bahasa admin`,"preferences.language.search":`Cari bahasa...`,"preferences.language.noResults":`Bahasa tidak ditemukan.`,"preferences.direction":`Arah teks`,"preferences.direction.auto":`Arah teks mengikuti bahasa yang dipilih.`,"preferences.appearance":`Tampilan`,"preferences.light":`Terang`,"preferences.dark":`Gelap`,"preferences.system":`Sistem`,"preferences.ltr":`Kiri ke kanan`,"preferences.rtl":`Kanan ke kiri`,"preferences.page.open":`Preferensi`,"preferences.page.title":`Preferensi pribadi`,"preferences.page.body":`Preferensi ini tetap di browser ini. Preferensi hanya mengubah konsol admin dan tidak mengubah pengaturan situs.`,"preferences.page.languageBody":`Pilih bahasa untuk halaman sistem dan antarmuka admin.`,"preferences.page.appearanceBody":`Pilih terang, gelap, atau ikuti sistem operasi.`}};function Y(e,t,n={}){let r=Hc[e]?.[t]??Hc.en[t];for(let[e,t]of Object.entries(n))r=r.split(`{${e}}`).join(t);return r}function Uc({brand:e}){let{setOpenMobile:t}=Hs(),{language:n}=J();return(0,I.jsx)(Qs,{children:(0,I.jsx)($s,{children:(0,I.jsx)(tc,{asChild:!0,size:`lg`,className:`data-[slot=sidebar-menu-button]:!p-1.5`,children:(0,I.jsxs)(`a`,{href:e.href??`/admin`,onClick:()=>t(!1),children:[(0,I.jsx)(`span`,{className:`text-primary flex aspect-square size-8 items-center justify-center`,children:(0,I.jsx)(Bc,{className:`size-5`})}),(0,I.jsx)(`div`,{"data-sidebar-label":!0,className:`grid flex-1 text-start text-sm leading-tight`,children:(0,I.jsx)(`span`,{className:`truncate font-semibold`,children:Y(n,`admin.consoleTitle`)})})]})})})})}var Wc=`Collapsible`,[Gc,Kc]=G(Wc),[qc,Jc]=Gc(Wc),Yc=F.forwardRef((e,t)=>{let{__scopeCollapsible:n,open:r,defaultOpen:i,disabled:a,onOpenChange:o,...s}=e,[c,l]=Fi({prop:r,defaultProp:i??!1,onChange:o,caller:Wc});return(0,I.jsx)(qc,{scope:n,disabled:a,contentId:Ni(),open:c,onOpenToggle:F.useCallback(()=>l(e=>!e),[l]),children:(0,I.jsx)(zi.div,{"data-state":tl(c),"data-disabled":a?``:void 0,...s,ref:t})})});Yc.displayName=Wc;var Xc=`CollapsibleTrigger`,Zc=F.forwardRef((e,t)=>{let{__scopeCollapsible:n,...r}=e,i=Jc(Xc,n);return(0,I.jsx)(zi.button,{type:`button`,"aria-controls":i.open?i.contentId:void 0,"aria-expanded":i.open||!1,"data-state":tl(i.open),"data-disabled":i.disabled?``:void 0,disabled:i.disabled,...r,ref:t,onClick:W(e.onClick,i.onOpenToggle)})});Zc.displayName=Xc;var Qc=`CollapsibleContent`,$c=F.forwardRef((e,t)=>{let{forceMount:n,...r}=e,i=Jc(Qc,e.__scopeCollapsible);return(0,I.jsx)(Sa,{present:n||i.open,children:({present:e})=>(0,I.jsx)(el,{...r,ref:t,present:e})})});$c.displayName=Qc;var el=F.forwardRef((e,t)=>{let{__scopeCollapsible:n,present:r,children:i,...a}=e,o=Jc(Qc,n),[s,c]=F.useState(r),l=F.useRef(null),u=Un(t,l),d=F.useRef(0),f=d.current,p=F.useRef(0),m=p.current,h=o.open||s,g=F.useRef(h),_=F.useRef(void 0);return F.useEffect(()=>{let e=requestAnimationFrame(()=>g.current=!1);return()=>cancelAnimationFrame(e)},[]),Ai(()=>{let e=l.current;if(e){_.current=_.current||{transitionDuration:e.style.transitionDuration,animationName:e.style.animationName},e.style.transitionDuration=`0s`,e.style.animationName=`none`;let t=e.getBoundingClientRect();d.current=t.height,p.current=t.width,g.current||(e.style.transitionDuration=_.current.transitionDuration,e.style.animationName=_.current.animationName),c(r)}},[o.open,r]),(0,I.jsx)(zi.div,{"data-state":tl(o.open),"data-disabled":o.disabled?``:void 0,id:o.contentId,hidden:!h,...a,ref:u,style:{"--radix-collapsible-content-height":f?`${f}px`:void 0,"--radix-collapsible-content-width":m?`${m}px`:void 0,...e.style},children:h&&i})});function tl(e){return e?`open`:`closed`}var nl=Yc,rl=Zc,il=$c;function al(e){let t=e+`CollectionProvider`,[n,r]=G(t),[i,a]=n(t,{collectionRef:{current:null},itemMap:new Map}),o=e=>{let{scope:t,children:n}=e,r=F.useRef(null),a=F.useRef(new Map).current;return(0,I.jsx)(i,{scope:t,itemMap:a,collectionRef:r,children:n})};o.displayName=t;let s=e+`CollectionSlot`,c=Wn(s),l=F.forwardRef((e,t)=>{let{scope:n,children:r}=e,i=Un(t,a(s,n).collectionRef);return(0,I.jsx)(c,{ref:i,children:r})});l.displayName=s;let u=e+`CollectionItemSlot`,d=`data-radix-collection-item`,f=Wn(u),p=F.forwardRef((e,t)=>{let{scope:n,children:r,...i}=e,o=F.useRef(null),s=Un(t,o),c=a(u,n);return F.useEffect(()=>(c.itemMap.set(o,{ref:o,...i}),()=>void c.itemMap.delete(o))),(0,I.jsx)(f,{[d]:``,ref:s,children:r})});p.displayName=u;function m(t){let n=a(e+`CollectionConsumer`,t);return F.useCallback(()=>{let e=n.collectionRef.current;if(!e)return[];let t=Array.from(e.querySelectorAll(`[${d}]`));return Array.from(n.itemMap.values()).sort((e,n)=>t.indexOf(e.ref.current)-t.indexOf(n.ref.current))},[n.collectionRef,n.itemMap])}return[{Provider:o,Slot:l,ItemSlot:p},m,r]}var ol=F.createContext(void 0);function sl(e){let t=F.useContext(ol);return e||t||`ltr`}var cl=[`top`,`right`,`bottom`,`left`],ll=Math.min,ul=Math.max,dl=Math.round,fl=Math.floor,pl=e=>({x:e,y:e}),ml={left:`right`,right:`left`,bottom:`top`,top:`bottom`};function hl(e,t,n){return ul(e,ll(t,n))}function gl(e,t){return typeof e==`function`?e(t):e}function _l(e){return e.split(`-`)[0]}function vl(e){return e.split(`-`)[1]}function yl(e){return e===`x`?`y`:`x`}function bl(e){return e===`y`?`height`:`width`}function xl(e){let t=e[0];return t===`t`||t===`b`?`y`:`x`}function Sl(e){return yl(xl(e))}function Cl(e,t,n){n===void 0&&(n=!1);let r=vl(e),i=Sl(e),a=bl(i),o=i===`x`?r===(n?`end`:`start`)?`right`:`left`:r===`start`?`bottom`:`top`;return t.reference[a]>t.floating[a]&&(o=Ml(o)),[o,Ml(o)]}function wl(e){let t=Ml(e);return[Tl(e),t,Tl(t)]}function Tl(e){return e.includes(`start`)?e.replace(`start`,`end`):e.replace(`end`,`start`)}var El=[`left`,`right`],Dl=[`right`,`left`],Ol=[`top`,`bottom`],kl=[`bottom`,`top`];function Al(e,t,n){switch(e){case`top`:case`bottom`:return n?t?Dl:El:t?El:Dl;case`left`:case`right`:return t?Ol:kl;default:return[]}}function jl(e,t,n,r){let i=vl(e),a=Al(_l(e),n===`start`,r);return i&&(a=a.map(e=>e+`-`+i),t&&(a=a.concat(a.map(Tl)))),a}function Ml(e){let t=_l(e);return ml[t]+e.slice(t.length)}function Nl(e){return{top:e.top??0,right:e.right??0,bottom:e.bottom??0,left:e.left??0}}function Pl(e){return typeof e==`number`?{top:e,right:e,bottom:e,left:e}:Nl(e)}function X(e){let{x:t,y:n,width:r,height:i}=e;return{width:r,height:i,top:n,left:t,right:t+r,bottom:n+i,x:t,y:n}}function Fl(e,t,n){let{reference:r,floating:i}=e,a=xl(t),o=Sl(t),s=bl(o),c=_l(t),l=a===`y`,u=r.x+r.width/2-i.width/2,d=r.y+r.height/2-i.height/2,f=r[s]/2-i[s]/2,p;switch(c){case`top`:p={x:u,y:r.y-i.height};break;case`bottom`:p={x:u,y:r.y+r.height};break;case`right`:p={x:r.x+r.width,y:d};break;case`left`:p={x:r.x-i.width,y:d};break;default:p={x:r.x,y:r.y}}let m=vl(t);return m&&(p[o]+=f*(m===`end`?1:-1)*(n&&l?-1:1)),p}async function Z(e,t){t===void 0&&(t={});let{x:n,y:r,platform:i,rects:a,elements:o,strategy:s}=e,{boundary:c=`clippingAncestors`,rootBoundary:l=`viewport`,elementContext:u=`floating`,altBoundary:d=!1,padding:f=0}=gl(t,e),p=Pl(f),m=o[d?u===`floating`?`reference`:`floating`:u],h=X(await i.getClippingRect({element:await(i.isElement==null?void 0:i.isElement(m))??!0?m:m.contextElement||await(i.getDocumentElement==null?void 0:i.getDocumentElement(o.floating)),boundary:c,rootBoundary:l,strategy:s})),g=u===`floating`?{x:n,y:r,width:a.floating.width,height:a.floating.height}:a.reference,_=await(i.getOffsetParent==null?void 0:i.getOffsetParent(o.floating)),v=await(i.isElement==null?void 0:i.isElement(_))&&await(i.getScale==null?void 0:i.getScale(_))||{x:1,y:1},y=X(i.convertOffsetParentRelativeRectToViewportRelativeRect?await i.convertOffsetParentRelativeRectToViewportRelativeRect({elements:o,rect:g,offsetParent:_,strategy:s}):g);return{top:(h.top-y.top+p.top)/v.y,bottom:(y.bottom-h.bottom+p.bottom)/v.y,left:(h.left-y.left+p.left)/v.x,right:(y.right-h.right+p.right)/v.x}}var Q=50,Il=async(e,t,n)=>{let{placement:r=`bottom`,strategy:i=`absolute`,middleware:a=[],platform:o}=n,s=o.detectOverflow?o:{...o,detectOverflow:Z},c=await(o.isRTL==null?void 0:o.isRTL(t)),l=await o.getElementRects({reference:e,floating:t,strategy:i}),{x:u,y:d}=Fl(l,r,c),f=r,p=0,m={};for(let n=0;n<a.length;n++){let h=a[n];if(!h)continue;let{name:g,fn:_}=h,{x:v,y,data:b,reset:x}=await _({x:u,y:d,initialPlacement:r,placement:f,strategy:i,middlewareData:m,rects:l,platform:s,elements:{reference:e,floating:t}});u=v??u,d=y??d,m[g]={...m[g],...b},x&&p<Q&&(p++,typeof x==`object`&&(x.placement&&(f=x.placement),x.rects&&(l=x.rects===!0?await o.getElementRects({reference:e,floating:t,strategy:i}):x.rects),{x:u,y:d}=Fl(l,f,c)),n=-1)}return{x:u,y:d,placement:f,strategy:i,middlewareData:m}},Ll=e=>({name:`arrow`,options:e,async fn(t){let{x:n,y:r,placement:i,rects:a,platform:o,elements:s,middlewareData:c}=t,{element:l,padding:u=0}=gl(e,t)||{};if(l==null)return{};let d=Pl(u),f={x:n,y:r},p=Sl(i),m=bl(p),h=await o.getDimensions(l),g=p===`y`,_=g?`top`:`left`,v=g?`bottom`:`right`,y=g?`clientHeight`:`clientWidth`,b=a.reference[m]+a.reference[p]-f[p]-a.floating[m],x=f[p]-a.reference[p],S=await(o.getOffsetParent==null?void 0:o.getOffsetParent(l)),C=S?S[y]:0;(!C||!await(o.isElement==null?void 0:o.isElement(S)))&&(C=s.floating[y]||a.floating[m]);let w=b/2-x/2,T=C/2-h[m]/2-1,E=ll(d[_],T),D=ll(d[v],T),O=C-h[m]-D,k=C/2-h[m]/2+w,ee=hl(E,k,O),te=!c.arrow&&vl(i)!=null&&k!==ee&&a.reference[m]/2-(k<E?E:D)-h[m]/2<0,A=te?k<E?k-E:k-O:0;return{[p]:f[p]+A,data:{[p]:ee,centerOffset:k-ee-A,...te&&{alignmentOffset:A}},reset:te}}}),Rl=function(e){return e===void 0&&(e={}),{name:`flip`,options:e,async fn(t){var n;let{placement:r,middlewareData:i,rects:a,initialPlacement:o,platform:s,elements:c}=t,{mainAxis:l=!0,crossAxis:u=!0,fallbackPlacements:d,fallbackStrategy:f=`bestFit`,fallbackAxisSideDirection:p=`none`,flipAlignment:m=!0,...h}=gl(e,t);if((n=i.arrow)!=null&&n.alignmentOffset)return{};let g=_l(r),_=xl(o),v=_l(o)===o,y=await(s.isRTL==null?void 0:s.isRTL(c.floating)),b=d||(v||!m?[Ml(o)]:wl(o)),x=p!==`none`;!d&&x&&b.push(...jl(o,m,p,y));let S=[o,...b],C=await s.detectOverflow(t,h),w=[],T=i.flip?.overflows||[];if(l&&w.push(C[g]),u){let e=Cl(r,a,y);w.push(C[e[0]],C[e[1]])}if(T=[...T,{placement:r,overflows:w}],!w.every(e=>e<=0)){let e=(i.flip?.index||0)+1,t=S[e];if(t&&(!(u===`alignment`&&_!==xl(t))||T.every(e=>xl(e.placement)!==_||e.overflows[0]>0)))return{data:{index:e,overflows:T},reset:{placement:t}};let n=T.filter(e=>e.overflows[0]<=0).sort((e,t)=>e.overflows[1]-t.overflows[1])[0]?.placement;if(!n)switch(f){case`bestFit`:{let e=T.filter(e=>{if(x){let t=xl(e.placement);return t===_||t===`y`}return!0}).map(e=>[e.placement,e.overflows.filter(e=>e>0).reduce((e,t)=>e+t,0)]).sort((e,t)=>e[1]-t[1])[0]?.[0];e&&(n=e);break}case`initialPlacement`:n=o;break}if(r!==n)return{reset:{placement:n}}}return{}}}};function zl(e,t){return{top:e.top-t.height,right:e.right-t.width,bottom:e.bottom-t.height,left:e.left-t.width}}function Bl(e){return cl.some(t=>e[t]>=0)}var Vl=function(e){return e===void 0&&(e={}),{name:`hide`,options:e,async fn(t){let{rects:n,platform:r}=t,{strategy:i=`referenceHidden`,...a}=gl(e,t);switch(i){case`referenceHidden`:{let e=zl(await r.detectOverflow(t,{...a,elementContext:`reference`}),n.reference);return{data:{referenceHiddenOffsets:e,referenceHidden:Bl(e)}}}case`escaped`:{let e=zl(await r.detectOverflow(t,{...a,altBoundary:!0}),n.floating);return{data:{escapedOffsets:e,escaped:Bl(e)}}}default:return{}}}}},Hl=new Set([`left`,`top`]);async function Ul(e,t){let{placement:n,platform:r,elements:i}=e,a=await(r.isRTL==null?void 0:r.isRTL(i.floating)),o=_l(n),s=vl(n),c=xl(n)===`y`,l=Hl.has(o)?-1:1,u=a&&c?-1:1,d=gl(t,e),{mainAxis:f,crossAxis:p,alignmentAxis:m}=typeof d==`number`?{mainAxis:d,crossAxis:0,alignmentAxis:null}:{mainAxis:d.mainAxis||0,crossAxis:d.crossAxis||0,alignmentAxis:d.alignmentAxis};return s&&typeof m==`number`&&(p=s===`end`?m*-1:m),c?{x:p*u,y:f*l}:{x:f*l,y:p*u}}var Wl=function(e){return e===void 0&&(e=0),{name:`offset`,options:e,async fn(t){var n;let{x:r,y:i,placement:a,middlewareData:o}=t,s=await Ul(t,e);return a===o.offset?.placement&&(n=o.arrow)!=null&&n.alignmentOffset?{}:{x:r+s.x,y:i+s.y,data:{...s,placement:a}}}}},Gl=function(e){return e===void 0&&(e={}),{name:`shift`,options:e,async fn(t){let{x:n,y:r,placement:i,platform:a}=t,{mainAxis:o=!0,crossAxis:s=!1,limiter:c={fn:e=>{let{x:t,y:n}=e;return{x:t,y:n}}},...l}=gl(e,t),u={x:n,y:r},d=await a.detectOverflow(t,l),f=xl(i),p=yl(f),m=u[p],h=u[f],g=(e,t)=>hl(t+d[e===`y`?`top`:`left`],t,t-d[e===`y`?`bottom`:`right`]);o&&(m=g(p,m)),s&&(h=g(f,h));let _=c.fn({...t,[p]:m,[f]:h});return{..._,data:{x:_.x-n,y:_.y-r,enabled:{[p]:o,[f]:s}}}}}},Kl=function(e){return e===void 0&&(e={}),{options:e,fn(t){let{x:n,y:r,placement:i,rects:a,middlewareData:o}=t,{offset:s=0,mainAxis:c=!0,crossAxis:l=!0}=gl(e,t),u={x:n,y:r},d=xl(i),f=yl(d),p=u[f],m=u[d],h=gl(s,t),g=typeof h==`number`?{mainAxis:h,crossAxis:0}:{mainAxis:h.mainAxis??0,crossAxis:h.crossAxis??0};if(c){let e=f===`y`?`height`:`width`,t=a.reference[f]-a.floating[e]+g.mainAxis,n=a.reference[f]+a.reference[e]-g.mainAxis;p<t?p=t:p>n&&(p=n)}if(l){let e=f===`y`?`width`:`height`,t=Hl.has(_l(i)),n=a.reference[d]-a.floating[e]+(t&&o.offset?.[d]||0)+(t?0:g.crossAxis),r=a.reference[d]+a.reference[e]+(t?0:o.offset?.[d]||0)-(t?g.crossAxis:0);m<n?m=n:m>r&&(m=r)}return{[f]:p,[d]:m}}}},ql=function(e){return e===void 0&&(e={}),{name:`size`,options:e,async fn(t){let{placement:n,rects:r,platform:i,elements:a}=t,{apply:o=()=>{},...s}=gl(e,t),c=await i.detectOverflow(t,s),l=_l(n),u=vl(n),d=xl(n)===`y`,{width:f,height:p}=r.floating,m,h;l===`top`||l===`bottom`?(m=l,h=u===(await(i.isRTL==null?void 0:i.isRTL(a.floating))?`start`:`end`)?`left`:`right`):(h=l,m=u===`end`?`top`:`bottom`);let g=p-c.top-c.bottom,_=f-c.left-c.right,v=ll(p-c[m],g),y=ll(f-c[h],_),b=t.middlewareData.shift,x=!b,S=v,C=y;b!=null&&b.enabled.x&&(C=_),b!=null&&b.enabled.y&&(S=g),x&&!u&&(d?C=f-2*ul(c.left,c.right):S=p-2*ul(c.top,c.bottom)),await o({...t,availableWidth:C,availableHeight:S});let w=await i.getDimensions(a.floating);return f!==w.width||p!==w.height?{reset:{rects:!0}}:{}}}};function Jl(){return typeof window<`u`}function Yl(e){return Ql(e)?(e.nodeName||``).toLowerCase():`#document`}function Xl(e){var t;return(e==null||(t=e.ownerDocument)==null?void 0:t.defaultView)||window}function Zl(e){return((Ql(e)?e.ownerDocument:e.document)||window.document)?.documentElement}function Ql(e){return Jl()?e instanceof Node||e instanceof Xl(e).Node:!1}function $l(e){return Jl()?e instanceof Element||e instanceof Xl(e).Element:!1}function eu(e){return Jl()?e instanceof HTMLElement||e instanceof Xl(e).HTMLElement:!1}function tu(e){return!Jl()||typeof ShadowRoot>`u`?!1:e instanceof ShadowRoot||e instanceof Xl(e).ShadowRoot}function nu(e){let{overflow:t,overflowX:n,overflowY:r,display:i}=pu(e);return/auto|scroll|overlay|hidden|clip/.test(t+r+n)&&i!==`inline`&&i!==`contents`}function ru(e){return/^(table|td|th)$/.test(Yl(e))}function iu(e){try{if(e.matches(`:popover-open`))return!0}catch{}try{return e.matches(`:modal`)}catch{return!1}}var au=/transform|translate|scale|rotate|perspective|filter/,ou=/paint|layout|strict|content/,su=e=>!!e&&e!==`none`,cu;function lu(e){let t=$l(e)?pu(e):e;return su(t.transform)||su(t.translate)||su(t.scale)||su(t.rotate)||su(t.perspective)||!du()&&(su(t.backdropFilter)||su(t.filter))||au.test(t.willChange||``)||ou.test(t.contain||``)}function uu(e){let t=hu(e);for(;eu(t)&&!fu(t);){if(lu(t))return t;if(iu(t))return null;t=hu(t)}return null}function du(){return cu??=typeof CSS<`u`&&CSS.supports&&CSS.supports(`-webkit-backdrop-filter`,`none`),cu}function fu(e){return/^(html|body|#document)$/.test(Yl(e))}function pu(e){return Xl(e).getComputedStyle(e)}function mu(e){return $l(e)?{scrollLeft:e.scrollLeft,scrollTop:e.scrollTop}:{scrollLeft:e.scrollX,scrollTop:e.scrollY}}function hu(e){if(Yl(e)===`html`)return e;let t=e.assignedSlot||e.parentNode||tu(e)&&e.host||Zl(e);return tu(t)?t.host:t}function gu(e){let t=hu(e);return fu(t)?(e.ownerDocument||e).body:eu(t)&&nu(t)?t:gu(t)}function _u(e,t,n){t===void 0&&(t=[]),n===void 0&&(n=!0);let r=gu(e),i=r===e.ownerDocument?.body,a=Xl(r);if(i){let e=vu(a);return t.concat(a,a.visualViewport||[],nu(r)?r:[],e&&n?_u(e):[])}else return t.concat(r,_u(r,[],n))}function vu(e){return e.parent&&Object.getPrototypeOf(e.parent)?e.frameElement:null}function yu(e){let t=pu(e),n=parseFloat(t.width)||0,r=parseFloat(t.height)||0,i=eu(e),a=i?e.offsetWidth:n,o=i?e.offsetHeight:r,s=dl(n)!==a||dl(r)!==o;return s&&(n=a,r=o),{width:n,height:r,$:s}}function bu(e){return $l(e)?e:e.contextElement}function xu(e){let t=bu(e);if(!eu(t))return pl(1);let n=t.getBoundingClientRect(),{width:r,height:i,$:a}=yu(t),o=(a?dl(n.width):n.width)/r,s=(a?dl(n.height):n.height)/i;return(!o||!Number.isFinite(o))&&(o=1),(!s||!Number.isFinite(s))&&(s=1),{x:o,y:s}}var Su=pl(0);function Cu(e){let t=Xl(e);return!du()||!t.visualViewport?Su:{x:t.visualViewport.offsetLeft,y:t.visualViewport.offsetTop}}function wu(e,t,n){return t===void 0&&(t=!1),!!n&&t&&n===Xl(e)}function Tu(e,t,n,r){t===void 0&&(t=!1),n===void 0&&(n=!1);let i=e.getBoundingClientRect(),a=bu(e),o=pl(1);t&&(r?$l(r)&&(o=xu(r)):o=xu(e));let s=wu(a,n,r)?Cu(a):pl(0),c=(i.left+s.x)/o.x,l=(i.top+s.y)/o.y,u=i.width/o.x,d=i.height/o.y;if(a&&r){let e=Xl(a),t=$l(r)?Xl(r):r,n=e,i=vu(n);for(;i&&t!==n;){let e=xu(i),t=i.getBoundingClientRect(),r=pu(i),a=t.left+(i.clientLeft+parseFloat(r.paddingLeft))*e.x,o=t.top+(i.clientTop+parseFloat(r.paddingTop))*e.y;c*=e.x,l*=e.y,u*=e.x,d*=e.y,c+=a,l+=o,n=Xl(i),i=vu(n)}}return X({width:u,height:d,x:c,y:l})}function Eu(e,t){let n=mu(e).scrollLeft;return t?t.left+n:Tu(Zl(e)).left+n}function Du(e,t){let n=e.getBoundingClientRect();return{x:n.left+t.scrollLeft-Eu(e,n),y:n.top+t.scrollTop}}function Ou(e){let{elements:t,rect:n,offsetParent:r,strategy:i}=e,a=i===`fixed`,o=Zl(r),s=t?iu(t.floating):!1;if(r===o||s&&a)return n;let c={scrollLeft:0,scrollTop:0},l=pl(1),u=pl(0),d=eu(r);if((d||!a)&&((Yl(r)!==`body`||nu(o))&&(c=mu(r)),d)){let e=Tu(r);l=xu(r),u.x=e.x+r.clientLeft,u.y=e.y+r.clientTop}let f=o&&!d&&!a?Du(o,c):pl(0);return{width:n.width*l.x,height:n.height*l.y,x:n.x*l.x-c.scrollLeft*l.x+u.x+f.x,y:n.y*l.y-c.scrollTop*l.y+u.y+f.y}}function ku(e){return e.getClientRects?Array.from(e.getClientRects()):[]}function Au(e){let t=mu(e),n=e.ownerDocument.body,r=ul(e.scrollWidth,e.clientWidth,n.scrollWidth,n.clientWidth),i=ul(e.scrollHeight,e.clientHeight,n.scrollHeight,n.clientHeight),a=-t.scrollLeft+Eu(e),o=-t.scrollTop;return pu(n).direction===`rtl`&&(a+=ul(e.clientWidth,n.clientWidth)-r),{width:r,height:i,x:a,y:o}}var ju=25;function Mu(e,t,n){n===void 0&&(n=`viewport`);let r=n===`layoutViewport`,i=Xl(e),a=Zl(e),o=i.visualViewport,s=a.clientWidth,c=a.clientHeight,l=0,u=0;if(o){let e=!du()||t===`fixed`;r?e||(l=-o.offsetLeft,u=-o.offsetTop):(s=o.width,c=o.height,e&&(l=o.offsetLeft,u=o.offsetTop))}if(Eu(a)<=0){let e=a.ownerDocument,t=e.body,n=getComputedStyle(t),r=e.compatMode===`CSS1Compat`&&parseFloat(n.marginLeft)+parseFloat(n.marginRight)||0,i=Math.abs(a.clientWidth-t.clientWidth-r),o=getComputedStyle(a).scrollbarGutter===`stable both-edges`?i/2:i;o<=ju&&(s-=o)}return{width:s,height:c,x:l,y:u}}function Nu(e,t){let n=Tu(e,!0,t===`fixed`),r=n.top+e.clientTop,i=n.left+e.clientLeft,a=xu(e);return{width:e.clientWidth*a.x,height:e.clientHeight*a.y,x:i*a.x,y:r*a.y}}function Pu(e,t,n){let r;if(t===`viewport`||t===`layoutViewport`)r=Mu(e,n,t);else if(t===`document`)r=Au(Zl(e));else if($l(t))r=Nu(t,n);else{let n=Cu(e);r={x:t.x-n.x,y:t.y-n.y,width:t.width,height:t.height}}return X(r)}function Fu(e,t){let n=t.get(e);if(n)return n;let r=_u(e,[],!1).filter(e=>$l(e)&&Yl(e)!==`body`),i=null,a=pu(e).position===`fixed`,o=a?hu(e):e;for(;$l(o)&&!fu(o);){let e=pu(o),t=lu(o),n=i?i.position:a?`fixed`:``;!t&&(n===`fixed`||n===`absolute`&&e.position===`static`)?r=r.filter(e=>e!==o):i=e,o=hu(o)}return t.set(e,r),r}function Iu(e){let{element:t,boundary:n,rootBoundary:r,strategy:i}=e,a=[...n===`clippingAncestors`?iu(t)?[]:Fu(t,this._c):[].concat(n),r],o=Pu(t,a[0],i),s=o.top,c=o.right,l=o.bottom,u=o.left;for(let e=1;e<a.length;e++){let n=Pu(t,a[e],i);s=ul(n.top,s),c=ll(n.right,c),l=ll(n.bottom,l),u=ul(n.left,u)}return{width:c-u,height:l-s,x:u,y:s}}function Lu(e){let{width:t,height:n}=yu(e);return{width:t,height:n}}function Ru(e,t,n){let r=eu(t),i=Zl(t),a=n===`fixed`,o=Tu(e,!0,a,t),s={scrollLeft:0,scrollTop:0},c=pl(0);if((r||!a)&&((Yl(t)!==`body`||nu(i))&&(s=mu(t)),r)){let e=Tu(t,!0,a,t);c.x=e.x+t.clientLeft,c.y=e.y+t.clientTop}!r&&i&&(c.x=Eu(i));let l=i&&!r&&!a?Du(i,s):pl(0);return{x:o.left+s.scrollLeft-c.x-l.x,y:o.top+s.scrollTop-c.y-l.y,width:o.width,height:o.height}}function zu(e){return pu(e).position===`static`}function Bu(e,t){if(!eu(e)||pu(e).position===`fixed`)return null;if(t)return t(e);let n=e.offsetParent;return Zl(e)===n&&(n=n.ownerDocument.body),n}function Vu(e,t){let n=Xl(e);if(iu(e))return n;if(!eu(e)){let t=hu(e);for(;t&&!fu(t);){if($l(t)&&!zu(t))return t;t=hu(t)}return n}let r=Bu(e,t);for(;r&&ru(r)&&zu(r);)r=Bu(r,t);return r&&fu(r)&&zu(r)&&!lu(r)?n:r||uu(e)||n}var Hu=async function(e){let t=this.getOffsetParent||Vu,n=this.getDimensions,r=await n(e.floating);return{reference:Ru(e.reference,await t(e.floating),e.strategy),floating:{x:0,y:0,width:r.width,height:r.height}}};function Uu(e){return pu(e).direction===`rtl`}var Wu={convertOffsetParentRelativeRectToViewportRelativeRect:Ou,getDocumentElement:Zl,getClippingRect:Iu,getOffsetParent:Vu,getElementRects:Hu,getClientRects:ku,getDimensions:Lu,getScale:xu,isElement:$l,isRTL:Uu};function Gu(e,t){return e.x===t.x&&e.y===t.y&&e.width===t.width&&e.height===t.height}function Ku(e,t,n){let r=null,i,a=Zl(e);function o(){var e;clearTimeout(i),(e=r)==null||e.disconnect(),r=null}function s(n,c){n===void 0&&(n=!1),c===void 0&&(c=1),o();let l=e.getBoundingClientRect(),{left:u,top:d,width:f,height:p}=l;if(n||t(),!f||!p)return;let m=fl(d),h=fl(a.clientWidth-(u+f)),g=fl(a.clientHeight-(d+p)),_=fl(u),v={rootMargin:-m+`px `+-h+`px `+-g+`px `+-_+`px`,threshold:ul(0,ll(1,c))||1},y=!0;function b(t){let n=t[0].intersectionRatio;if(!Gu(l,e.getBoundingClientRect()))return s();if(n!==c){if(!y)return s();n?s(!1,n):i=setTimeout(()=>{s(!1,1e-7)},1e3)}y=!1}try{r=new IntersectionObserver(b,{...v,root:a.ownerDocument})}catch{r=new IntersectionObserver(b,v)}r.observe(e)}let c=Xl(e),l=()=>s(n);return c.addEventListener(`resize`,l),s(!0),()=>{c.removeEventListener(`resize`,l),o()}}function qu(e,t,n,r){r===void 0&&(r={});let{ancestorScroll:i=!0,ancestorResize:a=!0,elementResize:o=typeof ResizeObserver==`function`,layoutShift:s=typeof IntersectionObserver==`function`,animationFrame:c=!1}=r,l=bu(e),u=i||a?[...l?_u(l):[],...t?_u(t):[]]:[];u.forEach(e=>{i&&e.addEventListener(`scroll`,n),a&&e.addEventListener(`resize`,n)});let d=l&&s?Ku(l,n,a):null,f=-1,p=null;o&&(p=new ResizeObserver(e=>{let[r]=e;r&&r.target===l&&p&&t&&(p.unobserve(t),cancelAnimationFrame(f),f=requestAnimationFrame(()=>{var e;(e=p)==null||e.observe(t)})),n()}),l&&!c&&p.observe(l),t&&p.observe(t));let m,h=c?Tu(e):null;c&&g();function g(){let t=Tu(e);h&&!Gu(h,t)&&n(),h=t,m=requestAnimationFrame(g)}return n(),()=>{var e;u.forEach(e=>{i&&e.removeEventListener(`scroll`,n),a&&e.removeEventListener(`resize`,n)}),d?.(),(e=p)==null||e.disconnect(),p=null,c&&cancelAnimationFrame(m)}}var Ju=Wl,Yu=Gl,Xu=Rl,Zu=ql,Qu=Vl,$u=Ll,ed=Kl,td=(e,t,n)=>{let r=new Map,i=n??{},a={...Wu,...i.platform,_c:r};return Il(e,t,{...i,platform:a})},nd=typeof document<`u`?F.useLayoutEffect:function(){};function rd(e,t){if(e===t)return!0;if(typeof e!=typeof t)return!1;if(typeof e==`function`&&e.toString()===t.toString())return!0;let n,r,i;if(e&&t&&typeof e==`object`){if(Array.isArray(e)){if(n=e.length,n!==t.length)return!1;for(r=n;r--!==0;)if(!rd(e[r],t[r]))return!1;return!0}if(i=Object.keys(e),n=i.length,n!==Object.keys(t).length)return!1;for(r=n;r--!==0;)if(!{}.hasOwnProperty.call(t,i[r]))return!1;for(r=n;r--!==0;){let n=i[r];if(!(n===`_owner`&&e.$$typeof)&&!rd(e[n],t[n]))return!1}return!0}return e!==e&&t!==t}function id(e){return typeof window>`u`?1:(e.ownerDocument.defaultView||window).devicePixelRatio||1}function ad(e,t){let n=id(e);return Math.round(t*n)/n}function od(e){let t=F.useRef(e);return nd(()=>{t.current=e}),t}function sd(e){e===void 0&&(e={});let{placement:t=`bottom`,strategy:n=`absolute`,middleware:r=[],platform:i,elements:{reference:a,floating:o}={},transform:s=!0,whileElementsMounted:c,open:l}=e,[u,d]=F.useState({x:0,y:0,strategy:n,placement:t,middlewareData:{},isPositioned:!1}),[f,p]=F.useState(r);rd(f,r)||p(r);let[m,h]=F.useState(null),[g,_]=F.useState(null),v=F.useCallback(e=>{e!==S.current&&(S.current=e,h(e))},[]),y=F.useCallback(e=>{e!==C.current&&(C.current=e,_(e))},[]),b=a||m,x=o||g,S=F.useRef(null),C=F.useRef(null),w=F.useRef(u),T=c!=null,E=od(c),D=od(i),O=od(l),k=F.useCallback(()=>{if(!S.current||!C.current)return;let e={placement:t,strategy:n,middleware:f};D.current&&(e.platform=D.current),td(S.current,C.current,e).then(e=>{let t={...e,isPositioned:O.current!==!1};ee.current&&!rd(w.current,t)&&(w.current=t,Ri.flushSync(()=>{d(t)}))})},[f,t,n,D,O]);nd(()=>{l===!1&&w.current.isPositioned&&(w.current.isPositioned=!1,d(e=>({...e,isPositioned:!1})))},[l]);let ee=F.useRef(!1);nd(()=>(ee.current=!0,()=>{ee.current=!1}),[]),nd(()=>{if(b&&(S.current=b),x&&(C.current=x),b&&x){if(E.current)return E.current(b,x,k);k()}},[b,x,k,E,T]);let te=F.useMemo(()=>({reference:S,floating:C,setReference:v,setFloating:y}),[v,y]),A=F.useMemo(()=>({reference:b,floating:x}),[b,x]),ne=F.useMemo(()=>{let e={position:n,left:0,top:0};if(!A.floating)return e;let t=ad(A.floating,u.x),r=ad(A.floating,u.y);return s?{...e,transform:`translate(`+t+`px, `+r+`px)`,...id(A.floating)>=1.5&&{willChange:`transform`}}:{position:n,left:t,top:r}},[n,s,A.floating,u.x,u.y]);return F.useMemo(()=>({...u,update:k,refs:te,elements:A,floatingStyles:ne}),[u,k,te,A,ne])}var cd=e=>{function t(e){return{}.hasOwnProperty.call(e,`current`)}return{name:`arrow`,options:e,fn(n){let{element:r,padding:i}=typeof e==`function`?e(n):e;return r&&t(r)?r.current==null?{}:$u({element:r.current,padding:i}).fn(n):r?$u({element:r,padding:i}).fn(n):{}}}},ld=(e,t)=>{let n=Ju(e);return{name:n.name,fn:n.fn,options:[e,t]}},ud=(e,t)=>{let n=Yu(e);return{name:n.name,fn:n.fn,options:[e,t]}},dd=(e,t)=>({fn:ed(e).fn,options:[e,t]}),fd=(e,t)=>{let n=Xu(e);return{name:n.name,fn:n.fn,options:[e,t]}},pd=(e,t)=>{let n=Zu(e);return{name:n.name,fn:n.fn,options:[e,t]}},md=(e,t)=>{let n=Qu(e);return{name:n.name,fn:n.fn,options:[e,t]}},hd=(e,t)=>{let n=cd(e);return{name:n.name,fn:n.fn,options:[e,t]}},gd=`Arrow`,_d=F.forwardRef((e,t)=>{let{children:n,width:r=10,height:i=5,...a}=e;return(0,I.jsx)(zi.svg,{...a,ref:t,width:r,height:i,viewBox:`0 0 30 10`,preserveAspectRatio:`none`,children:e.asChild?n:(0,I.jsx)(`polygon`,{points:`0,0 30,0 15,10`})})});_d.displayName=gd;var vd=_d;function $(e){let[t,n]=F.useState(void 0);return Ai(()=>{if(e){n({width:e.offsetWidth,height:e.offsetHeight});let t=new ResizeObserver(t=>{if(!Array.isArray(t)||!t.length)return;let r=t[0],i,a;if(`borderBoxSize`in r){let e=r.borderBoxSize,t=Array.isArray(e)?e[0]:e;i=t.inlineSize,a=t.blockSize}else i=e.offsetWidth,a=e.offsetHeight;n({width:i,height:a})});return t.observe(e,{box:`border-box`}),()=>t.unobserve(e)}else n(void 0)},[e]),t}var yd=`Popper`,[bd,xd]=G(yd),[Sd,Cd]=bd(yd),wd=e=>{let{__scopePopper:t,children:n}=e,[r,i]=F.useState(null),[a,o]=F.useState(void 0);return(0,I.jsx)(Sd,{scope:t,anchor:r,onAnchorChange:i,placementState:a,setPlacementState:o,children:n})};wd.displayName=yd;var Td=`PopperAnchor`,Ed=F.forwardRef((e,t)=>{let{__scopePopper:n,virtualRef:r,...i}=e,a=Cd(Td,n),o=F.useRef(null),s=a.onAnchorChange,c=Un(t,F.useCallback(e=>{o.current=e,e&&s(e)},[s])),l=F.useRef(null);F.useEffect(()=>{if(!r)return;let e=l.current;l.current=r.current,e!==l.current&&s(l.current)});let u=a.placementState&&Id(a.placementState),d=u?.[0],f=u?.[1];return r?null:(0,I.jsx)(zi.div,{"data-radix-popper-side":d,"data-radix-popper-align":f,...i,ref:c})});Ed.displayName=Td;var Dd=`PopperContent`,[Od,kd]=bd(Dd),Ad=F.forwardRef((e,t)=>{let{__scopePopper:n,side:r=`bottom`,sideOffset:i=0,align:a=`center`,alignOffset:o=0,arrowPadding:s=0,avoidCollisions:c=!0,collisionBoundary:l=[],collisionPadding:u=0,sticky:d=`partial`,hideWhenDetached:f=!1,updatePositionStrategy:p=`optimized`,onPlaced:m,...h}=e,g=Cd(Dd,n),[_,v]=F.useState(null),y=Un(t,v),[b,x]=F.useState(null),S=$(b),C=S?.width??0,w=S?.height??0,T=r+(a===`center`?``:`-`+a),E=typeof u==`number`?u:{top:0,right:0,bottom:0,left:0,...u},D=Array.isArray(l)?l:[l],O=D.length>0,k={padding:E,boundary:D.filter(Pd),altBoundary:O},{refs:ee,floatingStyles:te,placement:A,isPositioned:ne,middlewareData:re}=sd({strategy:`fixed`,placement:T,whileElementsMounted:(...e)=>qu(...e,{animationFrame:p===`always`}),elements:{reference:g.anchor},middleware:[ld({mainAxis:i+w,alignmentAxis:o}),c&&ud({mainAxis:!0,crossAxis:!1,limiter:d===`partial`?dd():void 0,...k}),c&&fd({...k}),pd({...k,apply:({elements:e,rects:t,availableWidth:n,availableHeight:r})=>{let{width:i,height:a}=t.reference,o=e.floating.style;o.setProperty(`--radix-popper-available-width`,`${n}px`),o.setProperty(`--radix-popper-available-height`,`${r}px`),o.setProperty(`--radix-popper-anchor-width`,`${i}px`),o.setProperty(`--radix-popper-anchor-height`,`${a}px`)}}),b&&hd({element:b,padding:s}),Fd({arrowWidth:C,arrowHeight:w}),f&&md({strategy:`referenceHidden`,...k,boundary:O?k.boundary:void 0})]}),ie=g.setPlacementState;Ai(()=>(ie(A),()=>{ie(void 0)}),[A,ie]);let[j,M]=Id(A),ae=Vi(m);Ai(()=>{ne&&ae?.()},[ne,ae]);let oe=re.arrow?.x,se=re.arrow?.y,ce=re.arrow?.centerOffset!==0,[N,P]=F.useState();return Ai(()=>{_&&P(window.getComputedStyle(_).zIndex)},[_]),(0,I.jsx)(`div`,{ref:ee.setFloating,"data-radix-popper-content-wrapper":``,style:{...te,transform:ne?te.transform:`translate(0, -200%)`,minWidth:`max-content`,zIndex:N,"--radix-popper-transform-origin":[re.transformOrigin?.x,re.transformOrigin?.y].join(` `),...re.hide?.referenceHidden&&{visibility:`hidden`,pointerEvents:`none`}},dir:e.dir,children:(0,I.jsx)(Od,{scope:n,placedSide:j,placedAlign:M,onArrowChange:x,arrowX:oe,arrowY:se,shouldHideArrow:ce,children:(0,I.jsx)(zi.div,{"data-side":j,"data-align":M,...h,ref:y,style:{...h.style,animation:ne?void 0:`none`}})})})});Ad.displayName=Dd;var jd=`PopperArrow`,Md={top:`bottom`,right:`left`,bottom:`top`,left:`right`},Nd=F.forwardRef(function(e,t){let{__scopePopper:n,...r}=e,i=kd(jd,n),a=Md[i.placedSide];return(0,I.jsx)(`span`,{ref:i.onArrowChange,style:{position:`absolute`,left:i.arrowX,top:i.arrowY,[a]:0,transformOrigin:{top:``,right:`0 0`,bottom:`center 0`,left:`100% 0`}[i.placedSide],transform:{top:`translateY(100%)`,right:`translateY(50%) rotate(90deg) translateX(-50%)`,bottom:`rotate(180deg)`,left:`translateY(50%) rotate(-90deg) translateX(50%)`}[i.placedSide],visibility:i.shouldHideArrow?`hidden`:void 0},children:(0,I.jsx)(vd,{...r,ref:t,style:{...r.style,display:`block`}})})});Nd.displayName=jd;function Pd(e){return e!==null}var Fd=e=>({name:`transformOrigin`,options:e,fn(t){let{placement:n,rects:r,middlewareData:i}=t,a=i.arrow?.centerOffset!==0,o=a?0:e.arrowWidth,s=a?0:e.arrowHeight,[c,l]=Id(n),u={start:`0%`,center:`50%`,end:`100%`}[l],d=(i.arrow?.x??0)+o/2,f=(i.arrow?.y??0)+s/2,p=``,m=``;return c===`bottom`?(p=a?u:`${d}px`,m=`${-s}px`):c===`top`?(p=a?u:`${d}px`,m=`${r.floating.height+s}px`):c===`right`?(p=`${-s}px`,m=a?u:`${f}px`):c===`left`&&(p=`${r.floating.width+s}px`,m=a?u:`${f}px`),{data:{x:p,y:m}}}});function Id(e){let[t,n=`center`]=e.split(`-`);return[t,n]}var Ld=wd,Rd=Ed,zd=Ad,Bd=Nd,Vd=!1;function Hd(){let[e,t]=F.useState(Vd);return F.useEffect(()=>{Vd||(Vd=!0,t(!0))},[]),e}var Ud=F.useSyncExternalStore;function Wd(){return()=>{}}function Gd(){return Ud(Wd,()=>!0,()=>!1)}var Kd=typeof Ud==`function`?Gd:Hd,qd=`rovingFocusGroup.onEntryFocus`,Jd={bubbles:!1,cancelable:!0},Yd=`RovingFocusGroup`,[Xd,Zd,Qd]=al(Yd),[$d,ef]=G(Yd,[Qd]),[tf,nf]=$d(Yd),rf=F.forwardRef((e,t)=>(0,I.jsx)(Xd.Provider,{scope:e.__scopeRovingFocusGroup,children:(0,I.jsx)(Xd.Slot,{scope:e.__scopeRovingFocusGroup,children:(0,I.jsx)(af,{...e,ref:t})})}));rf.displayName=Yd;var af=F.forwardRef((e,t)=>{let{__scopeRovingFocusGroup:n,orientation:r,loop:i=!1,dir:a,currentTabStopId:o,defaultCurrentTabStopId:s,onCurrentTabStopIdChange:c,onEntryFocus:l,preventScrollOnEntryFocus:u=!1,...d}=e,f=F.useRef(null),p=Un(t,f),m=sl(a),[h,g]=Fi({prop:o,defaultProp:s??null,onChange:c,caller:Yd}),[_,v]=F.useState(!1),y=Vi(l),b=Zd(n),x=F.useRef(!1),[S,C]=F.useState(0);return F.useEffect(()=>{let e=f.current;if(e)return e.addEventListener(qd,y),()=>e.removeEventListener(qd,y)},[y]),(0,I.jsx)(tf,{scope:n,orientation:r,dir:m,loop:i,currentTabStopId:h,onItemFocus:F.useCallback(e=>g(e),[g]),onItemShiftTab:F.useCallback(()=>v(!0),[]),onFocusableItemAdd:F.useCallback(()=>C(e=>e+1),[]),onFocusableItemRemove:F.useCallback(()=>C(e=>e-1),[]),children:(0,I.jsx)(zi.div,{tabIndex:_||S===0?-1:0,"data-orientation":r,...d,ref:p,style:{outline:`none`,...e.style},onMouseDown:W(e.onMouseDown,()=>{x.current=!0}),onFocus:W(e.onFocus,e=>{let t=!x.current;if(e.target===e.currentTarget&&t&&!_){let t=new CustomEvent(qd,Jd);if(e.currentTarget.dispatchEvent(t),!t.defaultPrevented){let e=b().filter(e=>e.focusable);df([e.find(e=>e.active),e.find(e=>e.id===h),...e].filter(Boolean).map(e=>e.ref.current),u)}}x.current=!1}),onBlur:W(e.onBlur,()=>v(!1))})})}),of=`RovingFocusGroupItem`,sf=F.forwardRef((e,t)=>{let{__scopeRovingFocusGroup:n,focusable:r=!0,active:i=!1,tabStopId:a,children:o,...s}=e,c=Ni(),l=a||c,u=nf(of,n),d=u.currentTabStopId===l,f=Zd(n),{onFocusableItemAdd:p,onFocusableItemRemove:m,currentTabStopId:h}=u,g=Kd();return Ai(()=>{if(!(!g||!r))return p(),()=>m()},[g,r,p,m]),F.useEffect(()=>{if(!(g||!r))return p(),()=>m()},[g,r,p,m]),(0,I.jsx)(Xd.ItemSlot,{scope:n,id:l,focusable:r,active:i,children:(0,I.jsx)(zi.span,{tabIndex:d?0:-1,"data-orientation":u.orientation,...s,ref:t,onMouseDown:W(e.onMouseDown,e=>{r?u.onItemFocus(l):e.preventDefault()}),onFocus:W(e.onFocus,()=>u.onItemFocus(l)),onKeyDown:W(e.onKeyDown,e=>{if(e.key===`Tab`&&e.shiftKey){u.onItemShiftTab();return}if(e.target!==e.currentTarget)return;let t=uf(e,u.orientation,u.dir);if(t!==void 0){if(e.metaKey||e.ctrlKey||e.altKey||e.shiftKey)return;e.preventDefault();let n=f().filter(e=>e.focusable).map(e=>e.ref.current);if(t===`last`)n.reverse();else if(t===`prev`||t===`next`){t===`prev`&&n.reverse();let r=n.indexOf(e.currentTarget);n=u.loop?ff(n,r+1):n.slice(r+1)}setTimeout(()=>df(n))}}),children:typeof o==`function`?o({isCurrentTabStop:d,hasTabStop:h!=null}):o})})});sf.displayName=of;var cf={ArrowLeft:`prev`,ArrowUp:`prev`,ArrowRight:`next`,ArrowDown:`next`,PageUp:`first`,Home:`first`,PageDown:`last`,End:`last`};function lf(e,t){return t===`rtl`?e===`ArrowLeft`?`ArrowRight`:e===`ArrowRight`?`ArrowLeft`:e:e}function uf(e,t,n){let r=lf(e.key,n);if(!(t===`vertical`&&[`ArrowLeft`,`ArrowRight`].includes(r))&&!(t===`horizontal`&&[`ArrowUp`,`ArrowDown`].includes(r)))return cf[r]}function df(e,t=!1){let n=document.activeElement;for(let r of e)if(r===n||(r.focus({preventScroll:t}),document.activeElement!==n))return}function ff(e,t){return e.map((n,r)=>e[(t+r)%e.length])}var pf=rf,mf=sf,hf=[`Enter`,` `],gf=[`ArrowDown`,`PageUp`,`Home`],_f=[`ArrowUp`,`PageDown`,`End`],vf=[...gf,..._f],yf={ltr:[...hf,`ArrowRight`],rtl:[...hf,`ArrowLeft`]},bf={ltr:[`ArrowLeft`],rtl:[`ArrowRight`]},xf=`Menu`,[Sf,Cf,wf]=al(xf),[Tf,Ef]=G(xf,[wf,xd,ef]),Df=xd(),Of=ef(),[kf,Af]=Tf(xf),[jf,Mf]=Tf(xf),Nf=e=>{let{__scopeMenu:t,open:n=!1,children:r,dir:i,onOpenChange:a,modal:o=!0}=e,s=Df(t),[c,l]=F.useState(null),u=F.useRef(!1),d=Vi(a),f=sl(i);return F.useEffect(()=>{let e=()=>{u.current=!0,document.addEventListener(`pointerdown`,t,{capture:!0,once:!0}),document.addEventListener(`pointermove`,t,{capture:!0,once:!0})},t=()=>u.current=!1;return document.addEventListener(`keydown`,e,{capture:!0}),()=>{document.removeEventListener(`keydown`,e,{capture:!0}),document.removeEventListener(`pointerdown`,t,{capture:!0}),document.removeEventListener(`pointermove`,t,{capture:!0})}},[]),F.useEffect(()=>{if(!n)return;let e=()=>d(!1);return window.addEventListener(`blur`,e),()=>window.removeEventListener(`blur`,e)},[n,d]),(0,I.jsx)(Ld,{...s,children:(0,I.jsx)(kf,{scope:t,open:n,onOpenChange:d,content:c,onContentChange:l,children:(0,I.jsx)(jf,{scope:t,onClose:F.useCallback(()=>d(!1),[d]),isUsingKeyboardRef:u,dir:f,modal:o,children:r})})})};Nf.displayName=xf;var Pf=`MenuAnchor`,Ff=F.forwardRef((e,t)=>{let{__scopeMenu:n,...r}=e,i=Df(n);return(0,I.jsx)(Rd,{...i,...r,ref:t})});Ff.displayName=Pf;var If=`MenuPortal`,[Lf,Rf]=Tf(If,{forceMount:void 0}),zf=e=>{let{__scopeMenu:t,forceMount:n,children:r,container:i}=e,a=Af(If,t);return(0,I.jsx)(Lf,{scope:t,forceMount:n,children:(0,I.jsx)(Sa,{present:n||a.open,children:(0,I.jsx)(ba,{asChild:!0,container:i,children:r})})})};zf.displayName=If;var Bf=`MenuContent`,[Vf,Hf]=Tf(Bf),Uf=F.forwardRef((e,t)=>{let n=Rf(Bf,e.__scopeMenu),{forceMount:r=n.forceMount,...i}=e,a=Af(Bf,e.__scopeMenu),o=Mf(Bf,e.__scopeMenu);return(0,I.jsx)(Sf.Provider,{scope:e.__scopeMenu,children:(0,I.jsx)(Sa,{present:r||a.open,children:(0,I.jsx)(Sf.Slot,{scope:e.__scopeMenu,children:o.modal?(0,I.jsx)(Wf,{...i,ref:t}):(0,I.jsx)(Gf,{...i,ref:t})})})})}),Wf=F.forwardRef((e,t)=>{let n=Af(Bf,e.__scopeMenu),r=F.useRef(null),i=Un(t,r);return F.useEffect(()=>{let e=r.current;if(e)return Yo(e)},[]),(0,I.jsx)(qf,{...e,ref:i,trapFocus:n.open,disableOutsidePointerEvents:n.open,disableOutsideScroll:!0,onFocusOutside:W(e.onFocusOutside,e=>e.preventDefault(),{checkForDefaultPrevented:!1}),onDismiss:()=>n.onOpenChange(!1)})}),Gf=F.forwardRef((e,t)=>{let n=Af(Bf,e.__scopeMenu);return(0,I.jsx)(qf,{...e,ref:t,trapFocus:!1,disableOutsidePointerEvents:!1,disableOutsideScroll:!1,onDismiss:()=>n.onOpenChange(!1)})}),Kf=Wn(`MenuContent.ScrollLock`),qf=F.forwardRef((e,t)=>{let{__scopeMenu:n,loop:r=!1,trapFocus:i,onOpenAutoFocus:a,onCloseAutoFocus:o,disableOutsidePointerEvents:s,onEntryFocus:c,onEscapeKeyDown:l,onPointerDownOutside:u,onFocusOutside:d,onInteractOutside:f,onDismiss:p,disableOutsideScroll:m,...h}=e,g=Af(Bf,n),_=Mf(Bf,n),v=Df(n),y=Of(n),b=Cf(n),[x,S]=F.useState(null),C=F.useRef(null),w=Un(t,C,g.onContentChange),T=F.useRef(0),E=F.useRef(``),D=F.useRef(0),O=F.useRef(null),k=F.useRef(`right`),ee=F.useRef(0),te=m?Bo:F.Fragment,A=m?{as:Kf,allowPinchZoom:!0}:void 0,ne=e=>{let t=E.current+e,n=b().filter(e=>!e.disabled),r=document.activeElement,i=n.find(e=>e.ref.current===r)?.textValue,a=jp(n.map(e=>e.textValue),t,i),o=n.find(e=>e.textValue===a)?.ref.current;(function e(t){E.current=t,window.clearTimeout(T.current),t!==``&&(T.current=window.setTimeout(()=>e(``),1e3))})(t),o&&setTimeout(()=>o.focus())};F.useEffect(()=>()=>window.clearTimeout(T.current),[]),Aa();let re=F.useCallback(e=>k.current===O.current?.side&&Np(e,O.current?.area),[]);return(0,I.jsx)(Vf,{scope:n,searchRef:E,onItemEnter:F.useCallback(e=>{re(e)&&e.preventDefault()},[re]),onItemLeave:F.useCallback(e=>{re(e)||(C.current?.focus(),S(null))},[re]),onTriggerLeave:F.useCallback(e=>{re(e)&&e.preventDefault()},[re]),pointerGraceTimerRef:D,onPointerGraceIntentChange:F.useCallback(e=>{O.current=e},[]),children:(0,I.jsx)(te,{...A,children:(0,I.jsx)(sa,{asChild:!0,trapped:i,onMountAutoFocus:W(a,e=>{e.preventDefault(),C.current?.focus({preventScroll:!0})}),onUnmountAutoFocus:o,children:(0,I.jsx)(Ji,{asChild:!0,disableOutsidePointerEvents:s,onEscapeKeyDown:l,onPointerDownOutside:u,onFocusOutside:d,onInteractOutside:f,onDismiss:p,children:(0,I.jsx)(pf,{asChild:!0,...y,dir:_.dir,orientation:`vertical`,loop:r,currentTabStopId:x,onCurrentTabStopIdChange:S,onEntryFocus:W(c,e=>{_.isUsingKeyboardRef.current||e.preventDefault()}),preventScrollOnEntryFocus:!0,children:(0,I.jsx)(zd,{role:`menu`,"aria-orientation":`vertical`,"data-state":Ep(g.open),"data-radix-menu-content":``,dir:_.dir,...v,...h,ref:w,style:{outline:`none`,...h.style},onKeyDown:W(h.onKeyDown,e=>{let t=e.target.closest(`[data-radix-menu-content]`)===e.currentTarget,n=e.ctrlKey||e.altKey||e.metaKey,r=e.key.length===1;t&&(e.key===`Tab`&&e.preventDefault(),!n&&r&&ne(e.key));let i=C.current;if(e.target!==i||!vf.includes(e.key))return;e.preventDefault();let a=b().filter(e=>!e.disabled).map(e=>e.ref.current);_f.includes(e.key)&&a.reverse(),kp(a)}),onBlur:W(e.onBlur,e=>{e.currentTarget.contains(e.target)||(window.clearTimeout(T.current),E.current=``)}),onPointerMove:W(e.onPointerMove,Pp(e=>{let t=e.target,n=ee.current!==e.clientX;if(e.currentTarget.contains(t)&&n){let t=e.clientX>ee.current?`right`:`left`;k.current=t,ee.current=e.clientX}}))})})})})})})});Uf.displayName=Bf;var Jf=`MenuGroup`,Yf=F.forwardRef((e,t)=>{let{__scopeMenu:n,...r}=e;return(0,I.jsx)(zi.div,{role:`group`,...r,ref:t})});Yf.displayName=Jf;var Xf=`MenuLabel`,Zf=F.forwardRef((e,t)=>{let{__scopeMenu:n,...r}=e;return(0,I.jsx)(zi.div,{...r,ref:t})});Zf.displayName=Xf;var Qf=`MenuItem`,$f=`menu.itemSelect`,ep=F.forwardRef((e,t)=>{let{disabled:n=!1,onSelect:r,...i}=e,a=F.useRef(null),o=Mf(Qf,e.__scopeMenu),s=Hf(Qf,e.__scopeMenu),c=Un(t,a),l=F.useRef(!1),u=()=>{let e=a.current;if(!n&&e){let t=new CustomEvent($f,{bubbles:!0,cancelable:!0});e.addEventListener($f,e=>r?.(e),{once:!0}),Bi(e,t),t.defaultPrevented?l.current=!1:o.onClose()}};return(0,I.jsx)(tp,{...i,ref:c,disabled:n,onClick:W(e.onClick,u),onPointerDown:t=>{e.onPointerDown?.(t),l.current=!0},onPointerUp:W(e.onPointerUp,e=>{l.current||e.currentTarget?.click()}),onKeyDown:W(e.onKeyDown,e=>{n||e.target!==e.currentTarget||s.searchRef.current!==``&&e.key===` `||hf.includes(e.key)&&(e.currentTarget.click(),e.preventDefault())})})});ep.displayName=Qf;var tp=F.forwardRef((e,t)=>{let{__scopeMenu:n,disabled:r=!1,textValue:i,...a}=e,o=Hf(Qf,n),s=Of(n),c=F.useRef(null),l=Un(t,c),[u,d]=F.useState(!1),[f,p]=F.useState(``);return F.useEffect(()=>{let e=c.current;e&&p((e.textContent??``).trim())},[a.children]),(0,I.jsx)(Sf.ItemSlot,{scope:n,disabled:r,textValue:i??f,children:(0,I.jsx)(mf,{asChild:!0,...s,focusable:!r,children:(0,I.jsx)(zi.div,{role:`menuitem`,"data-highlighted":u?``:void 0,"aria-disabled":r||void 0,"data-disabled":r?``:void 0,...a,ref:l,onPointerMove:W(e.onPointerMove,Pp(e=>{r?o.onItemLeave(e):(o.onItemEnter(e),e.defaultPrevented||e.currentTarget.focus({preventScroll:!0}))})),onPointerLeave:W(e.onPointerLeave,Pp(e=>o.onItemLeave(e))),onFocus:W(e.onFocus,()=>d(!0)),onBlur:W(e.onBlur,()=>d(!1))})})})}),np=`MenuCheckboxItem`,rp=F.forwardRef((e,t)=>{let{checked:n=!1,onCheckedChange:r,...i}=e;return(0,I.jsx)(dp,{scope:e.__scopeMenu,checked:n,children:(0,I.jsx)(ep,{role:`menuitemcheckbox`,"aria-checked":Dp(n)?`mixed`:n,...i,ref:t,"data-state":Op(n),onSelect:W(i.onSelect,()=>r?.(Dp(n)?!0:!n),{checkForDefaultPrevented:!1})})})});rp.displayName=np;var ip=`MenuRadioGroup`,[ap,op]=Tf(ip,{value:void 0,onValueChange:()=>{}}),sp=F.forwardRef((e,t)=>{let{value:n,onValueChange:r,...i}=e,a=Vi(r);return(0,I.jsx)(ap,{scope:e.__scopeMenu,value:n,onValueChange:a,children:(0,I.jsx)(Yf,{...i,ref:t})})});sp.displayName=ip;var cp=`MenuRadioItem`,lp=F.forwardRef((e,t)=>{let{value:n,...r}=e,i=op(cp,e.__scopeMenu),a=n===i.value;return(0,I.jsx)(dp,{scope:e.__scopeMenu,checked:a,children:(0,I.jsx)(ep,{role:`menuitemradio`,"aria-checked":a,...r,ref:t,"data-state":Op(a),onSelect:W(r.onSelect,()=>i.onValueChange?.(n),{checkForDefaultPrevented:!1})})})});lp.displayName=cp;var up=`MenuItemIndicator`,[dp,fp]=Tf(up,{checked:!1}),pp=F.forwardRef((e,t)=>{let{__scopeMenu:n,forceMount:r,...i}=e,a=fp(up,n);return(0,I.jsx)(Sa,{present:r||Dp(a.checked)||a.checked===!0,children:(0,I.jsx)(zi.span,{...i,ref:t,"data-state":Op(a.checked)})})});pp.displayName=up;var mp=`MenuSeparator`,hp=F.forwardRef((e,t)=>{let{__scopeMenu:n,...r}=e;return(0,I.jsx)(zi.div,{role:`separator`,"aria-orientation":`horizontal`,...r,ref:t})});hp.displayName=mp;var gp=`MenuArrow`,_p=F.forwardRef((e,t)=>{let{__scopeMenu:n,...r}=e,i=Df(n);return(0,I.jsx)(Bd,{...i,...r,ref:t})});_p.displayName=gp;var vp=`MenuSub`,[yp,bp]=Tf(vp),xp=e=>{let{__scopeMenu:t,children:n,open:r=!1,onOpenChange:i}=e,a=Af(vp,t),o=Df(t),[s,c]=F.useState(null),[l,u]=F.useState(null),d=Vi(i);return F.useEffect(()=>(a.open===!1&&d(!1),()=>d(!1)),[a.open,d]),(0,I.jsx)(Ld,{...o,children:(0,I.jsx)(kf,{scope:t,open:r,onOpenChange:d,content:l,onContentChange:u,children:(0,I.jsx)(yp,{scope:t,contentId:Ni(),triggerId:Ni(),trigger:s,onTriggerChange:c,children:n})})})};xp.displayName=vp;var Sp=`MenuSubTrigger`,Cp=F.forwardRef((e,t)=>{let n=Af(Sp,e.__scopeMenu),r=Mf(Sp,e.__scopeMenu),i=bp(Sp,e.__scopeMenu),a=Hf(Sp,e.__scopeMenu),o=F.useRef(null),{pointerGraceTimerRef:s,onPointerGraceIntentChange:c}=a,l={__scopeMenu:e.__scopeMenu},u=F.useCallback(()=>{o.current&&window.clearTimeout(o.current),o.current=null},[]);F.useEffect(()=>u,[u]),F.useEffect(()=>{let e=s.current;return()=>{window.clearTimeout(e),c(null)}},[s,c]);let d=Un(t,i.onTriggerChange);return(0,I.jsx)(Ff,{asChild:!0,...l,children:(0,I.jsx)(tp,{id:i.triggerId,"aria-haspopup":`menu`,"aria-expanded":n.open,"aria-controls":n.open?i.contentId:void 0,"data-state":Ep(n.open),...e,ref:d,onClick:t=>{e.onClick?.(t),!(e.disabled||t.defaultPrevented)&&(t.currentTarget.focus(),n.open||n.onOpenChange(!0))},onPointerMove:W(e.onPointerMove,Pp(t=>{a.onItemEnter(t),!t.defaultPrevented&&!e.disabled&&!n.open&&!o.current&&(a.onPointerGraceIntentChange(null),o.current=window.setTimeout(()=>{n.onOpenChange(!0),u()},100))})),onPointerLeave:W(e.onPointerLeave,Pp(e=>{u();let t=n.content?.getBoundingClientRect();if(t){let r=n.content?.dataset.side,i=r===`right`,o=i?-5:5,c=t[i?`left`:`right`],l=t[i?`right`:`left`];a.onPointerGraceIntentChange({area:[{x:e.clientX+o,y:e.clientY},{x:c,y:t.top},{x:l,y:t.top},{x:l,y:t.bottom},{x:c,y:t.bottom}],side:r}),window.clearTimeout(s.current),s.current=window.setTimeout(()=>a.onPointerGraceIntentChange(null),300)}else{if(a.onTriggerLeave(e),e.defaultPrevented)return;a.onPointerGraceIntentChange(null)}})),onKeyDown:W(e.onKeyDown,t=>{e.disabled||t.target!==t.currentTarget||a.searchRef.current!==``&&t.key===` `||yf[r.dir].includes(t.key)&&(n.onOpenChange(!0),n.content?.focus(),t.preventDefault())})})})});Cp.displayName=Sp;var wp=`MenuSubContent`,Tp=F.forwardRef((e,t)=>{let n=Rf(Bf,e.__scopeMenu),{forceMount:r=n.forceMount,align:i=`start`,...a}=e,o=Af(Bf,e.__scopeMenu),s=Mf(Bf,e.__scopeMenu),c=bp(wp,e.__scopeMenu),l=F.useRef(null),u=Un(t,l);return(0,I.jsx)(Sf.Provider,{scope:e.__scopeMenu,children:(0,I.jsx)(Sa,{present:r||o.open,children:(0,I.jsx)(Sf.Slot,{scope:e.__scopeMenu,children:(0,I.jsx)(qf,{id:c.contentId,"aria-labelledby":c.triggerId,...a,ref:u,align:i,side:s.dir===`rtl`?`left`:`right`,disableOutsidePointerEvents:!1,disableOutsideScroll:!1,trapFocus:!1,onOpenAutoFocus:e=>{s.isUsingKeyboardRef.current&&l.current?.focus(),e.preventDefault()},onCloseAutoFocus:e=>e.preventDefault(),onFocusOutside:W(e.onFocusOutside,e=>{e.target!==c.trigger&&o.onOpenChange(!1)}),onEscapeKeyDown:W(e.onEscapeKeyDown,e=>{s.onClose(),e.preventDefault()}),onKeyDown:W(e.onKeyDown,e=>{let t=e.currentTarget.contains(e.target),n=bf[s.dir].includes(e.key);t&&n&&(o.onOpenChange(!1),c.trigger?.focus(),e.preventDefault())})})})})})});Tp.displayName=wp;function Ep(e){return e?`open`:`closed`}function Dp(e){return e===`indeterminate`}function Op(e){return Dp(e)?`indeterminate`:e?`checked`:`unchecked`}function kp(e){let t=document.activeElement;for(let n of e)if(n===t||(n.focus(),document.activeElement!==t))return}function Ap(e,t){return e.map((n,r)=>e[(t+r)%e.length])}function jp(e,t,n){let r=t.length>1&&Array.from(t).every(e=>e===t[0])?t[0]:t,i=n?e.indexOf(n):-1,a=Ap(e,Math.max(i,0));r.length===1&&(a=a.filter(e=>e!==n));let o=a.find(e=>e.toLowerCase().startsWith(r.toLowerCase()));return o===n?void 0:o}function Mp(e,t){let{x:n,y:r}=e,i=!1;for(let e=0,a=t.length-1;e<t.length;a=e++){let o=t[e],s=t[a],c=o.x,l=o.y,u=s.x,d=s.y;l>r!=d>r&&n<(u-c)*(r-l)/(d-l)+c&&(i=!i)}return i}function Np(e,t){return t?Mp({x:e.clientX,y:e.clientY},t):!1}function Pp(e){return t=>t.pointerType===`mouse`?e(t):void 0}var Fp=Nf,Ip=Ff,Lp=zf,Rp=Uf,zp=Yf,Bp=Zf,Vp=ep,Hp=rp,Up=sp,Wp=lp,Gp=pp,Kp=hp,qp=_p,Jp=Cp,Yp=Tp,Xp=`DropdownMenu`,[Zp,Qp]=G(Xp,[Ef]),$p=Ef(),[em,tm]=Zp(Xp),nm=e=>{let{__scopeDropdownMenu:t,children:n,dir:r,open:i,defaultOpen:a,onOpenChange:o,modal:s=!0}=e,c=$p(t),l=F.useRef(null),[u,d]=Fi({prop:i,defaultProp:a??!1,onChange:o,caller:Xp});return(0,I.jsx)(em,{scope:t,triggerId:Ni(),triggerRef:l,contentId:Ni(),open:u,onOpenChange:d,onOpenToggle:F.useCallback(()=>d(e=>!e),[d]),modal:s,children:(0,I.jsx)(Fp,{...c,open:u,onOpenChange:d,dir:r,modal:s,children:n})})};nm.displayName=Xp;var rm=`DropdownMenuTrigger`,im=F.forwardRef((e,t)=>{let{__scopeDropdownMenu:n,disabled:r=!1,...i}=e,a=tm(rm,n),o=$p(n),s=Un(t,a.triggerRef);return(0,I.jsx)(Ip,{asChild:!0,...o,children:(0,I.jsx)(zi.button,{type:`button`,id:a.triggerId,"aria-haspopup":`menu`,"aria-expanded":a.open,"aria-controls":a.open?a.contentId:void 0,"data-state":a.open?`open`:`closed`,"data-disabled":r?``:void 0,disabled:r,...i,ref:s,onPointerDown:W(e.onPointerDown,e=>{!r&&e.button===0&&e.ctrlKey===!1&&(a.onOpenToggle(),a.open||e.preventDefault())}),onKeyDown:W(e.onKeyDown,e=>{r||([`Enter`,` `].includes(e.key)&&a.onOpenToggle(),e.key===`ArrowDown`&&a.onOpenChange(!0),[`Enter`,` `,`ArrowDown`].includes(e.key)&&e.preventDefault())})})})});im.displayName=rm;var am=`DropdownMenuPortal`,om=e=>{let{__scopeDropdownMenu:t,...n}=e,r=$p(t);return(0,I.jsx)(Lp,{...r,...n})};om.displayName=am;var sm=`DropdownMenuContent`,cm=F.forwardRef((e,t)=>{let{__scopeDropdownMenu:n,...r}=e,i=tm(sm,n),a=$p(n),o=F.useRef(!1);return(0,I.jsx)(Rp,{id:i.contentId,"aria-labelledby":i.triggerId,...a,...r,ref:t,onCloseAutoFocus:W(e.onCloseAutoFocus,e=>{o.current||i.triggerRef.current?.focus(),o.current=!1,e.preventDefault()}),onInteractOutside:W(e.onInteractOutside,e=>{let t=e.detail.originalEvent,n=t.button===0&&t.ctrlKey===!0,r=t.button===2||n;(!i.modal||r)&&(o.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)`}})});cm.displayName=sm;var lm=`DropdownMenuGroup`,um=F.forwardRef((e,t)=>{let{__scopeDropdownMenu:n,...r}=e,i=$p(n);return(0,I.jsx)(zp,{...i,...r,ref:t})});um.displayName=lm;var dm=`DropdownMenuLabel`,fm=F.forwardRef((e,t)=>{let{__scopeDropdownMenu:n,...r}=e,i=$p(n);return(0,I.jsx)(Bp,{...i,...r,ref:t})});fm.displayName=dm;var pm=`DropdownMenuItem`,mm=F.forwardRef((e,t)=>{let{__scopeDropdownMenu:n,...r}=e,i=$p(n);return(0,I.jsx)(Vp,{...i,...r,ref:t})});mm.displayName=pm;var hm=`DropdownMenuCheckboxItem`,gm=F.forwardRef((e,t)=>{let{__scopeDropdownMenu:n,...r}=e,i=$p(n);return(0,I.jsx)(Hp,{...i,...r,ref:t})});gm.displayName=hm;var _m=`DropdownMenuRadioGroup`,vm=F.forwardRef((e,t)=>{let{__scopeDropdownMenu:n,...r}=e,i=$p(n);return(0,I.jsx)(Up,{...i,...r,ref:t})});vm.displayName=_m;var ym=`DropdownMenuRadioItem`,bm=F.forwardRef((e,t)=>{let{__scopeDropdownMenu:n,...r}=e,i=$p(n);return(0,I.jsx)(Wp,{...i,...r,ref:t})});bm.displayName=ym;var xm=`DropdownMenuItemIndicator`,Sm=F.forwardRef((e,t)=>{let{__scopeDropdownMenu:n,...r}=e,i=$p(n);return(0,I.jsx)(Gp,{...i,...r,ref:t})});Sm.displayName=xm;var Cm=`DropdownMenuSeparator`,wm=F.forwardRef((e,t)=>{let{__scopeDropdownMenu:n,...r}=e,i=$p(n);return(0,I.jsx)(Kp,{...i,...r,ref:t})});wm.displayName=Cm;var Tm=`DropdownMenuArrow`,Em=F.forwardRef((e,t)=>{let{__scopeDropdownMenu:n,...r}=e,i=$p(n);return(0,I.jsx)(qp,{...i,...r,ref:t})});Em.displayName=Tm;var Dm=`DropdownMenuSubTrigger`,Om=F.forwardRef((e,t)=>{let{__scopeDropdownMenu:n,...r}=e,i=$p(n);return(0,I.jsx)(Jp,{...i,...r,ref:t})});Om.displayName=Dm;var km=`DropdownMenuSubContent`,Am=F.forwardRef((e,t)=>{let{__scopeDropdownMenu:n,...r}=e,i=$p(n);return(0,I.jsx)(Yp,{...i,...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)`}})});Am.displayName=km;var jm=nm,Mm=im,Nm=om,Pm=cm,Fm=fm,Im=mm,Lm=wm,Rm=jm,zm=Mm,Bm=F.forwardRef(({className:e,sideOffset:t=4,...n},r)=>(0,I.jsx)(Nm,{children:(0,I.jsx)(Pm,{ref:r,sideOffset:t,className:H(`z-50 min-w-[8rem] overflow-hidden rounded-lg border border-[var(--glass-border)] bg-card backdrop-blur-md p-1 text-foreground shadow-[var(--glass-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]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2`,e),...n})}));Bm.displayName=Pm.displayName;var Vm=F.forwardRef(({className:e,inset:t,...n},r)=>(0,I.jsx)(Im,{ref:r,className:H(`relative flex cursor-default select-none items-center gap-2 rounded-sm px-2 py-1.5 text-sm outline-none transition-colors focus:bg-accent focus:text-accent-foreground data-[disabled]:pointer-events-none data-[disabled]:opacity-50`,t&&`ps-8`,e),...n}));Vm.displayName=Im.displayName;var Hm=F.forwardRef(({className:e,inset:t,...n},r)=>(0,I.jsx)(Fm,{ref:r,className:H(`px-2 py-1.5 text-sm font-semibold text-primary`,t&&`ps-8`,e),...n}));Hm.displayName=Fm.displayName;var Um=F.forwardRef(({className:e,...t},n)=>(0,I.jsx)(Lm,{ref:n,className:H(`-mx-1 my-1 h-px bg-[var(--glass-border)]`,e),...t}));Um.displayName=Lm.displayName;function Wm(e){return Array.isArray(e.items)}function Gm({group:e,pathname:t,search:n}){return(0,I.jsxs)(Xs,{children:[e.title&&(0,I.jsx)(Zs,{title:e.title,children:e.title}),(0,I.jsx)(Qs,{children:e.items.map(e=>(0,I.jsx)(qm,{item:e,pathname:t,search:n},Km(e)))})]})}function Km(e){return Wm(e)?`g:${e.title}`:`l:${e.url}`}function qm({item:e,pathname:t,search:n}){let{state:r,isMobile:i}=Hs();return Wm(e)?r===`collapsed`&&!i?(0,I.jsx)(Qm,{item:e,pathname:t,search:n}):(0,I.jsx)(Ym,{item:e,pathname:t,search:n}):(0,I.jsx)(Jm,{item:e,pathname:t,search:n})}function Jm({item:e,pathname:t,search:n}){let{setOpenMobile:r}=Hs();return(0,I.jsx)($s,{children:(0,I.jsx)(tc,{asChild:!0,isActive:$m(e,t,n),children:(0,I.jsxs)(`a`,{href:e.url,title:e.title,"data-tour":Zm(e.url),onClick:()=>r(!1),...e.external?{target:`_blank`,rel:`noreferrer`}:null,children:[e.icon&&(0,I.jsx)(e.icon,{"aria-hidden":!0}),(0,I.jsx)(`span`,{"data-sidebar-label":!0,className:`flex-1 truncate`,children:e.title}),e.marker&&(0,I.jsx)(e.marker,{"aria-hidden":!0,"data-sidebar-label":!0,className:`size-3.5 text-muted-foreground`})]})})})}function Ym({item:e,pathname:t,search:n}){let r=eh(e,t,n);return(0,I.jsx)(nl,{defaultOpen:r,className:`group/collapsible`,asChild:!0,children:(0,I.jsxs)($s,{children:[(0,I.jsx)(rl,{asChild:!0,children:(0,I.jsxs)(tc,{isActive:r,"data-tour":Zm(e.items[0]?.url),children:[e.icon&&(0,I.jsx)(e.icon,{"aria-hidden":!0}),(0,I.jsx)(`span`,{"data-sidebar-label":!0,className:`flex-1 truncate`,title:e.title,children:e.title}),e.marker&&(0,I.jsx)(e.marker,{"aria-hidden":!0,"data-sidebar-label":!0,className:`size-3.5 text-muted-foreground`}),(0,I.jsx)(Et,{"aria-hidden":!0,"data-sidebar-label":!0,className:`transition-transform duration-200 group-data-[state=open]/collapsible:rotate-90 rtl:rotate-180 rtl:group-data-[state=open]/collapsible:-rotate-90`})]})}),(0,I.jsx)(il,{children:(0,I.jsx)(nc,{children:e.items.map(e=>(0,I.jsx)(Xm,{link:e,pathname:t,search:n},e.url))})})]})})}function Xm({link:e,pathname:t,search:n}){let{setOpenMobile:r}=Hs();return(0,I.jsx)(rc,{children:(0,I.jsx)(ic,{asChild:!0,isActive:$m(e,t,n),children:(0,I.jsxs)(`a`,{href:e.url,title:e.title,"data-tour":Zm(e.url),onClick:()=>r(!1),children:[e.icon&&(0,I.jsx)(e.icon,{"aria-hidden":!0}),(0,I.jsx)(`span`,{children:e.title})]})})})}function Zm(e){if(!e)return;if(e===`/admin`)return`nav-home`;if(e===`/admin/settings`)return`nav-settings`;let t=e.match(/^\/admin\/c\/([^/?]+)$/);if(t)return`nav-c-${decodeURIComponent(t[1])}`}function Qm({item:e,pathname:t,search:n}){let r=eh(e,t,n),{direction:i}=J();return(0,I.jsx)($s,{children:(0,I.jsxs)(Rm,{children:[(0,I.jsx)(zm,{asChild:!0,children:(0,I.jsxs)(tc,{isActive:r,children:[e.icon&&(0,I.jsx)(e.icon,{"aria-hidden":!0}),(0,I.jsx)(`span`,{"data-sidebar-label":!0,title:e.title,children:e.title}),(0,I.jsx)(Et,{"aria-hidden":!0,"data-sidebar-label":!0,className:`ms-auto`})]})}),(0,I.jsxs)(Bm,{side:i===`rtl`?`left`:`right`,align:`start`,sideOffset:4,children:[(0,I.jsx)(Hm,{children:e.title}),(0,I.jsx)(Um,{}),e.items.map(e=>(0,I.jsx)(Vm,{asChild:!0,children:(0,I.jsx)(`a`,{href:e.url,className:H($m(e,t,n)&&`font-medium`),children:e.title})},e.url))]})]})})}function $m(e,t,n){let r=new URL(e.url,`http://x`);if(r.pathname!==t)return!1;if(!r.search)return!0;let i=new URLSearchParams(r.search),a=new URLSearchParams(n);for(let[e,t]of i.entries())if(a.get(e)!==t)return!1;return!0}function eh(e,t,n){return e.items.some(e=>$m(e,t,n))?!0:e.items.some(e=>new URL(e.url,`http://x`).pathname===t)}function th(){fetch(`/api/auth/sign-out`,{method:`POST`,credentials:`include`}).then(()=>{window.location.href=`/admin/sign-in`})}function nh({login:e,role:t}){let{isMobile:n}=Hs(),{language:r}=J(),i=(e??`?`).charAt(0).toUpperCase(),a=e?`https://github.com/${encodeURIComponent(e)}.png?size=80`:null;return(0,I.jsx)(Qs,{children:(0,I.jsx)($s,{children:(0,I.jsxs)(Rm,{children:[(0,I.jsx)(zm,{asChild:!0,children:(0,I.jsxs)(tc,{size:`lg`,className:`data-[state=open]:bg-accent/40`,children:[(0,I.jsx)(rh,{avatarUrl:a,initial:i}),(0,I.jsxs)(`div`,{"data-sidebar-label":!0,className:`grid flex-1 text-start text-sm leading-tight`,children:[(0,I.jsx)(`span`,{className:`truncate font-semibold`,children:e??`—`}),(0,I.jsx)(`span`,{className:`truncate text-xs text-muted-foreground`,children:t??Y(r,`common.signedIn`)})]}),(0,I.jsx)(Dt,{"data-sidebar-label":!0,className:`ms-auto size-4 text-muted-foreground`,"aria-hidden":!0})]})}),(0,I.jsxs)(Bm,{align:`end`,side:n?`bottom`:`right`,sideOffset:6,className:`w-(--radix-dropdown-menu-trigger-width) min-w-56 rounded-lg`,children:[(0,I.jsxs)(Hm,{className:`flex items-center gap-3 py-2`,children:[(0,I.jsx)(rh,{avatarUrl:a,initial:i,large:!0}),(0,I.jsxs)(`div`,{className:`flex min-w-0 flex-col`,children:[(0,I.jsx)(`span`,{className:`truncate text-sm font-medium text-foreground`,children:e??`—`}),(0,I.jsx)(`span`,{className:`label-eyebrow truncate`,children:t??Y(r,`common.signedIn`)})]})]}),(0,I.jsx)(Um,{}),(0,I.jsx)(Vm,{asChild:!0,children:(0,I.jsxs)(`a`,{href:`/admin/preferences`,className:`flex items-center gap-2`,children:[(0,I.jsx)(hn,{className:`size-4`,"aria-hidden":!0}),Y(r,`preferences.page.open`)]})}),(0,I.jsx)(Um,{}),(0,I.jsx)(Vm,{asChild:!0,className:`text-destructive focus:text-destructive focus:bg-destructive/10`,children:(0,I.jsxs)(`button`,{type:`button`,onClick:th,className:`flex w-full cursor-pointer items-center gap-2`,children:[(0,I.jsx)(en,{className:`size-4`,"aria-hidden":!0}),Y(r,`common.signOut`)]})})]})]})})})}function rh({avatarUrl:e,initial:t,large:n=!1}){let r=n?`size-9`:`size-8`,i=n?`text-sm`:`text-xs`;return(0,I.jsx)(`span`,{className:H(`shrink-0 inline-flex items-center justify-center rounded-lg`,`bg-primary/15 text-foreground/80 ring-1 ring-border`,r),"aria-hidden":!0,children:e?(0,I.jsx)(`img`,{src:e,alt:``,className:`size-full rounded-lg object-cover`,decoding:`async`}):(0,I.jsx)(`span`,{className:H(`font-medium`,i),children:t})})}function ih({brand:e,groups:t,pathname:n,search:r,user:i}){let{direction:a}=J();return(0,I.jsxs)(Us,{side:a===`rtl`?`right`:`left`,children:[(0,I.jsx)(Ks,{children:(0,I.jsxs)(`div`,{className:`sidebar-chrome-row`,children:[(0,I.jsx)(Uc,{brand:e}),(0,I.jsx)(Ws,{})]})}),(0,I.jsx)(Ys,{}),(0,I.jsx)(qs,{children:t.map((e,t)=>(0,I.jsx)(Gm,{group:e,pathname:n,search:r},e.title??`g-${t}`))}),(0,I.jsx)(Ys,{}),(0,I.jsx)(Js,{children:(0,I.jsx)(nh,{login:i.login,role:i.role})})]})}function ah({login:e,role:t}){let{language:n}=J(),r=(e??`?`).charAt(0).toUpperCase(),i=e?`https://github.com/${encodeURIComponent(e)}.png?size=80`:null;return(0,I.jsxs)(Rm,{children:[(0,I.jsx)(zm,{"aria-label":`Account menu`,className:H(`relative inline-flex size-8 items-center justify-center rounded-full`,`outline-hidden ring-1 ring-border`,`hover:ring-primary/40 transition-all`,`data-[state=open]:ring-primary`),children:(0,I.jsx)(oh,{avatarUrl:i,initial:r})}),(0,I.jsxs)(Bm,{align:`end`,sideOffset:6,className:`w-56`,children:[(0,I.jsxs)(Hm,{className:`flex items-center gap-3 py-2`,children:[(0,I.jsx)(oh,{avatarUrl:i,initial:r,large:!0}),(0,I.jsxs)(`div`,{className:`flex min-w-0 flex-col`,children:[(0,I.jsx)(`span`,{className:`truncate text-sm font-medium text-foreground`,children:e??`—`}),(0,I.jsx)(`span`,{className:`label-eyebrow truncate`,children:t??Y(n,`common.signedIn`)})]})]}),(0,I.jsx)(Um,{}),(0,I.jsx)(Vm,{asChild:!0,children:(0,I.jsxs)(`a`,{href:`/admin/preferences`,className:`flex items-center gap-2`,children:[(0,I.jsx)(hn,{className:`size-4`,"aria-hidden":!0}),Y(n,`preferences.page.open`)]})}),(0,I.jsx)(Um,{}),(0,I.jsx)(Vm,{asChild:!0,className:`text-destructive focus:text-destructive focus:bg-destructive/10`,children:(0,I.jsxs)(`button`,{type:`button`,onClick:th,className:`flex w-full cursor-pointer items-center gap-2`,children:[(0,I.jsx)(en,{className:`size-4`,"aria-hidden":!0}),Y(n,`common.signOut`)]})})]})]})}function oh({avatarUrl:e,initial:t,large:n=!1}){let r=n?`size-9`:`size-8`,i=n?`text-sm`:`text-xs`;return(0,I.jsx)(`span`,{className:H(`shrink-0 inline-flex items-center justify-center rounded-full overflow-hidden`,`bg-primary/15 text-foreground/80`,r),"aria-hidden":!0,children:e?(0,I.jsx)(`img`,{src:e,alt:``,className:`size-full object-cover`,decoding:`async`}):(0,I.jsx)(`span`,{className:H(`font-medium`,i),children:t})})}function sh(){let{language:e,setLanguage:t}=J(),n=Cc.find(t=>t.value===e)??Cc[0];return(0,I.jsxs)(Rm,{children:[(0,I.jsx)(zm,{asChild:!0,children:(0,I.jsxs)(U,{type:`button`,variant:`ghost`,size:`sm`,className:`h-8 gap-2 rounded-full border border-border/60 bg-background/30 px-2.5`,"aria-label":Y(e,`preferences.language`),children:[(0,I.jsx)(Jt,{className:`size-4 text-primary`,"aria-hidden":!0}),(0,I.jsx)(`span`,{className:`hidden text-xs font-medium sm:inline`,children:n.nativeLabel})]})}),(0,I.jsxs)(Bm,{align:`end`,className:`max-h-[min(28rem,80vh)] w-52 overflow-y-auto`,children:[(0,I.jsx)(Hm,{className:`label-eyebrow opacity-70`,children:Y(e,`preferences.language`)}),Cc.map(n=>(0,I.jsxs)(Vm,{onSelect:()=>t(n.value),className:`justify-between`,children:[(0,I.jsx)(`span`,{children:n.nativeLabel}),(0,I.jsx)(wt,{"aria-hidden":!0,className:H(`size-4 text-primary`,n.value===e?`opacity-100`:`opacity-0`)})]},n.value))]})]})}function ch(){let{language:e,theme:t,setTheme:n}=J(),r=lh(e).find(e=>e.value===t),i=r?.icon??tn;return(0,I.jsxs)(Rm,{children:[(0,I.jsx)(zm,{asChild:!0,children:(0,I.jsxs)(U,{type:`button`,variant:`ghost`,size:`sm`,className:`h-8 gap-2 rounded-full border border-border/60 bg-background/30 px-2.5`,"aria-label":Y(e,`preferences.appearance`),children:[(0,I.jsx)(i,{className:`size-4 text-primary`,"aria-hidden":!0}),(0,I.jsx)(`span`,{className:`hidden text-xs font-medium sm:inline`,children:r?.label??Y(e,`preferences.system`)})]})}),(0,I.jsxs)(Bm,{align:`end`,className:`w-44`,children:[(0,I.jsx)(Hm,{className:`label-eyebrow opacity-70`,children:Y(e,`preferences.appearance`)}),lh(e).map(e=>{let r=e.icon;return(0,I.jsxs)(Vm,{onSelect:()=>n(e.value),className:`justify-between`,children:[(0,I.jsxs)(`span`,{className:`flex items-center gap-2`,children:[(0,I.jsx)(r,{className:`size-4`,"aria-hidden":!0}),e.label]}),(0,I.jsx)(wt,{"aria-hidden":!0,className:H(`size-4 text-primary`,e.value===t?`opacity-100`:`opacity-0`)})]},e.value)})]})]})}function lh(e){return[{value:`light`,label:Y(e,`preferences.light`),icon:vn},{value:`dark`,label:Y(e,`preferences.dark`),icon:nn},{value:`system`,label:Y(e,`preferences.system`),icon:tn}]}function uh({fixed:e=!1,className:t,children:n,user:r,site:i,publicUrl:a,onOpenGuide:o}){let{language:s}=J(),[c,l]=F.useState(!1);return F.useEffect(()=>{if(!e)return;let t=()=>l(window.scrollY>10);return t(),window.addEventListener(`scroll`,t,{passive:!0}),()=>window.removeEventListener(`scroll`,t)},[e]),(0,I.jsxs)(`header`,{"data-slot":`header`,"data-scrolled":c||void 0,className:H(`admin-statusbar z-20 flex h-14 shrink-0 items-center gap-3 px-4`,e?`sticky top-0 w-[inherit] transition-shadow`:`border-b border-border/40`,c&&`shadow-sm`,t),children:[(0,I.jsx)(Ws,{className:`-ms-1 md:hidden`}),i?(0,I.jsxs)(`div`,{className:`admin-site-status`,"aria-label":`Current admin site`,children:[(0,I.jsx)(`span`,{children:i.title}),i.subtitle?(0,I.jsx)(`small`,{children:i.subtitle}):null]}):null,a?(0,I.jsx)(U,{asChild:!0,variant:`secondary`,size:`sm`,className:`shrink-0`,children:(0,I.jsxs)(`a`,{href:a,target:`_blank`,rel:`noreferrer`,title:Y(s,`common.viewSite`),children:[(0,I.jsx)(Rt,{className:`size-3.5`,"aria-hidden":!0}),(0,I.jsx)(`span`,{className:`hidden sm:inline`,children:Y(s,`common.viewSite`)})]})}):null,n,r?(0,I.jsxs)(`div`,{className:H(`flex items-center gap-2`,n?``:`ms-auto`),children:[o?(0,I.jsxs)(U,{type:`button`,variant:`ghost`,size:`sm`,onClick:o,"data-tour":`guide-button`,title:Y(s,`guide.open`),"aria-label":Y(s,`guide.open`),children:[(0,I.jsx)(At,{className:`size-4`,"aria-hidden":!0}),(0,I.jsx)(`span`,{className:`hidden sm:inline`,children:Y(s,`guide.open`)})]}):null,(0,I.jsx)(sh,{}),(0,I.jsx)(ch,{}),(0,I.jsx)(ah,{login:r.login,role:r.role})]}):null]})}var dh=`content`;function fh({className:e}){return(0,I.jsx)(`a`,{href:`#${dh}`,className:H(`fixed inset-inline-start-3 top-3 z-[999]`,`-translate-y-52 rounded-md bg-primary px-3 py-2 text-sm font-medium`,`text-primary-foreground shadow`,`focus-visible:translate-y-0 transition-transform`,`outline-2 outline-offset-2 outline-ring/40`,e),children:`Skip to main content`})}function ph({fixed:e=!1,fluid:t=!1,className:n,children:r}){return(0,I.jsx)(`div`,{id:dh,"data-layout":e?`fixed`:`auto`,className:H(`@container/content`,`w-full px-4 py-6 sm:px-6`,e&&`flex grow flex-col overflow-hidden`,!t&&`mx-auto max-w-[1440px]`,`flex-1`,n),children:r})}function mh(e,t){switch(t){case`draft`:return Y(e,`status.draft`);case`review`:return Y(e,`status.review`);case`published`:return Y(e,`status.published`);case`archived`:return Y(e,`status.archived`)}}var hh=`mantle.admin.guide.closed`;function gh(e){let t={key:`reopen`,selector:`[data-tour="guide-button"]`};if(!e)return[t];let n=`/admin/c/${encodeURIComponent(e.name)}`;return[{key:`collections`,selector:`[data-tour="nav-c-${e.name}"]`},{key:`filters`,selector:`[data-tour="status-filter"]`,href:n},{key:`actions`,selector:`[data-tour="entry-actions"]`,href:n},t]}var _h={collections:{title:`guide.collections.title`,body:`guide.collections.body`},filters:{title:`guide.filters.title`,body:`guide.filters.body`},actions:{title:`guide.actions.title`,body:`guide.actions.body`},reopen:{title:`guide.reopen.title`,body:`guide.reopen.body`}};function vh({language:e,firstCollection:t,onClose:n}){let[r,i]=F.useState(0),{location:a,navigate:o}=xc(),s=F.useMemo(()=>gh(t),[t]),c=s[r]??s[0],l=bh(c),u=F.useMemo(()=>xh(l),[l]),d=r===s.length-1;return F.useEffect(()=>{c.href&&`${a.pathname}${a.search}`!==c.href&&o(c.href)},[a.pathname,a.search,o,c]),(0,I.jsxs)(`div`,{className:`admin-guide-overlay`,role:`dialog`,"aria-modal":`false`,"aria-labelledby":`admin-guide-title`,children:[l?(0,I.jsx)(`div`,{className:`admin-guide-highlight`,style:{top:l.top-8,left:l.left-8,width:l.width+16,height:l.height+16}}):null,(0,I.jsxs)(`section`,{className:`admin-guide-popover`,style:u,children:[(0,I.jsxs)(`div`,{className:`admin-guide-progress`,children:[(0,I.jsx)(`span`,{children:r+1}),(0,I.jsx)(`small`,{children:s.length})]}),(0,I.jsxs)(`div`,{className:`admin-guide-copy`,children:[(0,I.jsx)(`p`,{className:`label-eyebrow`,children:`AotterMantle`}),(0,I.jsx)(`h2`,{id:`admin-guide-title`,children:Y(e,_h[c.key].title)}),(0,I.jsx)(`p`,{children:Y(e,_h[c.key].body)})]}),(0,I.jsxs)(`div`,{className:`admin-guide-controls`,children:[(0,I.jsx)(`button`,{type:`button`,className:`guide-icon-button`,onClick:()=>i(e=>Math.max(0,e-1)),disabled:r===0,title:Y(e,`guide.prev`),children:(0,I.jsx)(Tt,{className:`size-4`,"aria-hidden":!0})}),(0,I.jsxs)(`button`,{type:`button`,className:`guide-primary-button`,onClick:()=>d?n():i(e=>Math.min(s.length-1,e+1)),children:[d?Y(e,`guide.finish`):Y(e,`guide.next`),d?null:(0,I.jsx)(Et,{className:`size-4`,"aria-hidden":!0})]}),(0,I.jsx)(`button`,{type:`button`,className:`guide-icon-button`,onClick:n,title:Y(e,`guide.close`),children:(0,I.jsx)(Pn,{className:`size-4`,"aria-hidden":!0})})]})]})]})}function yh(){let{language:e}=J(),[t,n]=F.useState(()=>Sh());return{language:e,open:t,showGuide:F.useCallback(()=>{try{localStorage.removeItem(hh)}catch{}n(!0)},[]),closeGuide:F.useCallback(()=>{try{localStorage.setItem(hh,`1`)}catch{}n(!1)},[])}}function bh(e){let[t,n]=F.useState(null);return F.useEffect(()=>{let t=0,r=()=>{cancelAnimationFrame(t),t=requestAnimationFrame(()=>{let t=document.querySelector(e.selector);if(!t){n(null);return}t.scrollIntoView({block:`nearest`,inline:`nearest`});let r=t.getBoundingClientRect();n({top:r.top,left:r.left,width:r.width,height:r.height})})};return r(),window.addEventListener(`resize`,r),window.addEventListener(`scroll`,r,!0),()=>{cancelAnimationFrame(t),window.removeEventListener(`resize`,r),window.removeEventListener(`scroll`,r,!0)}},[e]),t}function xh(e){if(typeof window>`u`)return{};if(!e)return{top:`5rem`,left:`50%`,transform:`translateX(-50%)`};let t=Math.min(380,Math.max(280,window.innerWidth-32)),n=e.left+e.width+t+24<window.innerWidth,r=e.left-t-24>0,i=Math.min(window.innerHeight-220,Math.max(16,e.top));return n?{top:i,left:e.left+e.width+18}:r?{top:i,left:e.left-t-18}:{top:Math.min(window.innerHeight-220,e.top+e.height+18),left:`50%`,transform:`translateX(-50%)`}}function Sh(){if(typeof window>`u`)return!1;try{return localStorage.getItem(hh)!==`1`}catch{return!0}}var Ch={title:`CMS`,subtitle:`admin`,href:`/admin`};function wh({children:e}){let{pathname:t,search:n}=Sc(),{language:r}=J(),i=yh(),a=L({queryKey:[`me`],queryFn:()=>q.get(`/me`),retry:!1}),o=L({queryKey:[`collections`],queryFn:async()=>(await q.get(`/collections`)).collections}),s=L({queryKey:[`site`],queryFn:()=>q.get(`/site`)}),c=L(mc()),l=L(pc()),u=F.useMemo(()=>({...Ch,title:s.data?.brand??Ch.title,subtitle:s.data?.canonicalLocale??Ch.subtitle}),[s.data]),d=s.data?.canonicalLocale??null,f=F.useMemo(()=>Th(o.data??[],c.data??[],l.data??[],r,d,a.data?.role??null),[o.data,c.data,l.data,r,d,a.data?.role]),p=F.useMemo(()=>{let e=(o.data??[]).find(e=>!e.parent);return e?{name:e.name}:null},[o.data]);return(0,I.jsxs)(Vs,{defaultOpen:Ls()??!0,children:[(0,I.jsx)(fh,{}),(0,I.jsx)(ih,{brand:u,groups:f,pathname:t,search:n,user:{login:a.data?.login??null,role:a.data?.role??null}}),(0,I.jsxs)(Gs,{children:[(0,I.jsx)(uh,{fixed:!0,site:u,publicUrl:s.data?.publicUrl,onOpenGuide:i.showGuide,user:{login:a.data?.login??null,role:a.data?.role??null}}),(0,I.jsx)(ph,{children:e})]}),(0,I.jsx)(Vc,{}),i.open?(0,I.jsx)(vh,{language:i.language,firstCollection:p,onClose:i.closeGuide}):null]})}function Th(e,t,n,r,i,a){let o=e.filter(e=>!e.parent),s=o.filter(e=>e.lifecycle!==`none`),c=o.filter(e=>e.lifecycle===`none`),l=e.some(e=>e.lifecycle===`editorial`),u={items:[{title:Y(r,`nav.home`),url:`/admin`,icon:Ut}]},d={title:Y(r,`nav.content`),items:s.map(e=>Eh(e,r,i))},f=c.length>0?{title:Y(r,`nav.operations`),items:c.map(e=>Eh(e,r,i))}:null,p=t.filter(e=>e.rowBindings.length===0),m=p.length>0?{title:Y(r,`nav.ops`),items:p.map(e=>({title:lc(e.title,r,i)??uc(e.name),icon:Nn,url:`/admin/ops#${e.name}`}))}:null,h=n.length>0?{title:Y(r,`nav.reports`),items:n.map(e=>({title:lc(e.title,r,i)??uc(e.name),icon:Ct,url:`/admin/views/${encodeURIComponent(e.name)}`}))}:null,g={title:Y(r,`nav.more`),items:[...l?[{title:Y(r,`nav.approvals`),url:`/admin/approvals`,icon:Mt}]:[],{title:Y(r,`nav.media`),url:`/admin/media`,icon:Kt},{title:Y(r,`nav.settings`),url:`/admin/settings`,icon:hn},...a===`owner`?[{title:Y(r,`nav.staff`),url:`/admin/staff`,icon:An}]:[]]};return[u,d,...f?[f]:[],...m?[m]:[],...h?[h]:[],g]}function Eh(e,t,n){let r={title:lc(e.title,t,n)??uc(e.name),icon:Bt,marker:e.hasTranslations?Vt:void 0},i=Dh(e);return i.length===0?{...r,url:`/admin/c/${e.name}`}:{...r,items:[{title:Y(t,`collection.filter.all`),url:`/admin/c/${e.name}`},...i.map(n=>({title:mh(t,n),url:`/admin/c/${e.name}?status=${n}`}))]}}function Dh(e){return e.lifecycle===`editorial`?hc:e.lifecycle===`none`?[]:gc}function Oh(){return(0,I.jsx)(`div`,{className:`flex min-h-svh items-center justify-center p-6`,children:(0,I.jsxs)(`div`,{className:`glass-card w-full max-w-sm p-6`,children:[(0,I.jsx)(`div`,{className:`mb-4 h-4 w-24 animate-pulse rounded bg-muted`}),(0,I.jsxs)(`div`,{className:`space-y-2`,children:[(0,I.jsx)(`div`,{className:`h-3 w-full animate-pulse rounded bg-muted`}),(0,I.jsx)(`div`,{className:`h-3 w-2/3 animate-pulse rounded bg-muted`})]})]})})}function kh({error:e}){let{language:t}=J(),n=e instanceof Error?e.message:`Unknown error.`;return(0,I.jsx)(`div`,{className:`flex min-h-svh items-center justify-center p-6`,children:(0,I.jsxs)(`div`,{className:`glass-card animate-rise w-full max-w-sm p-8 text-center`,children:[(0,I.jsx)(`h1`,{className:`mb-2 text-xl`,children:Y(t,`auth.error.title`)}),(0,I.jsx)(`p`,{className:`text-sm text-muted-foreground`,children:n})]})})}function Ah({login:e}){let{language:t}=J();return(0,I.jsx)(`div`,{className:`flex min-h-svh items-center justify-center p-6`,children:(0,I.jsxs)(`div`,{className:`glass-card animate-rise w-full max-w-md p-8 text-center`,children:[(0,I.jsx)(`div`,{className:`mx-auto mb-3 inline-flex size-10 items-center justify-center rounded-full bg-destructive/10 text-destructive`,children:(0,I.jsx)(wn,{className:`size-5`,"aria-hidden":!0})}),(0,I.jsx)(`h1`,{className:`mb-2 text-xl`,children:Y(t,`auth.accessDenied.title`)}),e?(0,I.jsxs)(`p`,{className:`mb-1 text-sm font-medium text-foreground`,children:[`GitHub: `,e]}):null,(0,I.jsx)(`p`,{className:`mb-1 text-sm text-muted-foreground`,children:Y(t,`auth.accessDenied.noStaff`)}),(0,I.jsx)(`p`,{className:`mb-6 text-sm text-muted-foreground`,children:Y(t,`auth.accessDenied.askOwner`)}),(0,I.jsxs)(U,{variant:`outline`,className:`w-full`,onClick:th,children:[(0,I.jsx)(en,{className:`me-2 size-4`,"aria-hidden":!0}),Y(t,`common.signOut`)]})]})})}var jh=`w-full rounded border border-input bg-background px-3 py-2 text-sm placeholder:text-muted-foreground focus-visible:outline-none focus-visible:ring-1 focus-visible:ring-ring`,Mh=`first:mt-0 mt-4`,Nh=`first:mt-0 first:border-t-0 first:pt-0 mt-6 border-t border-border pt-4`;function Ph(e){return e&&e.startsWith(`/`)&&!e.startsWith(`//`)?e:`/admin`}function Fh(){let{language:e}=J(),t=Ph(new URLSearchParams(window.location.search).get(`return`)),n=L({queryKey:[`auth-methods`],queryFn:async()=>{let e=await fetch(`/api/auth/methods`,{credentials:`include`});if(!e.ok)throw Error(`HTTP ${e.status}`);return(await e.json()).methods??[]},retry:!1});return(0,I.jsx)(`div`,{className:`flex min-h-svh items-center justify-center p-6`,children:(0,I.jsxs)(`div`,{className:`glass-card animate-rise w-full max-w-sm p-8`,children:[(0,I.jsx)(`p`,{className:`label-eyebrow mb-2`,children:Y(e,`auth.signIn.eyebrow`)}),(0,I.jsx)(`h1`,{className:`mb-2 text-xl`,children:Y(e,`auth.signIn.title`)}),n.isError?(0,I.jsx)(`p`,{className:`mb-4 text-sm text-destructive`,children:Y(e,`auth.signIn.methodsLoadFailed`)}):null,n.isLoading?(0,I.jsx)(`div`,{className:`space-y-2`,children:(0,I.jsx)(`div`,{className:`h-9 w-full animate-pulse rounded bg-muted`})}):null,n.data?.length===0?(0,I.jsx)(`p`,{className:`text-sm text-muted-foreground`,children:Y(e,`auth.signIn.noMethods`)}):null,n.data&&n.data.length>0?(0,I.jsx)(`div`,{children:n.data.map(e=>(0,I.jsx)(Ih,{method:e,returnTo:t},e.kind===`social`?`social:${e.provider}`:e.kind===`oauth`?`oauth:${e.providerId}`:e.kind))}):null]})})}function Ih({method:e,returnTo:t}){switch(e.kind){case`social`:return(0,I.jsx)(Rh,{provider:e.provider,returnTo:t});case`oauth`:return(0,I.jsx)(zh,{providerId:e.providerId,displayName:e.displayName??e.providerId,returnTo:t});case`email-otp`:return(0,I.jsx)(Bh,{returnTo:t});case`magic-link`:return(0,I.jsx)(Vh,{returnTo:t});default:return(0,I.jsx)(Hh,{kind:e.kind})}}var Lh={github:`GitHub`,google:`Google`,apple:`Apple`,"microsoft-entra-id":`Microsoft`,facebook:`Facebook`,discord:`Discord`,twitter:`Twitter / X`,linkedin:`LinkedIn`,spotify:`Spotify`,twitch:`Twitch`,gitlab:`GitLab`,tiktok:`TikTok`,reddit:`Reddit`,kick:`Kick`,vk:`VK`,naver:`Naver`,kakao:`Kakao`,line:`LINE`,slack:`Slack`,atlassian:`Atlassian`,zoom:`Zoom`,notion:`Notion`,figma:`Figma`,linear:`Linear`,vercel:`Vercel`,paypal:`PayPal`,huggingface:`Hugging Face`,cognito:`Cognito`,salesforce:`Salesforce`,polar:`Polar`,railway:`Railway`,roblox:`Roblox`,paybin:`Paybin`,wechat:`WeChat`,dropbox:`Dropbox`};function Rh({provider:e,returnTo:t}){let{language:n}=J(),r=Lh[e]??e,i=async()=>{let n=await fetch(`/api/auth/sign-in/social`,{method:`POST`,credentials:`include`,headers:{"Content-Type":`application/json`},body:JSON.stringify({provider:e,callbackURL:t})});if(!n.ok)return;let r=await n.json();r.url&&(window.location.href=r.url)};return(0,I.jsx)(`div`,{className:Mh,children:(0,I.jsx)(U,{onClick:()=>void i(),className:`w-full`,children:Y(n,`auth.signIn.method.social.button`,{provider:r})})})}function zh({providerId:e,displayName:t,returnTo:n}){let{language:r}=J(),i=async()=>{let t=await fetch(`/api/auth/sign-in/oauth2`,{method:`POST`,credentials:`include`,headers:{"Content-Type":`application/json`},body:JSON.stringify({providerId:e,callbackURL:n})});if(!t.ok)return;let r=await t.json();r.url&&(window.location.href=r.url)};return(0,I.jsx)(`div`,{className:Mh,children:(0,I.jsx)(U,{onClick:()=>void i(),className:`w-full`,children:Y(r,`auth.signIn.method.oauth.button`,{provider:t})})})}function Bh({returnTo:e}){let{language:t}=J(),[n,r]=F.useState(`email`),[i,a]=F.useState(``),[o,s]=F.useState(``),[c,l]=F.useState(!1),[u,d]=F.useState(null),f=async e=>{l(!0),d(null);try{await e()}finally{l(!1)}};return(0,I.jsxs)(`div`,{className:Nh,children:[(0,I.jsx)(`p`,{className:`mb-2 text-sm text-muted-foreground`,children:Y(t,`auth.signIn.method.email-otp.body`)}),n===`email`?(0,I.jsxs)(`form`,{onSubmit:e=>{e.preventDefault(),i&&f(async()=>{if(!(await fetch(`/api/auth/email-otp/send-verification-otp`,{method:`POST`,credentials:`include`,headers:{"Content-Type":`application/json`},body:JSON.stringify({email:i,type:`sign-in`})})).ok){d(Y(t,`auth.signIn.method.email-otp.sendFailed`));return}r(`otp`)})},className:`space-y-2`,children:[(0,I.jsx)(`label`,{htmlFor:`signin-email`,className:`sr-only`,children:Y(t,`auth.signIn.method.email-otp.emailLabel`)}),(0,I.jsx)(`input`,{id:`signin-email`,type:`email`,value:i,onChange:e=>a(e.currentTarget.value),placeholder:Y(t,`auth.signIn.method.email-otp.emailPlaceholder`),required:!0,autoComplete:`email`,className:jh}),(0,I.jsx)(U,{type:`submit`,className:`w-full`,disabled:c||!i,children:Y(t,`auth.signIn.method.email-otp.sendButton`)})]}):(0,I.jsxs)(`form`,{onSubmit:n=>{n.preventDefault(),o&&f(async()=>{if(!(await fetch(`/api/auth/sign-in/email-otp`,{method:`POST`,credentials:`include`,headers:{"Content-Type":`application/json`},body:JSON.stringify({email:i,otp:o})})).ok){d(Y(t,`auth.signIn.method.email-otp.verifyFailed`));return}window.location.assign(e)})},className:`space-y-2`,children:[(0,I.jsx)(`p`,{className:`text-xs text-muted-foreground`,children:Y(t,`auth.signIn.method.email-otp.sentTo`,{email:i})}),(0,I.jsx)(`label`,{htmlFor:`signin-otp`,className:`sr-only`,children:Y(t,`auth.signIn.method.email-otp.otpLabel`)}),(0,I.jsx)(`input`,{id:`signin-otp`,type:`text`,inputMode:`numeric`,autoComplete:`one-time-code`,value:o,onChange:e=>s(e.currentTarget.value),placeholder:Y(t,`auth.signIn.method.email-otp.otpPlaceholder`),required:!0,className:jh}),(0,I.jsx)(U,{type:`submit`,className:`w-full`,disabled:c||!o,children:Y(t,`auth.signIn.method.email-otp.verifyButton`)}),(0,I.jsx)(`button`,{type:`button`,onClick:()=>r(`email`),className:`text-xs text-muted-foreground underline-offset-2 hover:underline`,children:Y(t,`auth.signIn.method.email-otp.back`)})]}),u?(0,I.jsx)(`p`,{className:`mt-2 text-xs text-destructive`,children:u}):null]})}function Vh({returnTo:e}){let{language:t}=J(),[n,r]=F.useState(``),[i,a]=F.useState(!1),[o,s]=F.useState(!1),[c,l]=F.useState(null),u=async e=>{a(!0),l(null);try{await e()}finally{a(!1)}};return(0,I.jsxs)(`div`,{className:Nh,children:[(0,I.jsx)(`p`,{className:`mb-2 text-sm text-muted-foreground`,children:Y(t,`auth.signIn.method.magic-link.body`)}),o?(0,I.jsxs)(`div`,{className:`space-y-2`,children:[(0,I.jsx)(`p`,{className:`text-sm text-foreground`,children:Y(t,`auth.signIn.method.magic-link.sentTo`,{email:n})}),(0,I.jsx)(`p`,{className:`text-xs text-muted-foreground`,children:Y(t,`auth.signIn.method.magic-link.clickHint`)}),(0,I.jsx)(`button`,{type:`button`,onClick:()=>{s(!1),r(``)},className:`text-xs text-muted-foreground underline-offset-2 hover:underline`,children:Y(t,`auth.signIn.method.magic-link.anotherEmail`)})]}):(0,I.jsxs)(`form`,{onSubmit:r=>{r.preventDefault(),n&&u(async()=>{if(!(await fetch(`/api/auth/sign-in/magic-link`,{method:`POST`,credentials:`include`,headers:{"Content-Type":`application/json`},body:JSON.stringify({email:n,callbackURL:e})})).ok){l(Y(t,`auth.signIn.method.magic-link.sendFailed`));return}s(!0)})},className:`space-y-2`,children:[(0,I.jsx)(`label`,{htmlFor:`signin-mlink-email`,className:`sr-only`,children:Y(t,`auth.signIn.method.magic-link.emailLabel`)}),(0,I.jsx)(`input`,{id:`signin-mlink-email`,type:`email`,value:n,onChange:e=>r(e.currentTarget.value),placeholder:Y(t,`auth.signIn.method.magic-link.emailPlaceholder`),required:!0,autoComplete:`email`,className:jh}),(0,I.jsx)(U,{type:`submit`,className:`w-full`,disabled:i||!n,children:Y(t,`auth.signIn.method.magic-link.sendButton`)})]}),c?(0,I.jsx)(`p`,{className:`mt-2 text-xs text-destructive`,children:c}):null]})}function Hh({kind:e}){let{language:t}=J();return(0,I.jsx)(`p`,{className:`mt-4 text-xs text-muted-foreground`,children:Y(t,`auth.signIn.unknownMethod`,{kind:e})})}function Uh({eyebrow:e,title:t,description:n,actions:r}){return(0,I.jsxs)(`div`,{className:`mb-6 flex flex-wrap items-end justify-between gap-4`,children:[(0,I.jsxs)(`div`,{className:`min-w-0`,children:[e?(0,I.jsx)(`p`,{className:`label-eyebrow mb-1`,children:e}):null,(0,I.jsx)(`h1`,{className:`text-2xl`,children:t}),n?(0,I.jsx)(`div`,{className:`mt-1 max-w-3xl text-sm text-muted-foreground`,children:n}):null]}),r?(0,I.jsx)(`div`,{className:`flex shrink-0 items-center gap-2`,children:r}):null]})}function Wh({id:e,className:t,children:n}){return(0,I.jsx)(`section`,{id:e,className:H(`glass-card p-5`,t),children:n})}function Gh({icon:e=Ot,title:t,description:n,action:r}){return(0,I.jsxs)(`div`,{className:`rounded-lg border border-dashed border-border p-8 text-center`,children:[(0,I.jsx)(`div`,{className:`mx-auto mb-3 inline-flex size-10 items-center justify-center rounded-full bg-accent text-accent-foreground`,children:(0,I.jsx)(e,{className:`size-5`,"aria-hidden":!0})}),(0,I.jsx)(`h2`,{className:`text-lg`,children:t}),n?(0,I.jsx)(`p`,{className:`mx-auto mt-1 max-w-md text-sm text-muted-foreground`,children:n}):null,r?(0,I.jsx)(`div`,{className:`mt-4`,children:r}):null]})}function Kh({error:e}){let{language:t}=J(),n=e instanceof oc&&e.status===401;if(F.useEffect(()=>{if(!n||typeof window>`u`)return;let e=window.location.pathname+window.location.search;window.location.href=`/admin/sign-in?return=${encodeURIComponent(e)}`},[n]),n)return null;let r=e instanceof Error?e.message:`Unknown error.`;return(0,I.jsxs)(`div`,{className:`rounded-lg border border-destructive/30 bg-destructive/5 p-4 text-sm text-destructive`,children:[Y(t,`common.failedToLoad`),`: `,r]})}function qh({error:e}){let{language:t}=J(),n=e instanceof oc&&e.status===401;if(F.useEffect(()=>{if(!n||typeof window>`u`)return;let e=window.location.pathname+window.location.search;window.location.href=`/admin/sign-in?return=${encodeURIComponent(e)}`},[n]),n)return null;let r=e instanceof Error?e.message:String(e);return(0,I.jsxs)(`div`,{className:`rounded-lg border border-destructive/30 bg-destructive/5 p-4 text-sm text-destructive`,children:[(0,I.jsx)(`p`,{children:Y(t,`ops.error.executionFailed`)}),(0,I.jsxs)(`details`,{className:`group mt-2`,children:[(0,I.jsx)(`summary`,{className:`inline-flex cursor-pointer list-none items-center rounded-md border border-destructive/30 bg-card/40 px-2.5 py-1 text-xs font-semibold text-destructive/80 transition hover:bg-destructive/10`,children:Y(t,`ops.error.detailsLabel`)}),(0,I.jsx)(`p`,{className:`mt-2 max-w-3xl whitespace-pre-wrap break-words rounded-md border border-destructive/20 bg-card/30 p-3 font-mono text-xs leading-relaxed text-destructive/90`,children:r})]})]})}function Jh({description:e,summaryLabel:t,collapsedIntro:n}){return Yh(e)?(0,I.jsxs)(`div`,{className:`space-y-2`,children:[(0,I.jsx)(`p`,{children:n}),(0,I.jsxs)(`details`,{className:`group`,children:[(0,I.jsx)(`summary`,{className:`inline-flex cursor-pointer list-none items-center rounded-md border border-border bg-card/70 px-2.5 py-1 text-xs font-semibold text-foreground/70 transition hover:bg-accent hover:text-accent-foreground`,children:t}),(0,I.jsx)(`p`,{className:`mt-2 max-w-3xl rounded-md border border-border bg-card/55 p-3 text-xs leading-relaxed text-muted-foreground`,children:e})]})]}):(0,I.jsx)(I.Fragment,{children:e})}function Yh(e){return e.length>180||e.includes("`")}function Xh({label:e,value:t,href:n}){let{language:r}=J(),[i,a]=F.useState(!1);async function o(){try{await navigator.clipboard.writeText(t),a(!0),window.setTimeout(()=>a(!1),1400)}catch{a(!1)}}return(0,I.jsxs)(`div`,{className:`rounded-lg border border-border/70 bg-background/30 p-3`,children:[(0,I.jsxs)(`div`,{className:`mb-1 flex items-center justify-between gap-3`,children:[(0,I.jsx)(`span`,{className:`label-eyebrow`,children:e}),(0,I.jsxs)(`div`,{className:`flex items-center gap-1`,children:[n?(0,I.jsx)(U,{asChild:!0,variant:`ghost`,size:`icon`,className:`size-7`,children:(0,I.jsx)(`a`,{href:n,target:`_blank`,rel:`noreferrer`,"aria-label":`${Y(r,`common.open`)} ${e}`,children:(0,I.jsx)(Rt,{className:`size-3.5`,"aria-hidden":!0})})}):null,(0,I.jsx)(U,{type:`button`,variant:`ghost`,size:`icon`,className:`size-7`,onClick:o,"aria-label":`${Y(r,`common.copy`)} ${e}`,children:i?(0,I.jsx)(wt,{className:`size-3.5 text-[color:var(--success)]`,"aria-hidden":!0}):(0,I.jsx)(Pt,{className:`size-3.5`,"aria-hidden":!0})})]})]}),(0,I.jsx)(`code`,{className:`block truncate font-mono text-xs text-foreground`,children:t})]})}var Zh=[on,zt,Ft],Qh=`https://claude.ai/customize/connectors?modal=add-custom-connector`,$h=`https://claude.ai/new`;function eg(){let{language:e}=J(),t=L({queryKey:[`site`],queryFn:()=>q.get(`/site`)}),n=L({queryKey:[`collections`],queryFn:async()=>(await q.get(`/collections`)).collections}),r=(n.data??[]).filter(e=>!e.parent),i=t.data,a=i?.canonicalLocale??null;return(0,I.jsxs)(`div`,{className:`space-y-6`,children:[(0,I.jsx)(Uh,{eyebrow:Y(e,`console.eyebrow`),title:i?.brand??`AotterMantle`,description:i?Y(e,`console.description`,{title:i.title}):Y(e,`console.descriptionFallback`),actions:i?.publicUrl?(0,I.jsx)(U,{asChild:!0,variant:`outline`,children:(0,I.jsxs)(`a`,{href:i.publicUrl,target:`_blank`,rel:`noreferrer`,children:[(0,I.jsx)(Vt,{className:`size-4`,"aria-hidden":!0}),Y(e,`common.viewSite`)]})}):null}),t.isLoading?(0,I.jsx)(`div`,{className:`glass-card h-72 animate-pulse`}):t.isError?(0,I.jsx)(Kh,{error:t.error}):i?(0,I.jsxs)(Wh,{className:`overflow-hidden p-0`,children:[(0,I.jsxs)(`div`,{className:`flex flex-wrap items-start justify-between gap-4 border-b border-border/70 p-5`,children:[(0,I.jsxs)(`div`,{className:`flex items-start gap-3`,children:[(0,I.jsx)(`div`,{className:`rounded-xl bg-primary/15 p-2 text-primary`,children:(0,I.jsx)(St,{className:`size-5`,"aria-hidden":!0})}),(0,I.jsxs)(`div`,{children:[(0,I.jsx)(`h2`,{className:`text-lg`,children:Y(e,`console.connector.title`)}),(0,I.jsx)(`p`,{className:`text-sm text-muted-foreground`,children:Y(e,`console.connector.body`)})]})]}),(0,I.jsxs)(`div`,{className:`flex gap-2`,children:[(0,I.jsx)(`span`,{className:`badge-status bg-foreground text-background`,children:`Claude`}),(0,I.jsx)(`span`,{className:`badge-status bg-accent text-accent-foreground`,children:`MCP`})]})]}),(0,I.jsxs)(`div`,{className:`grid divide-y divide-border/70 md:grid-cols-3 md:divide-x md:divide-y-0`,children:[(0,I.jsxs)(`div`,{className:`flex min-w-0 flex-col gap-4 p-5`,children:[(0,I.jsx)(tg,{children:`1`}),(0,I.jsxs)(`div`,{children:[(0,I.jsx)(`h3`,{children:Y(e,`console.connector.step1.title`)}),(0,I.jsx)(`p`,{className:`mt-1 text-sm text-muted-foreground`,children:Y(e,`console.connector.step1.body`)})]}),(0,I.jsx)(`div`,{className:`mt-auto`,children:(0,I.jsx)(Xh,{label:Y(e,`console.connector.step1.label`),value:i.mcpUrl})})]}),(0,I.jsxs)(`div`,{className:`flex min-w-0 flex-col gap-4 p-5`,children:[(0,I.jsx)(tg,{children:`2`}),(0,I.jsxs)(`div`,{children:[(0,I.jsx)(`h3`,{children:Y(e,`console.connector.step2.title`)}),(0,I.jsx)(`p`,{className:`mt-1 text-sm text-muted-foreground`,children:Y(e,`console.connector.step2.body`)})]}),(0,I.jsx)(`div`,{className:`mt-auto`,children:(0,I.jsx)(U,{asChild:!0,variant:`outline`,children:(0,I.jsxs)(`a`,{href:Qh,target:`_blank`,rel:`noreferrer`,children:[(0,I.jsx)(Rt,{className:`size-4`,"aria-hidden":!0}),Y(e,`console.connector.step2.action`)]})})})]}),(0,I.jsxs)(`div`,{className:`flex min-w-0 flex-col gap-4 p-5`,children:[(0,I.jsx)(tg,{children:`3`}),(0,I.jsxs)(`div`,{children:[(0,I.jsx)(`h3`,{children:Y(e,`console.connector.step3.title`)}),(0,I.jsx)(`p`,{className:`mt-1 text-sm text-muted-foreground`,children:Y(e,`console.connector.step3.body`)})]}),(0,I.jsx)(`div`,{className:`mt-auto`,children:(0,I.jsx)(U,{asChild:!0,children:(0,I.jsxs)(`a`,{href:$h,target:`_blank`,rel:`noreferrer`,children:[Y(e,`console.connector.step3.action`),(0,I.jsx)(Rt,{className:`size-4`,"aria-hidden":!0})]})})})]})]})]}):null,(0,I.jsx)(`div`,{className:`grid grid-cols-1 gap-4`,children:(0,I.jsxs)(Wh,{className:`admin-dashboard-panel`,children:[(0,I.jsxs)(`div`,{className:`mb-4 flex items-start gap-3`,children:[(0,I.jsx)(`div`,{className:`rounded-xl bg-primary/15 p-2 text-primary`,children:(0,I.jsx)(on,{className:`size-5`,"aria-hidden":!0})}),(0,I.jsxs)(`div`,{children:[(0,I.jsx)(`h2`,{className:`text-lg`,children:Y(e,`console.workspace.title`)}),(0,I.jsx)(`p`,{className:`text-sm text-muted-foreground`,children:Y(e,`console.workspace.body`)})]})]}),(0,I.jsx)(`div`,{className:`grid grid-cols-1 gap-2 sm:grid-cols-3`,children:r.slice(0,3).map((t,n)=>(0,I.jsx)(ng,{href:`/admin/c/${encodeURIComponent(t.name)}`,icon:Zh[n%Zh.length],label:lc(t.title,e,a)??t.name},t.name))})]})}),(0,I.jsxs)(`section`,{children:[(0,I.jsx)(Uh,{eyebrow:Y(e,`console.collections.eyebrow`),title:Y(e,`console.collections.title`),description:Y(e,`console.collections.body`)}),n.isLoading&&(0,I.jsx)(`div`,{className:`grid grid-cols-1 gap-4 md:grid-cols-2 xl:grid-cols-3`,children:[0,1,2].map(e=>(0,I.jsx)(`div`,{className:`glass-card h-36 animate-pulse`},e))}),n.isError&&(0,I.jsx)(Kh,{error:n.error}),n.data&&r.length===0&&(0,I.jsx)(Gh,{icon:Ft,title:Y(e,`console.collections.emptyTitle`),description:Y(e,`console.collections.emptyBody`)}),r.length>0&&(0,I.jsx)(`div`,{className:`grid grid-cols-1 gap-4 md:grid-cols-2 xl:grid-cols-3`,children:r.map(t=>{let n=lc(t.title,e,a)??t.name,r=lc(t.description,e,a);return(0,I.jsxs)(`a`,{href:`/admin/c/${encodeURIComponent(t.name)}`,className:`glass-card card-lift block p-5 no-underline text-foreground`,children:[(0,I.jsxs)(`div`,{className:`mb-3 flex items-start justify-between gap-3`,children:[(0,I.jsxs)(`div`,{className:`min-w-0`,children:[(0,I.jsx)(`h2`,{className:`truncate text-lg`,title:n,children:n}),(0,I.jsx)(`p`,{className:`font-mono text-xs text-muted-foreground`,children:t.name})]}),(0,I.jsx)(zt,{className:`size-5 shrink-0 text-muted-foreground`,"aria-hidden":!0})]}),r?(0,I.jsx)(`p`,{className:`line-clamp-2 text-sm text-muted-foreground`,children:rg(r)}):(0,I.jsx)(`p`,{className:`text-sm text-muted-foreground`,children:Y(e,`console.collections.noDescription`)}),(0,I.jsxs)(`div`,{className:`mt-4 flex flex-wrap gap-2`,children:[t.hasTranslations?(0,I.jsx)(`span`,{className:`badge-status bg-[color-mix(in_srgb,var(--info)_16%,transparent)] text-[color:var(--info)]`,children:`i18n`}):null,t.mediaFields?.length?(0,I.jsx)(`span`,{className:`badge-status bg-[color-mix(in_srgb,var(--success)_16%,transparent)] text-[color:var(--success)]`,children:`media`}):null]})]},t.name)})})]})]})}function tg({children:e}){return(0,I.jsx)(`span`,{className:`inline-flex size-6 items-center justify-center rounded-full bg-foreground/10 text-xs font-semibold text-foreground`,children:e})}function ng({href:e,icon:t,label:n}){return(0,I.jsxs)(`a`,{href:e,title:n,className:`quick-action`,children:[(0,I.jsx)(t,{className:`size-4`,"aria-hidden":!0}),(0,I.jsx)(`span`,{children:n})]})}function rg(e){let t=/^(.*?(?:。|\. ))/.exec(e);return(t?t[1]:e).trim()}function ig({children:e,className:t}){return(0,I.jsx)(`div`,{className:H(`glass-card overflow-hidden`,t),children:(0,I.jsx)(`div`,{className:`overflow-x-auto`,children:(0,I.jsx)(`table`,{className:`w-full min-w-[720px] text-sm`,children:e})})})}function ag({children:e,className:t}){return(0,I.jsx)(`th`,{className:H(`label-eyebrow px-3 py-2 text-left`,t),children:e})}function og({children:e,className:t}){return(0,I.jsx)(`td`,{className:H(`px-3 py-2 align-middle`,t),children:e})}function sg({...e}){return(0,I.jsx)(ts,{"data-slot":`dialog`,...e})}function cg({...e}){return(0,I.jsx)(ss,{"data-slot":`dialog-portal`,...e})}function lg({className:e,...t}){return(0,I.jsx)(ls,{"data-slot":`dialog-overlay`,className:H(`fixed inset-0 z-50 bg-black/50 data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:animate-in data-[state=open]:fade-in-0`,e),...t})}function ug({className:e,children:t,showCloseButton:n=!0,...r}){return(0,I.jsxs)(cg,{children:[(0,I.jsx)(lg,{}),(0,I.jsxs)(ps,{"data-slot":`dialog-content`,className:H(`fixed left-1/2 top-1/2 z-50 grid w-full max-w-lg -translate-x-1/2 -translate-y-1/2 gap-4 rounded-xl border border-[var(--glass-border)] bg-background p-6 shadow-[var(--glass-shadow-lg)] transition ease-in-out data-[state=closed]:animate-out data-[state=closed]:duration-200 data-[state=open]:animate-in data-[state=open]:duration-200 data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95`,e),...r,children:[t,n&&(0,I.jsxs)(Ss,{className:`absolute top-4 right-4 rounded-xs opacity-70 ring-offset-background transition-opacity hover:opacity-100 focus:ring-2 focus:ring-ring focus:ring-offset-2 focus:outline-hidden disabled:pointer-events-none data-[state=open]:bg-secondary`,children:[(0,I.jsx)(Pn,{className:`size-4`}),(0,I.jsx)(`span`,{className:`sr-only`,children:`Close`})]})]})]})}function dg({className:e,...t}){return(0,I.jsx)(`div`,{"data-slot":`dialog-header`,className:H(`flex flex-col gap-1.5`,e),...t})}function fg({className:e,...t}){return(0,I.jsx)(`div`,{"data-slot":`dialog-footer`,className:H(`flex justify-end gap-2`,e),...t})}function pg({className:e,...t}){return(0,I.jsx)(vs,{"data-slot":`dialog-title`,className:H(`font-semibold text-foreground`,e),...t})}function mg({className:e,...t}){return(0,I.jsx)(bs,{"data-slot":`dialog-description`,className:H(`text-sm text-muted-foreground`,e),...t})}var hg=F.createContext(null);function gg({children:e}){let{language:t}=J(),[n,r]=F.useState(null),i=F.useCallback(e=>new Promise(t=>{r({...e,resolve:t})}),[]);function a(e){n?.resolve(e),r(null)}let o=F.useMemo(()=>({confirm:i}),[i]);return(0,I.jsxs)(hg.Provider,{value:o,children:[e,(0,I.jsx)(sg,{open:n!=null,onOpenChange:e=>{e||a(!1)},children:(0,I.jsxs)(ug,{children:[(0,I.jsxs)(dg,{children:[(0,I.jsx)(pg,{children:Y(t,`confirm.title`)}),(0,I.jsx)(mg,{children:n?.description})]}),(0,I.jsxs)(fg,{children:[(0,I.jsx)(U,{type:`button`,variant:`secondary`,onClick:()=>a(!1),children:Y(t,`confirm.cancel`)}),(0,I.jsx)(U,{type:`button`,variant:`destructive`,onClick:()=>a(!0),children:Y(t,`confirm.confirm`)})]})]})})]})}function _g(){let e=F.useContext(hg);if(!e)throw Error(`useConfirm() must be used within <ConfirmProvider>.`);return e.confirm}var vg={draft:`bg-muted text-muted-foreground`,review:`bg-[color-mix(in_srgb,var(--warning)_18%,transparent)] text-[color:var(--warning)]`,approved:`bg-[color-mix(in_srgb,var(--success)_18%,transparent)] text-[color:var(--success)]`,scheduled:`bg-[color-mix(in_srgb,var(--info)_18%,transparent)] text-[color:var(--info)]`,published:`bg-[color-mix(in_srgb,var(--success)_18%,transparent)] text-[color:var(--success)]`,archived:`bg-secondary text-muted-foreground`},yg={draft:`status.draft`,review:`status.review`,published:`status.published`,archived:`status.archived`};function bg({status:e,className:t}){let{language:n}=J(),r=xg(e),i=yg[e];return(0,I.jsx)(`span`,{className:H(`badge-status`,r?vg[e]:`bg-accent text-accent-foreground`,t),children:i?Y(n,i):e})}function xg(e){return e in vg}var Sg=new Intl.DateTimeFormat(void 0,{dateStyle:`short`,timeStyle:`short`});function Cg(e){return e?.[`x-mcp-hint`]===`money-minor`}function wg(e){return e?.[`x-mcp-hint`]===`timestamp-ms`}function Tg(e,t){if(typeof e!=`number`||!Number.isFinite(e))return null;let n=e/100;if(typeof t==`string`&&t)try{return new Intl.NumberFormat(void 0,{style:`currency`,currency:t}).format(n)}catch{}return new Intl.NumberFormat().format(n)}function Eg(e){if(typeof e!=`number`||!Number.isFinite(e))return null;try{return Sg.format(new Date(e))}catch{return null}}function Dg(e,t){return e===`money-minor`?Y(t,`field.hint.moneyMinor`):e===`timestamp-ms`?Y(t,`field.hint.timestampMs`):e}function Og(e,t=8){return e.length<=t?e:e.slice(-t)}function kg(e){if(e instanceof oc){let t=e.body?.diagnostic?.message;if(t)return Error(t)}return e}var Ag=F.createContext(null),jg=3200;function Mg({children:e}){let[t,n]=F.useState([]),r=F.useRef(0),i=F.useCallback(e=>{let t=r.current++;n(n=>[...n,{id:t,message:e}]),window.setTimeout(()=>{n(e=>e.filter(e=>e.id!==t))},jg)},[]),a=F.useMemo(()=>({showToast:i}),[i]);return(0,I.jsxs)(Ag.Provider,{value:a,children:[e,(0,I.jsx)(`div`,{className:`pointer-events-none fixed bottom-4 right-4 z-[100] flex flex-col gap-2`,role:`status`,"aria-live":`polite`,children:t.map(e=>(0,I.jsxs)(`div`,{className:H(`pointer-events-auto flex items-center gap-2 rounded-lg border border-[var(--glass-border)] bg-background px-4 py-3 text-sm shadow-[var(--glass-shadow-lg)]`,`animate-in slide-in-from-bottom-2 fade-in-0 duration-200`),children:[(0,I.jsx)(kt,{className:`size-4 shrink-0 text-[color:var(--success)]`,"aria-hidden":!0}),(0,I.jsx)(`span`,{className:`text-foreground`,children:e.message})]},e.id))})]})}function Ng(){let e=F.useContext(Ag);if(!e)throw Error(`useToast() must be used within <ToastProvider>.`);return e}async function Pg(e){let t=Fg(e.purposes,e.preferredPurpose);if(!t)throw Error(`No media upload purpose is configured for this site.`);let n=await Rg(e.file,t,e.language??`en`),r=await q.post(`/media/uploads`,{filename:e.file.name,purpose:t.name,variants:n.map(e=>({mimeType:e.mimeType,byteSize:e.blob.size,role:e.role})),alt:e.alt??Jg(e.file),caption:e.caption});for(let e of n){let t=r.capabilities.find(t=>t.mimeType===e.mimeType&&t.role===e.role);if(!t)throw Error(`Upload capability missing for ${e.mimeType}.`);await fetch(t.uploadUrl,{method:t.method,headers:t.requiredHeaders??{"Content-Type":e.mimeType},body:e.blob})}return q.post(`/media/uploads/${encodeURIComponent(r.uploadGroupId)}/commit`,{alt:e.alt??Jg(e.file),caption:e.caption})}function Fg(e,t){if(t){let n=e.find(e=>e.name===t);if(n)return n}return e.find(e=>e.name===`content`)??e[0]??null}function Ig(e,t,n){let r=n[n.length-1]??``,i=qg(t.replace(/-translations$/,``)),a=[];/cover/i.test(r)&&a.push(`${i}-cover`),/image|asset|media/i.test(r)&&(a.push(`${i}-image`),a.push(`${i}-media`)),a.push(`content`);for(let t of a)if(e.some(e=>e.name===t))return t;return e[0]?.name}function Lg(e){return(e.variants.find(e=>e.role===`primary`)??e.variants[0])?.publicUrl??null}async function Rg(e,t,n){if(!e.type.startsWith(`image/`)||e.type===`image/svg+xml`)throw Error(`Only raster image uploads are supported in the admin UI.`);let r=zg(t.required);if(r.length===0)throw Error(`Media purpose '${t.name}' does not declare required image variants.`);let i=await createImageBitmap(e);try{let e=await Promise.all(r.map(e=>Ug(e,t,n))),a=e.find(Kg)??e[0],o=[];for(let r of e){let e=t.maxBytes[r]??2**53-1;o.push({mimeType:r,role:r===a?`primary`:`alternate`,blob:await Wg(i,r,e,n)})}return o}finally{i.close?.()}}function zg(e){return e.map(e=>e.split(`,`).map(Bg).filter(e=>!!e)).filter(e=>e.length>0)}function Bg(e){let t=e.trim().toLowerCase();return t?t===`jpg`||t===`jpeg`||t===`image/jpg`?`image/jpeg`:t===`png`?`image/png`:t===`webp`?`image/webp`:t===`avif`?`image/avif`:t===`gif`?`image/gif`:t.includes(`/`)?t:null:null}var Vg=new Map;function Hg(e){let t=Vg.get(e);return t||(t=(async()=>{try{let t=document.createElement(`canvas`);return t.width=1,t.height=1,(await new Promise(n=>t.toBlob(n,e)))?.type===e}catch{return!0}})(),Vg.set(e,t)),t}async function Ug(e,t,n){for(let n of e)if(n.startsWith(`image/`)&&t.maxBytes[n]!=null&&await Hg(n))return n;let r=e.find(e=>e.startsWith(`image/`)&&t.maxBytes[e]!=null);throw Error(Y(n,`media.encoderUnsupported`,{mime:r??e[0]??`?`}))}async function Wg(e,t,n,r){let i=1,a=t===`image/jpeg`?[.88,.78,.68,.58]:[.78,.68,.58,.48],o=null;for(let s=0;s<6;s+=1){for(let c of a){let a=await Gg(e,t,i,c);if(a.type!==t){if(s===0&&o===null)throw Error(Y(r,`media.encoderUnsupported`,{mime:t}));continue}if(o=a,a.size<=n)return a}i*=.82}if(o)return o;throw Error(`This browser cannot encode ${t}.`)}async function Gg(e,t,n,r){let i=document.createElement(`canvas`);i.width=Math.max(1,Math.round(e.width*n)),i.height=Math.max(1,Math.round(e.height*n));let a=i.getContext(`2d`);if(!a)throw Error(`Could not prepare image upload.`);a.drawImage(e,0,0,i.width,i.height);let o=await new Promise(e=>i.toBlob(e,t,r));if(!o)throw Error(`This browser cannot encode ${t}.`);return o}function Kg(e){return e===`image/jpeg`||e===`image/png`||e===`image/gif`}function qg(e){return e.endsWith(`ies`)?`${e.slice(0,-3)}y`:e.endsWith(`ses`)?e.slice(0,-2):e.endsWith(`s`)&&e.length>1?e.slice(0,-1):e}function Jg(e){return e.name.replace(/\.[^.]+$/,``)}function Yg({value:e,onChange:t,compact:n=!1}){let{language:r}=J(),i=F.useRef(null),a=F.useRef(null),[o,s]=F.useState(!1),[c,l]=F.useState(!1),[u,d]=F.useState(!1),[f,p]=F.useState(null),m=L({queryKey:[`site`],queryFn:()=>q.get(`/site`)}),h=F.useCallback((n,r=``,a=``)=>{let o=i.current;if(!o){t(`${e}${n}${a}${r}`);return}let s=o.selectionStart,c=o.selectionEnd,l=e.slice(s,c)||a;t(`${e.slice(0,s)}${n}${l}${r}${e.slice(c)}`),window.requestAnimationFrame(()=>{o.focus();let e=s+n.length,t=e+l.length;o.setSelectionRange(e,t)})},[t,e]),g=F.useCallback(t=>{let n=e.endsWith(`
|
|
136
136
|
`)||e.length===0?``:`
|
|
137
137
|
|
|
138
138
|
`;h(`${n}${t}`,``,``)},[h,e]);async function _(e){d(!0),p(null);try{let t=await Pg({file:e,purposes:m.data?.media?.purposes??[],preferredPurpose:`content`,language:r}),n=Lg(t);if(!n)throw Error(`Uploaded media has no public URL.`);v(n,t.alt??e.name)}catch(e){p(e instanceof Error?e.message:String(e))}finally{d(!1),a.current&&(a.current.value=``)}}function v(e,t){g(``)}function y(e){let t=n_(e);g(t),l(!1)}function b(e){if(e!==`paragraph`){if(/^h[1-6]$/.test(e)){let t=Number(e.slice(1));h(`${`#`.repeat(t)} `,``,Y(r,`editor.headingPlaceholder`));return}e===`quote`&&g(`> `),e===`code`&&h("```\n","\n```",`code`)}}return(0,I.jsxs)(`div`,{className:`rich-editor`,children:[(0,I.jsxs)(`div`,{className:`rich-editor-toolbar`,"aria-label":Y(r,`editor.toolbar`),children:[(0,I.jsx)(Xg,{title:Y(r,`editor.undo`),onClick:()=>t_(`undo`,i.current),children:(0,I.jsx)(Dn,{className:`size-4`,"aria-hidden":!0})}),(0,I.jsx)(Xg,{title:Y(r,`editor.redo`),onClick:()=>t_(`redo`,i.current),children:(0,I.jsx)(un,{className:`size-4`,"aria-hidden":!0})}),(0,I.jsx)(Zg,{}),(0,I.jsx)(Xg,{title:Y(r,`editor.aiClean`),onClick:()=>g(`> 重點提示:`),children:(0,I.jsx)(Mn,{className:`size-4`,"aria-hidden":!0})}),(0,I.jsx)(Xg,{title:Y(r,`editor.uploadImage`),onClick:()=>a.current?.click(),disabled:u,children:(0,I.jsx)(On,{className:`size-4`,"aria-hidden":!0})}),(0,I.jsx)(`input`,{ref:a,type:`file`,accept:`image/*`,className:`hidden`,onChange:e=>{let t=e.currentTarget.files?.[0];t&&_(t)}}),(0,I.jsx)(Zg,{}),(0,I.jsxs)(`label`,{className:`rich-editor-select`,title:Y(r,`editor.textStyle`),children:[(0,I.jsx)(Tn,{className:`size-4`,"aria-hidden":!0}),(0,I.jsxs)(`select`,{onChange:e=>{b(e.target.value),e.target.value=`paragraph`},defaultValue:`paragraph`,children:[(0,I.jsx)(`option`,{value:`paragraph`,children:`Paragraph`}),(0,I.jsx)(`option`,{value:`h1`,children:`H1`}),(0,I.jsx)(`option`,{value:`h2`,children:`H2`}),(0,I.jsx)(`option`,{value:`h3`,children:`H3`}),(0,I.jsx)(`option`,{value:`h4`,children:`H4`}),(0,I.jsx)(`option`,{value:`h5`,children:`H5`}),(0,I.jsx)(`option`,{value:`h6`,children:`H6`}),(0,I.jsx)(`option`,{value:`quote`,children:`Quote`}),(0,I.jsx)(`option`,{value:`code`,children:`Code`})]})]}),(0,I.jsx)(Zg,{}),(0,I.jsx)(Xg,{title:Y(r,`editor.bold`),onClick:()=>h(`**`,`**`,Y(r,`editor.selectedText`)),children:(0,I.jsx)(xt,{className:`size-4`,"aria-hidden":!0})}),(0,I.jsx)(Xg,{title:Y(r,`editor.italic`),onClick:()=>h(`_`,`_`,Y(r,`editor.selectedText`)),children:(0,I.jsx)(qt,{className:`size-4`,"aria-hidden":!0})}),(0,I.jsx)(Xg,{title:Y(r,`editor.underline`),onClick:()=>h(`<u>`,`</u>`,Y(r,`editor.selectedText`)),children:(0,I.jsx)(En,{className:`size-4`,"aria-hidden":!0})}),(0,I.jsx)(Xg,{title:Y(r,`editor.strike`),onClick:()=>h(`~~`,`~~`,Y(r,`editor.selectedText`)),children:(0,I.jsx)(_n,{className:`size-4`,"aria-hidden":!0})}),(0,I.jsx)(Xg,{title:Y(r,`editor.inlineCode`),onClick:()=>h("`","`",`code`),children:(0,I.jsx)(Nt,{className:`size-4`,"aria-hidden":!0})}),(0,I.jsx)(Xg,{title:Y(r,`editor.textColor`),onClick:()=>h(`<span class="text-accent">`,`</span>`,Y(r,`editor.selectedText`)),children:(0,I.jsx)(bt,{className:`size-4`,"aria-hidden":!0})}),(0,I.jsx)(Xg,{title:Y(r,`editor.highlight`),onClick:()=>h(`<mark>`,`</mark>`,Y(r,`editor.selectedText`)),children:(0,I.jsx)(Ht,{className:`size-4`,"aria-hidden":!0})}),(0,I.jsx)(Xg,{title:Y(r,`editor.palette`),onClick:()=>h(`<span class="brand-tone">`,`</span>`,Y(r,`editor.selectedText`)),children:(0,I.jsx)(rn,{className:`size-4`,"aria-hidden":!0})}),(0,I.jsx)(Zg,{}),(0,I.jsx)(Xg,{title:Y(r,`editor.alignLeft`),onClick:()=>g(`<p style="text-align:left"></p>`),children:(0,I.jsx)(Sn,{className:`size-4`,"aria-hidden":!0})}),(0,I.jsx)(Xg,{title:Y(r,`editor.alignCenter`),onClick:()=>g(`<p style="text-align:center"></p>`),children:(0,I.jsx)(bn,{className:`size-4`,"aria-hidden":!0})}),(0,I.jsx)(Xg,{title:Y(r,`editor.alignRight`),onClick:()=>g(`<p style="text-align:right"></p>`),children:(0,I.jsx)(xn,{className:`size-4`,"aria-hidden":!0})}),(0,I.jsx)(Xg,{title:Y(r,`editor.bulletList`),onClick:()=>g(`- `),children:(0,I.jsx)($t,{className:`size-4`,"aria-hidden":!0})}),(0,I.jsx)(Xg,{title:Y(r,`editor.numberList`),onClick:()=>g(`1. `),children:(0,I.jsx)(Qt,{className:`size-4`,"aria-hidden":!0})}),(0,I.jsx)(Xg,{title:Y(r,`editor.checkList`),onClick:()=>g(`- [ ] `),children:(0,I.jsx)(Xt,{className:`size-4`,"aria-hidden":!0})}),(0,I.jsx)(Xg,{title:Y(r,`editor.indent`),onClick:()=>h(` `,``,``),children:(0,I.jsx)(Zt,{className:`size-4`,"aria-hidden":!0})}),(0,I.jsx)(Zg,{}),(0,I.jsx)(Xg,{title:Y(r,`editor.link`),onClick:()=>h(`[`,`](https://)`,Y(r,`editor.linkText`)),children:(0,I.jsx)(Yt,{className:`size-4`,"aria-hidden":!0})}),(0,I.jsx)(Xg,{title:Y(r,`editor.table`),onClick:()=>g(`| 欄位 | 說明 |
|