1(globalThis.TURBOPACK||(globalThis.TURBOPACK=[])).push(["object"==typeof document?document.currentScript:void 0,85902,e=>{"use strict";let t,r;var a=e.i(43476),n=e.i(91918);let o=e=>"boolean"==typeof e?`${e}`:0===e?"0":e,l=function(){for(var e,t,r=0,a="",n=arguments.length;r<n;r++)(e=arguments[r])&&(t=function e(t){var r,a,n="";if("string"==typeof t||"number"==typeof t)n+=t;else if("object"==typeof t)if(Array.isArray(t)){var o=t.length;for(r=0;r<o;r++)t[r]&&(a=e(t[r]))&&(n&&(n+=" "),n+=a)}else for(a in t)t[a]&&(n&&(n+=" "),n+=a);return n}(e))&&(a&&(a+=" "),a+=t);return a};var i=e.i(79862);let s=(t="inline-flex items-center cursor-pointer justify-center gap-2 whitespace-nowrap rounded-md text-sm font-medium transition-all disabled:pointer-events-none disabled:opacity-50 [&_svg]:pointer-events-none [&_svg:not([class*='size-'])]:size-4 shrink-0 [&_svg]:shrink-0 outline-none focus-visible:border-ring focus-visible:ring-ring/50 focus-visible:ring-[3px] aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40 aria-invalid:border-destructive",r={variants:{variant:{default:"bg-primary text-primary-foreground hover:bg-primary/90",destructive:"bg-destructive text-white hover:bg-destructive/90 focus-visible:ring-destructive/20 dark:focus-visible:ring-destructive/40 dark:bg-destructive/60",outline:"border bg-background hover:text-accent-foreground dark:bg-background dark:border-edge",secondary:"bg-secondary text-secondary-foreground hover:bg-secondary/80",ghost:"hover:bg-accent hover:text-accent-foreground dark:hover:bg-accent/50",link:"text-primary underline-offset-4 hover:underline"},size:{default:"h-9 px-4 py-2 has-[>svg]:px-3",sm:"h-8 rounded-md gap-1.5 px-3 has-[>svg]:px-2.5",lg:"h-10 rounded-md px-6 has-[>svg]:px-4",icon:"size-9","icon-sm":"size-8","icon-lg":"size-10"}},defaultVariants:{variant:"default",size:"default"}},e=>{var a;if((null==r?void 0:r.variants)==null)return l(t,null==e?void 0:e.class,null==e?void 0:e.className);let{variants:n,defaultVariants:i}=r,s=Object.keys(n).map(t=>{let r=null==e?void 0:e[t],a=null==i?void 0:i[t];if(null===r)return null;let l=o(r)||o(a);return n[t][l]}),u=e&&Object.entries(e).reduce((e,t)=>{let[r,a]=t;return void 0===a||(e[r]=a),e},{});return l(t,s,null==r||null==(a=r.compoundVariants)?void 0:a.reduce((e,t)=>{let{class:r,className:a,...n}=t;return Object.entries(n).every(e=>{let[t,r]=e;return Array.isArray(r)?r.includes({...i,...u}[t]):({...i,...u})[t]===r})?[...e,r,a]:e},[]),null==e?void 0:e.class,null==e?void 0:e.className)});e.s(["Button",0,function({className:e,variant:t="default",size:r="default",asChild:o=!1,...l}){let u=o?n.Slot:"button";return(0,a.jsx)(u,{"data-slot":"button","data-variant":t,"data-size":r,className:(0,i.cn)(s({variant:t,size:r,className:e})),...l})},"buttonVariants",0,s],85902)},3511,e=>{"use strict";let t="https://github.com/akkaldhami",r=`${t}/servercn`;e.s(["AI_QUERIES",0,[{label:"ChatGPT",name:"chatgpt",url:e=>`https://chatgpt.com/?q=${encodeURIComponent(e)}`,isAvailable:!0},{label:"Claude",name:"claude",url:e=>`https://claude.ai/?q=${encodeURIComponent(e)}`,isAvailable:!0},{label:"Google AI Studio",name:"google-ai-studio",url:e=>`https://aistudio.google.com/prompts/new_chat?prompt=${encodeURIComponent(e)}`,isAvailable:!0},{label:"Perplexity",name:"perplexity",url:e=>`https://www.perplexity.ai/search/new?q=${encodeURIComponent(e)}`,isAvailable:!0},{label:"Grok",name:"grok",url:e=>`https://grok.com/?q=${encodeURIComponent(e)}`,isAvailable:!0},{label:"DeepSeek",name:"deepseek",url:e=>`https://chat.deepseek.com/?prompt=${encodeURIComponent(e)}`,isAvailable:!0},{label:"Gemini",name:"gemini",url:e=>`https://gemini.google.com/?prompt=${encodeURIComponent(e)}`,isAvailable:!0},{label:"V0",name:"v0",url:e=>`https://v0.app/?q=${encodeURIComponent(e)}`,isAvailable:!0},{label:"Scira",name:"scira",url:e=>`https://scira.ai/?q=${encodeURIComponent(e)}`,isAvailable:!0}],"APP_NAME",0,"servercn","BASE_GITHUB_URL",0,t,"CODE_THEME_BG_KEY",0,"servercn-code-theme-bg","COOKIE_THEME_KEY",0,"servercn-code-theme","DEFAULT_CODE_THEME",0,"vesper","DISCORD_URL",0,"https://discord.gg/2fXqnTXF8d","GITHUB_URL",0,r,"SERVERCN_URL",0,"https://servercn.vercel.app","STORAGE_THEME_KEY",0,"servercn-code-theme","X_URL",0,"https://x.com/_akkal_dhami"])},95187,(e,t,r)=>{"use strict";
1Object.defineProperty(r,"__esModule",{value:!0});var a={callServer:function(){return o.callServer},createServerReference:function(){return i.createServerReference},findSourceMapURL:function(){return l.findSourceMapURL}};for(var n in a)Object.defineProperty(r,n,{enumerable:!0,get:a[n]});let o=e.r(32120),l=e.r(92245),i=e.r(35326)},45613,64072,e=>{"use strict";var t=e.i(68834),r=e.i(79473),a=e.i(3511);let n=[{label:"Ayu Dark",value:"ayu-dark",favorite:!0},{label:"Aurora X",value:"aurora-x",favorite:!0},{label:"Dracula",value:"dracula"},{label:"Andromeeda",value:"andromeeda"},{label:"Houston",value:"houston",favorite:!0},{label:"LaserWave",value:"laserwave"},{label:"Vitesse Dark",value:"vitesse-dark"},{label:"Vesper(Default)",value:"vesper",favorite:!0},{label:"Poimandres",value:"poimandres"},{label:"Plastic",value:"plastic"},{label:"Tokyo Night",value:"tokyo-night"},{label:"Synthwave 84",value:"synthwave-84"},{label:"Kanagawa Dragon",value:"kanagawa-dragon"},{label:"Kanagawa Wave",value:"kanagawa-wave"},{label:"Light Plus",value:"light-plus",light:!0},{label:"Slack Ochin",value:"slack-ochin",light:!0,favorite:!0},{label:"Gruvbox Dark",value:"gruvbox-dark-hard"},{label:"Material Theme",value:"material-theme",favorite:!0},{label:"Monokai",value:"monokai",favorite:!0},{label:"GitHub Dark",value:"github-dark-default",favorite:!0},{label:"GitHub Light",value:"github-light-default",light:!0},{label:"One Light",value:"one-light",light:!0,favorite:!0},{label:"Min Light",value:"min-light",light:!0},{label:"Min Dark",value:"min-dark",favorite:!0},{label:"Rose Pine Moon",value:"rose-pine-moon"},{label:"Dark Plus",value:"dark-plus"},{label:"Solarized Dark",value:"solarized-dark"},{label:"Night Owl",value:"night-owl"},{label:"Catppuccin Macchiato",value:"catppuccin-macchiato"},{label:"One Dark Pro",value:"one-dark-pro",favorite:!0}],o=n.filter(e=>e.light),l=n.filter(e=>!e.light);
1e.s(["CODE_THEMES",0,n,"DARK_THEMES",0,l,"LIGHT_THEMES",0,o],64072);let i=(0,t.create)()((0,r.persist)(e=>({bg:"#101010",setBg:t=>{e({bg:t}),"u">typeof document&&(document.cookie=`${a.CODE_THEME_BG_KEY}=${t}; path=/; max-age=31536000`)}}),{name:a.CODE_THEME_BG_KEY})),s=(0,t.create)()((0,r.persist)(e=>({theme:a.DEFAULT_CODE_THEME,setTheme:t=>{if(e({theme:t}),"u">typeof document){document.cookie=`${a.COOKIE_THEME_KEY}=${t}; path=/; max-age=31536000`;let e=n.find(e=>e.value===t);e&&e.light||(document.cookie=`servercn-last-dark-theme=${t}; path=/; max-age=31536000`)}}}),{name:a.STORAGE_THEME_KEY}));e.s(["useCodeTheme",0,s,"useCodeThemeBg",0,i],45613)},64659,e=>{"use strict";var t=e.i(31171);e.s(["ChevronDown",()=>t.default])},47608,26999,41947,95926,e=>{"use strict";var t=e.i(43476),r=e.i(71645),a=e.i(81140),n=e.i(20783),o=e.i(30030),l=e.i(10772),i=e.i(69340),s=e.i(26330),u=e.i(65491),d=e.i(74606),c=e.i(96626),m=e.i(48425),p=e.i(3536),f=e.i(85369),v=e.i(86312),h=e.i(91918),g="Dialog",[b,x]=(0,o.createContextScope)(g),[y,C]=b(g),k=e=>{let{__scopeDialog:a,children:n,open:o,defaultOpen:s,onOpenChange:u,modal:d=!0}=e,c=r.useRef(null),m=r.useRef(null),[p,f]=(0,i.useControllableState)({prop:o,defaultProp:s??!1,onChange:u,caller:g});return(0,t.jsx)(y,{scope:a,triggerRef:c,contentRef:m,contentId:(0,l.useId)(),titleId:(0,l.useId)(),descriptionId:(0,l.useId)(),open:p,onOpenChange:f,onOpenToggle:r.useCallback(()=>f(e=>!e),[f]),modal:d,children:n})};k.displayName=g;var E="DialogTrigger",w=r.forwardRef((e,r)=>{let{__scopeDialog:o,...l}=e,i=C(E,o),s=(0,n.useComposedRefs)(r,i.triggerRef);return(0,t.jsx)(m.Primitive.button,{type:"button","aria-haspopup":"dialog","aria-expanded":i.open,"aria-controls":i.open?i.contentId:void 0,"data-state":G(i.open),...l,ref:s,onClick:(0,a.composeEventHandlers)(e.onClick,i.onOpenToggle)})});w.displayName=E;var R="DialogPortal",[j,S]=b(R,{forceMount:void 0}),_=e=>{let{__scopeDialog:a,forceMount:n,children:o,container:l}=e,i=C(R,a);return(0,t.jsx)(j,{scope:a,forceMount:n,children:r.Children.map(o,e=>(0,t.jsx)(c.Presence,{present:n||i.open,children:(0,t.jsx)(d.Portal,{asChild:!0,container:l,children:e})}))})};_.displayName=R;var D="DialogOverlay",P=r.forwardRef((e,r)=>{let a=S(D,e.__scopeDialog),{forceMount:n=a.forceMount,...o}=e,l=C(D,e.__scopeDialog);return l.modal?(0,t.jsx)(c.Presence,{present:n||l.open,children:(0,t.jsx)(A,{...o,ref:r})}):null});P.displayName=D;var I=(0,h.createSlot)("DialogOverlay.RemoveScroll"),A=r.forwardRef((e,r)=>{let{__scopeDialog:a,...o}=e,l=C(D,a),i=(0,s.useDismissableLayerSurface)(),u=(0,n.useComposedRefs)(r,i);return(0,t.jsx)(f.RemoveScroll,{as:I,allowPinchZoom:!0,shards:[l.contentRef],children:(0,t.jsx)(m.Primitive.div,{"data-state":G(l.open),...o,ref:u,style:{pointerEvents:"auto",...o.style}})})}),O="DialogContent",T=r.forwardRef((e,r)=>{let a=S(O,e.__scopeDialog),{forceMount:n=a.forceMount,...o}=e,l=C(O,e.__scopeDialog);return(0,t.jsx)(c.Presence,{present:n||l.open,children:l.modal?(0,t.jsx)(N,{...o,ref:r}):(0,t.jsx)(M,{...o,ref:r})})});T.displayName=O;var N=r.forwardRef((e,o)=>{let l=C(O,e.__scopeDialog),i=r.useRef(null),s=(0,n.useComposedRefs)(o,l.contentRef,i);return r.useEffect(()=>{let e=i.current;if(e)return(0,v.hideOthers)(e)},[]),(0,t.jsx)(F,{...e,ref:s,trapFocus:l.open,disableOutsidePointerEvents:l.open,onCloseAutoFocus:(0,a.composeEventHandlers)(e.onCloseAutoFocus,e=>{e.preventDefault(),l.triggerRef.current?.focus()}),onPointerDownOutside:(0,a.composeEventHandlers)(e.onPointerDownOutside,e=>{let t=e.detail.originalEvent,r=0===t.button&&!0===t.ctrlKey;(2===t.button||r)&&e.preventDefault()}),onFocusOutside:(0,a.composeEventHandlers)(e.onFocusOutside,e=>e.preventDefault())})}),M=r.forwardRef((e,a)=>{let n=C(O,e.__scopeDialog),o=r.useRef(!1),l=r.useRef(!1);return(0,t.jsx)(F,{...e,ref:a,trapFocus:!1,disableOutsidePointerEvents:!1,onCloseAutoFocus:t=>{e.onCloseAutoFocus?.(t),t.defaultPrevented||(o.current||n.triggerRef.current?.focus(),t.preventDefault()),o.current=!1,l.current=!1},onInteractOutside:t=>{e.onInteractOutside?.(t),t.defaultPrevented||(o.current=!0,"pointerdown"===t.detail.originalEvent.type&&(l.current=!0));let r=t.target;n.triggerRef.current?.contains(r)&&t.preventDefault(),"focusin"===t.detail.originalEvent.type&&l.current&&t.preventDefault()}})}),F=r.forwardRef((e,r)=>{let{__scopeDialog:a,trapFocus:n,onOpenAutoFocus:o,onCloseAutoFocus:l,...i}=e,d=C(O,a);return(0,p.useFocusGuards)(),(0,t.jsx)(t.Fragment,{children:(0,t.jsx)(u.FocusScope,{asChild:!0,loop:!0,trapped:n,onMountAutoFocus:o,onUnmountAutoFocus:l,children:(0,t.jsx)(s.DismissableLayer,{role:"dialog",id:d.contentId,"aria-describedby":d.descriptionId,"aria-labelledby":d.titleId,"data-state":G(d.open),...i,ref:r,deferPointerDownOutside:!0,onDismiss:()=>d.onOpenChange(!1)})})})}),L="DialogTitle",H=r.forwardRef((e,r)=>{let{__scopeDialog:a,...n}=e,o=C(L,a);return(0,t.jsx)(m.Primitive.h2,{id:o.titleId,...n,ref:r})});H.displayName=L;var z="DialogDescription",K=r.forwardRef((e,r)=>{let{__scopeDialog:a,...n}=e,o=C(z,a);return(0,t.jsx)(m.Primitive.p,{id:o.descriptionId,...n,ref:r})});K.displayName=z;var U="DialogClose",$=r.forwardRef((e,r)=>{let{__scopeDialog:n,...o}=e,l=C(U,n);return(0,t.jsx)(m.Primitive.button,{type:"button",...o,ref:r,onClick:(0,a.composeEventHandlers)(e.onClick,()=>l.onOpenChange(!1))})});function G(e){return e?"open":"closed"}$.displayName=U,e.s(["Close",0,$,"Content",0,T,"Description",0,K,"Overlay",0,P,"Portal",0,_,"Root",0,k,"Title",0,H,"Trigger",0,w],26999);let B=(0,e.i(75254).default)("x",[["path",{d:"M18 6 6 18",key:"1bl5f8"}
1],["path",{d:"m6 6 12 12",key:"d8bk6v"}]]);e.s(["default",0,B],41947),e.s(["XIcon",0,B],95926);var V=e.i(79862);function q({...e}){return(0,t.jsx)(_,{"data-slot":"dialog-portal",...e})}function Y({className:e,...r}){return(0,t.jsx)(P,{"data-slot":"dialog-overlay",className:(0,V.cn)("data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 fixed inset-0 z-50 bg-black/50",e),...r})}e.s(["Dialog",0,function({...e}){return(0,t.jsx)(k,{"data-slot":"dialog",...e})},"DialogContent",0,function({className:e,children:r,showCloseButton:a=!0,...n}){return(0,t.jsxs)(q,{"data-slot":"dialog-portal",children:[(0,t.jsx)(Y,{}),(0,t.jsxs)(T,{"data-slot":"dialog-content",className:(0,V.cn)("bg-background 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 fixed top-[50%] left-[50%] z-50 grid w-full max-w-[calc(100%-2rem)] translate-x-[-50%] translate-y-[-50%] gap-4 rounded-lg border p-6 shadow-lg duration-200 outline-none sm:max-w-lg",e),...n,children:[r,a&&(0,t.jsxs)($,{"data-slot":"dialog-close",className:"ring-offset-background focus:ring-ring data-[state=open]:bg-accent data-[state=open]:text-muted-foreground absolute top-4 right-4 cursor-pointer rounded-xs opacity-70 transition-opacity hover:opacity-100 focus:ring-2 focus:ring-offset-2 focus:outline-hidden disabled:pointer-events-none [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4",children:[(0,t.jsx)(B,{}),(0,t.jsx)("span",{className:"sr-only",children:"Close"})]})]})]})},"DialogDescription",0,function({className:e,...r}){return(0,t.jsx)(K,{"data-slot":"dialog-description",className:(0,V.cn)("text-muted-foreground text-sm",e),...r})},"DialogFooter",0,function({className:e,...r}){return(0,t.jsx)("div",{"data-slot":"dialog-footer",className:(0,V.cn)("flex flex-col-reverse gap-2 sm:flex-row sm:justify-end",e),...r})},"DialogHeader",0,function({className:e,...r}){return(0,t.jsx)("div",{"data-slot":"dialog-header",className:(0,V.cn)("flex flex-col gap-2 text-center sm:text-left",e),...r})},"DialogTitle",0,function({className:e,...r}){return(0,t.jsx)(H,{"data-slot":"dialog-title",className:(0,V.cn)("text-lg leading-none font-semibold",e),...r})},"DialogTrigger",0,function({...e}){return(0,t.jsx)(w,{"data-slot":"dialog-trigger",...e})}],47608)},63178,e=>{"use strict";var t=e.i(71645),r=(e,t,r,a,n,o,l,i)=>{let s=document.documentElement,u=["light","dark"];function d(t){var r;(Array.isArray(e)?e:[e]).forEach(e=>{let r="class"===e,a=r&&o?n.map(e=>o[e]||e):n;r?(s.classList.remove(...a),s.classList.add(o&&o[t]?o[t]:t)):s.setAttribute(e,t)}),r=t,i&&u.includes(r)&&(s.style.colorScheme=r)}if(a)d(a);else try{let e=localStorage.getItem(t)||r,a=l&&"system"===e?window.matchMedia("(prefers-color-scheme: dark)").matches?"dark":"light":e;d(a)}catch(e){}},a=["light","dark"],n="(prefers-color-scheme: dark)",o="u"<typeof window,l=t.createContext(void 0),i={setTheme:e=>{},themes:[]},s=["light","dark"],u=({forcedTheme:e,disableTransitionOnChange:r=!1,enableSystem:o=!0,enableColorScheme:i=!0,storageKey:u="theme",themes:f=s,defaultTheme:v=o?"system":"light",attribute:h="data-theme",value:g,children:b,nonce:x,scriptProps:y})=>{let[C,k]=t.useState(()=>c(u,v)),[E,w]=t.useState(()=>"system"===C?p():C),R=g?Object.values(g):f,j=t.useCallback(e=>{let t=e;if(!t)return;"system"===e&&o&&(t=p());let n=g?g[t]:t,l=r?m(x):null,s=document.documentElement,u=e=>{"class"===e?(s.classList.remove(...R),n&&s.classList.add(n)):e.startsWith("data-")&&(n?s.setAttribute(e,n):s.removeAttribute(e))};if(Array.isArray(h)?h.forEach(u):u(h),i){let e=a.includes(v)?v:null,r=a.includes(t)?t:e;s.style.colorScheme=r}null==l||l()},[x]),S=t.useCallback(e=>{let t="function"==typeof e?e(C):e;k(t);try{localStorage.setItem(u,t)}catch(e){}},[C]),_=t.useCallback(t=>{w(p(t)),"system"===C&&o&&!e&&j("system")},[C,e]);t.useEffect(()=>{let e=window.matchMedia(n);return e.addListener(_),_(e),()=>e.removeListener(_)},[_]),t.useEffect(()=>{let e=e=>
1{e.key===u&&(e.newValue?k(e.newValue):S(v))};return window.addEventListener("storage",e),()=>window.removeEventListener("storage",e)},[S]),t.useEffect(()=>{j(null!=e?e:C)},[e,C]);let D=t.useMemo(()=>({theme:C,setTheme:S,forcedTheme:e,resolvedTheme:"system"===C?E:C,themes:o?[...f,"system"]:f,systemTheme:o?E:void 0}),[C,S,e,E,o,f]);return t.createElement(l.Provider,{value:D},t.createElement(d,{forcedTheme:e,storageKey:u,attribute:h,enableSystem:o,enableColorScheme:i,defaultTheme:v,value:g,themes:f,nonce:x,scriptProps:y}),b)},d=t.memo(({forcedTheme:e,storageKey:a,attribute:n,enableSystem:o,enableColorScheme:l,defaultTheme:i,value:s,themes:u,nonce:d,scriptProps:c})=>{let m=JSON.stringify([n,a,i,e,u,s,o,l]).slice(1,-1);return t.createElement("script",{...c,suppressHydrationWarning:!0,nonce:"u"<typeof window?d:"",dangerouslySetInnerHTML:{__html:`(${r.toString()})(${m})`}})}),c=(e,t)=>{let r;if(!o){try{r=localStorage.getItem(e)||void 0}catch(e){}return r||t}},m=e=>{let t=document.createElement("style");return e&&t.setAttribute("nonce",e),t.appendChild(document.createTextNode("*,*::before,*::after{-webkit-transition:none!important;-moz-transition:none!important;-o-transition:none!important;-ms-transition:none!important;transition:none!important}")),document.head.appendChild(t),()=>{window.getComputedStyle(document.body),setTimeout(()=>{document.head.removeChild(t)},1)}},p=e=>(e||(e=window.matchMedia(n)),e.matches?"dark":"light");e.s(["ThemeProvider",0,e=>t.useContext(l)?t.createElement(t.Fragment,null,e.children):t.createElement(u,{...e}),"useTheme",0,()=>{var e;return null!=(e=t.useContext(l))?e:i}])},13757,88846,34953,e=>{"use strict";var t=e.i(43476),r=e.i(71645);e.i(3511);var a=e.i(18566),n=e.i(45613),o=e.i(78784),l=e.i(9797),i=e.i(85902),s=/[\\\/_+.#"@\[\(\{&]/,u=/[\\\/_+.#"@\[\(\{&]/g,d=/[\s-]/,c=/[\s-]/g;function m(e){return e.toLowerCase().replace(c," ")}var p=e.i(26999),f=e.i(48425),v=e.i(10772),h=e.i(20783),g='[cmdk-group=""]',b='[cmdk-group-items=""]',x='[cmdk-item=""]',y=`${x}:not([aria-disabled="true"])`,C="cmdk-item-select",k="data-value",E=(e,t,r)=>{var a;return a=e,function e(t,r,a,n,o,l,i){if(l===r.length)return o===t.length?1:.99;var m=`${o},${l}`;if(void 0!==i[m])return i[m];for(var p,f,v,h,g=n.charAt(l),b=a.indexOf(g,o),x=0;b>=0;)(p=e(t,r,a,n,b+1,l+1,i))>x&&(b===o?p*=1:s.test(t.charAt(b-1))?(p*=.8,(v=t.slice(o,b-1).match(u))&&o>0&&(p*=Math.pow(.999,v.length))):d.test(t.charAt(b-1))?(p*=.9,(h=t.slice(o,b-1).match(c))&&o>0&&(p*=Math.pow(.999,h.length))):(p*=.17,o>0&&(p*=Math.pow(.999,b-o))),t.charAt(b)!==r.charAt(l)&&(p*=.9999)),(p<.1&&a.charAt(b-1)===n.charAt(l+1)||n.charAt(l+1)===n.charAt(l)&&a.charAt(b-1)!==n.charAt(l))&&.1*(f=e(t,r,a,n,b+1,l+2,i))>p&&(p=.1*f),p>x&&(x=p),b=a.indexOf(g,b+1);return i[m]=x,x}(a=r&&r.length>0?`${a+" "+r.join(" ")}`:a,t,m(a),m(t),0,0,{})},w=r.createContext(void 0),R=r.createContext(void 0),j=r.createContext(void 0),S=r.forwardRef((e,t)=>{let a=F(()=>{var t,r;return{search:"",value:null!=(r=null!=(t=e.value)?t:e.defaultValue)?r:"",selectedItemId:void 0,filtered:{count:0,items:new Map,groups:new Set}}}),n=F(()=>new Set),o=F(()=>new Map),l=F(()=>new Map),i=F(()=>new Set),s=N(e),{label:u,children:d,value:c,onValueChange:m,filter:p,shouldFilter:h,loop:j,disablePointerSelection:S=!1,vimBindings:_=!0,...D}=e,P=(0,v.useId)(),I=(0,v.useId)(),A=(0,v.useId)(),O=r.useRef(null),T=z();M(()=>{if(void 0!==c){let e=c.trim();a.current.value=e,L.emit()}},[c]),M(()=>{T(6,q)},[]);let L=r.useMemo(()=>({subscribe:e=>(i.current.add(e),()=>i.current.delete(e)),snapshot:()=>a.current,setState:(e,t,r)=>{var n,o,l,i;if(!Object.is(a.current[e],t)){if(a.current[e]=t,"search"===e)V(),G(),T(1,B);else if("value"===e){if(document.activeElement.hasAttribute("cmdk-input")||document.activeElement.hasAttribute("cmdk-root")){let e=document.getElementById(A);e?e.focus():null==(n=document.getElementById(P))||n.focus()}if(T(7,()=>{var e;a.current.selectedItemId=null==(e=Y())?void 0:e.id,L.emit()}),r||T(5,q),(null==(o=s.current)?void 0:o.value)!==void 0){null==(i=(l=s.current).onValueChange)||i.call(l,null!=t?t:"");return}}L.emit()}},emit:()=>
1{i.current.forEach(e=>e())}}),[]),H=r.useMemo(()=>({value:(e,t,r)=>{var n;t!==(null==(n=l.current.get(e))?void 0:n.value)&&(l.current.set(e,{value:t,keywords:r}),a.current.filtered.items.set(e,$(t,r)),T(2,()=>{G(),L.emit()}))},item:(e,t)=>(n.current.add(e),t&&(o.current.has(t)?o.current.get(t).add(e):o.current.set(t,new Set([e]))),T(3,()=>{V(),G(),a.current.value||B(),L.emit()}),()=>{l.current.delete(e),n.current.delete(e),a.current.filtered.items.delete(e);let t=Y();T(4,()=>{V(),(null==t?void 0:t.getAttribute("id"))===e&&B(),L.emit()})}),group:e=>(o.current.has(e)||o.current.set(e,new Set),()=>{l.current.delete(e),o.current.delete(e)}),filter:()=>s.current.shouldFilter,label:u||e["aria-label"],getDisablePointerSelection:()=>s.current.disablePointerSelection,listId:P,inputId:A,labelId:I,listInnerRef:O}),[]);function $(e,t){var r,n;let o=null!=(n=null==(r=s.current)?void 0:r.filter)?n:E;return e?o(e,a.current.search,t):0}function G(){if(!a.current.search||!1===s.current.shouldFilter)return;let e=a.current.filtered.items,t=[];a.current.filtered.groups.forEach(r=>{let a=o.current.get(r),n=0;a.forEach(t=>{n=Math.max(e.get(t),n)}),t.push([r,n])});let r=O.current;W().sort((t,r)=>{var a,n;let o=t.getAttribute("id"),l=r.getAttribute("id");return(null!=(a=e.get(l))?a:0)-(null!=(n=e.get(o))?n:0)}).forEach(e=>{let t=e.closest(b);t?t.appendChild(e.parentElement===t?e:e.closest(`${b} > *`)):r.appendChild(e.parentElement===r?e:e.closest(`${b} > *`))}),t.sort((e,t)=>t[1]-e[1]).forEach(e=>{var t;let r=null==(t=O.current)?void 0:t.querySelector(`${g}[${k}="${encodeURIComponent(e[0])}"]`);null==r||r.parentElement.appendChild(r)})}function B(){let e=W().find(e=>"true"!==e.getAttribute("aria-disabled")),t=null==e?void 0:e.getAttribute(k);L.setState("value",t||void 0)}function V(){var e,t,r,i;if(!a.current.search||!1===s.current.shouldFilter){a.current.filtered.count=n.current.size;return}a.current.filtered.groups=new Set;let u=0;for(let o of n.current){let n=$(null!=(t=null==(e=l.current.get(o))?void 0:e.value)?t:"",null!=(i=null==(r=l.current.get(o))?void 0:r.keywords)?i:[]);a.current.filtered.items.set(o,n),n>0&&u++}for(let[e,t]of o.current)for(let r of t)if(a.current.filtered.items.get(r)>0){a.current.filtered.groups.add(e);break}a.current.filtered.count=u}function q(){var e,t,r;let a=Y();a&&((null==(e=a.parentElement)?void 0:e.firstChild)===a&&(null==(r=null==(t=a.closest(g))?void 0:t.querySelector('[cmdk-group-heading=""]'))||r.scrollIntoView({block:"nearest"})),a.scrollIntoView({block:"nearest"}))}function Y(){var e;return null==(e=O.current)?void 0:e.querySelector(`${x}[aria-selected="true"]`)}function W(){var e;return Array.from((null==(e=O.current)?void 0:e.querySelectorAll(y))||[])}function X(e){let t=W()[e];t&&L.setState("value",t.getAttribute(k))}function Z(e){var t;let r=Y(),a=W(),n=a.findIndex(e=>e===r),o=a[n+e];null!=(t=s.current)&&t.loop&&(o=n+e<0?a[a.length-1]:n+e===a.length?a[0]:a[n+e]),o&&L.setState("value",o.getAttribute(k))}function J(e){let t=Y(),r=null==t?void 0:t.closest(g),a;for(;r&&!a;)a=null==(r=e>0?function(e,t){let r=e.nextElementSibling;for(;r;){if(r.matches(t))return r;r=r.nextElementSibling}}(r,g):function(e,t){let r=e.previousElementSibling;for(;r;){if(r.matches(t))return r;r=r.previousElementSibling}}(r,g))?void 0:r.querySelector(y);a?L.setState("value",a.getAttribute(k)):Z(e)}let Q=()=>X(W().length-1),ee=e=>{e.preventDefault(),e.metaKey?Q():e.altKey?J(1):Z(1)},et=e=>{e.preventDefault(),e.metaKey?X(0):e.altKey?J(-1):Z(-1)};return r.createElement(f.Primitive.div,{ref:t,tabIndex:-1,...D,"cmdk-root":"",onKeyDown:e=>{var t;null==(t=D.onKeyDown)||t.call(D,e);let r=e.nativeEvent.isComposing||229===e.keyCode;if(!(e.defaultPrevented||r))switch(e.key){case"n":case"j":_&&e.ctrlKey&&ee(e);break;case"ArrowDown":ee(e);break;case"p":case"k":_&&e.ctrlKey&&et(e);break;case"ArrowUp":et(e);break;case"Home":e.preventDefault(),X(0);break;case"End":e.preventDefault(),Q();break;case"Enter":{e.preventDefault();let t=Y();if(t){let e=new Event(C);t.dispatchEvent(e)}}}}},r.createElement("label",{"cmdk-label":"",htmlFor:H.inputId,id:H.labelId,style:U},u),K(e,e=>r.createElement(R.Provider,{value:L},r.createElement(w.Provider,{value:H},e))))}),_=r.forwardRef((e,t)=>
1{var a,n;let o=(0,v.useId)(),l=r.useRef(null),i=r.useContext(j),s=r.useContext(w),u=N(e),d=null!=(n=null==(a=u.current)?void 0:a.forceMount)?n:null==i?void 0:i.forceMount;M(()=>{if(!d)return s.item(o,null==i?void 0:i.id)},[d]);let c=H(o,l,[e.value,e.children,l],e.keywords),m=r.useContext(R),p=L(e=>e.value&&e.value===c.current),g=L(e=>!!d||!1===s.filter()||!e.search||e.filtered.items.get(o)>0);function b(){var e,t;x(),null==(t=(e=u.current).onSelect)||t.call(e,c.current)}function x(){m.setState("value",c.current,!0)}if(r.useEffect(()=>{let t=l.current;if(!(!t||e.disabled))return t.addEventListener(C,b),()=>t.removeEventListener(C,b)},[g,e.onSelect,e.disabled]),!g)return null;let{disabled:y,value:k,onSelect:E,forceMount:S,keywords:_,...D}=e;return r.createElement(f.Primitive.div,{ref:(0,h.composeRefs)(l,t),...D,id:o,"cmdk-item":"",role:"option","aria-disabled":!!y,"aria-selected":!!p,"data-disabled":!!y,"data-selected":!!p,onPointerMove:y||s.getDisablePointerSelection()?void 0:x,onClick:y?void 0:b},e.children)}),D=r.forwardRef((e,t)=>{let{heading:a,children:n,forceMount:o,...l}=e,i=(0,v.useId)(),s=r.useRef(null),u=r.useRef(null),d=(0,v.useId)(),c=r.useContext(w),m=L(e=>!!o||!1===c.filter()||!e.search||e.filtered.groups.has(i));M(()=>c.group(i),[]),H(i,s,[e.value,e.heading,u]);let p=r.useMemo(()=>({id:i,forceMount:o}),[o]);return r.createElement(f.Primitive.div,{ref:(0,h.composeRefs)(s,t),...l,"cmdk-group":"",role:"presentation",hidden:!m||void 0},a&&r.createElement("div",{ref:u,"cmdk-group-heading":"","aria-hidden":!0,id:d},a),K(e,e=>r.createElement("div",{"cmdk-group-items":"",role:"group","aria-labelledby":a?d:void 0},r.createElement(j.Provider,{value:p},e))))}),P=r.forwardRef((e,t)=>{let{alwaysRender:a,...n}=e,o=r.useRef(null),l=L(e=>!e.search);return a||l?r.createElement(f.Primitive.div,{ref:(0,h.composeRefs)(o,t),...n,"cmdk-separator":"",role:"separator"}):null}),I=r.forwardRef((e,t)=>{let{onValueChange:a,...n}=e,o=null!=e.value,l=r.useContext(R),i=L(e=>e.search),s=L(e=>e.selectedItemId),u=r.useContext(w);return r.useEffect(()=>{null!=e.value&&l.setState("search",e.value)},[e.value]),r.createElement(f.Primitive.input,{ref:t,...n,"cmdk-input":"",autoComplete:"off",autoCorrect:"off",spellCheck:!1,"aria-autocomplete":"list",role:"combobox","aria-expanded":!0,"aria-controls":u.listId,"aria-labelledby":u.labelId,"aria-activedescendant":s,id:u.inputId,type:"text",value:o?e.value:i,onChange:e=>{o||l.setState("search",e.target.value),null==a||a(e.target.value)}})}),A=r.forwardRef((e,t)=>{let{children:a,label:n="Suggestions",...o}=e,l=r.useRef(null),i=r.useRef(null),s=L(e=>e.selectedItemId),u=r.useContext(w);return r.useEffect(()=>{if(i.current&&l.current){let e=i.current,t=l.current,r,a=new ResizeObserver(()=>{r=requestAnimationFrame(()=>{let r=e.offsetHeight;t.style.setProperty("--cmdk-list-height",r.toFixed(1)+"px")})});return a.observe(e),()=>{cancelAnimationFrame(r),a.unobserve(e)}}},[]),r.createElement(f.Primitive.div,{ref:(0,h.composeRefs)(l,t),...o,"cmdk-list":"",role:"listbox",tabIndex:-1,"aria-activedescendant":s,"aria-label":n,id:u.listId},K(e,e=>r.createElement("div",{ref:(0,h.composeRefs)(i,u.listInnerRef),"cmdk-list-sizer":""},e)))}),O=r.forwardRef((e,t)=>{let{open:a,onOpenChange:n,overlayClassName:o,contentClassName:l,container:i,...s}=e;return r.createElement(p.Root,{open:a,onOpenChange:n},r.createElement(p.Portal,{container:i},r.createElement(p.Overlay,{"cmdk-overlay":"",className:o}),r.createElement(p.Content,{"aria-label":e.label,"cmdk-dialog":"",className:l},r.createElement(S,{ref:t,...s}))))}),T=Object.assign(S,{List:A,Item:_,Input:I,Group:D,Separator:P,Dialog:O,Empty:r.forwardRef((e,t)=>L(e=>0===e.filtered.count)?r.createElement(f.Primitive.div,{ref:t,...e,"cmdk-empty":"",role:"presentation"}):null),Loading:r.forwardRef((e,t)=>{let{progress:a,children:n,label:o="Loading...",...l}=e;return r.createElement(f.Primitive.div,{ref:t,...l,"cmdk-loading":"",role:"progressbar","aria-valuenow":a,"aria-valuemin":0,"aria-valuemax":100,"aria-label":o},K(e,e=>r.createElement("div",{"aria-hidden":!0},e)))})});function N(e){let t=r.useRef(e);return M(()=>{t.current=e}),t}var M="u"<typeof window?r.useEffect:r.useLayoutEffect;function F(e){let t=r.useRef();return void 0===t.current&&(t.current=e()),t}function L(e){let t=r.useContext(R),a=()=>e(t.snapshot());return r.useSyncExternalStore(t.subscribe,a,a)}function H(e,t,a,n=[]){let o=r.useRef(),l=r.useContext(w);return M(()=>{var r;let i=(()=>{var e;
1for(let t of a){if("string"==typeof t)return t.trim();if("object"==typeof t&&"current"in t)return t.current?null==(e=t.current.textContent)?void 0:e.trim():o.current}})(),s=n.map(e=>e.trim());l.value(e,i,s),null==(r=t.current)||r.setAttribute(k,i),o.current=i}),o}var z=()=>{let[e,t]=r.useState(),a=F(()=>new Map);return M(()=>{a.current.forEach(e=>e()),a.current=new Map},[e]),(e,r)=>{a.current.set(e,r),t({})}};function K({asChild:e,children:t},a){let n;return e&&r.isValidElement(t)?r.cloneElement("function"==typeof(n=t.type)?n(t.props):"render"in n?n.render(t.props):t,{ref:t.ref},a(t.props.children)):a(t)}var U={position:"absolute",width:"1px",height:"1px",padding:"0",margin:"-1px",overflow:"hidden",clip:"rect(0, 0, 0, 0)",whiteSpace:"nowrap",borderWidth:"0"};let $=(0,e.i(75254).default)("search",[["path",{d:"m21 21-4.34-4.34",key:"14j7rj"}],["circle",{cx:"11",cy:"11",r:"8",key:"4ej97u"}]]);e.s(["SearchIcon",0,$],88846);var G=e.i(79862),B=e.i(47608);function V({className:e,...r}){return(0,t.jsx)(T,{"data-slot":"command",className:(0,G.cn)("bg-background text-popover-foreground flex h-full w-full flex-col overflow-hidden rounded-md",e),...r})}function q({className:e,...r}){return(0,t.jsxs)("div",{"data-slot":"command-input-wrapper",className:"flex h-9 items-center gap-2 border-b px-3",children:[(0,t.jsx)($,{className:"size-4 shrink-0 opacity-50"}),(0,t.jsx)(T.Input,{"data-slot":"command-input",className:(0,G.cn)("placeholder:text-muted-foreground flex h-10 w-full rounded-md bg-transparent py-3 text-sm outline-hidden disabled:cursor-not-allowed disabled:opacity-50",e),...r})]})}function Y({className:e,...r}){return(0,t.jsx)(T.List,{"data-slot":"command-list",className:(0,G.cn)("no-scrollbar max-h-[400px] scroll-py-1 overflow-x-hidden overflow-y-auto",e),...r})}function W({...e}){return(0,t.jsx)(T.Empty,{"data-slot":"command-empty",className:"py-6 text-center text-sm",...e})}function X({className:e,...r}){return(0,t.jsx)(T.Group,{"data-slot":"command-group",className:(0,G.cn)("text-foreground [&_[cmdk-group-heading]]:text-muted-foreground overflow-hidden p-1 text-base [&_[cmdk-group-heading]]:px-2 [&_[cmdk-group-heading]]:py-1.5 [&_[cmdk-group-heading]]:text-base [&_[cmdk-group-heading]]:font-medium",e),...r})}function Z({className:e,...r}){return(0,t.jsx)(T.Item,{"data-slot":"command-item",className:(0,G.cn)("data-[selected=true]:hover:bg-accent data-[selected=true]:bg-accent data-[selected=true]:text-accent-foreground [&_svg:not([class*='text-'])]:text-muted-foreground relative flex cursor-pointer items-center gap-2 rounded-sm px-2 py-2 text-sm outline-hidden select-none data-[disabled=true]:pointer-events-none data-[disabled=true]:opacity-50 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4",e),...r})}e.s(["Command",0,V,"CommandDialog",0,function({title:e="Command Palette",description:r="Search for a command to run...",children:a,className:n,showCloseButton:o=!0,...l}){return(0,t.jsxs)(B.Dialog,{...l,children:[(0,t.jsxs)(B.DialogHeader,{className:"sr-only",children:[(0,t.jsx)(B.DialogTitle,{children:e}),(0,t.jsx)(B.DialogDescription,{children:r})]}),(0,t.jsx)(B.DialogContent,{className:(0,G.cn)("overflow-hidden p-0",n),showCloseButton:o,children:(0,t.jsx)(V,{className:"[&_[cmdk-group-heading]]:text-muted-foreground **:data-[slot=command-input-wrapper]:h-12 [&_[cmdk-group-heading]]:px-2 [&_[cmdk-group-heading]]:font-medium [&_[cmdk-group]]:px-3 [&_[cmdk-group]:not([hidden])_~[cmdk-group]]:pt-0 [&_[cmdk-input-wrapper]_svg]:h-5 [&_[cmdk-input-wrapper]_svg]:w-5 [&_[cmdk-input]]:h-12 [&_[cmdk-item]]:px-3 [&_[cmdk-item]]:py-2 [&_[cmdk-item]_svg]:h-5 [&_[cmdk-item]_svg]:w-5",children:a})})]})},"CommandEmpty",0,W,"CommandGroup",0,X,"CommandInput",0,q,"CommandItem",0,Z,"CommandList",0,Y,"CommandSeparator",0,function({className:e,...r}){return(0,t.jsx)(T.Separator,{"data-slot":"command-separator",className:(0,G.cn)("bg-border -mx-1 h-px",e),...r})}],34953);var J=e.i(73554),Q=e.i(81140),ee=e.i(30030),et=e.i(26330),er=e.i(3536),ea=e.i(65491),en=e.i(53660),eo=e.i(74606),el=e.i(96626),ei=e.i(91918),es=e.i(69340),eu=e.i(86312),ed=e.i(85369),ec="Popover",[em,ep]=(0,ee.createContextScope)(ec,[en.createPopperScope]),ef=(0,en.createPopperScope)(),[ev,eh]=em(ec),eg=e=>{let{__scopePopover:a,children:n,open:o,defaultOpen:l,onOpenChange:i,modal:s=!1}=e,u=ef(a),d=r.useRef(null),[c,m]=r.useState(!1),[p,f]=(0,es.useControllableState)({prop:o,defaultProp:l??!1,onChange:i,caller:ec});return(0,t.jsx)(en.Root,{...u,children:(0,t.jsx)(ev,{scope:a,contentId:(0,v.useId)(),triggerRef:d,open:p,onOpenChange:f,onOpenToggle:r.useCallback(()=>f(e=>!e),[f]),hasCustomAnchor:c,onCustomAnchorAdd:r.useCallback(()=>m(!0),[]),onCustomAnchorRemove:r.useCallback(()=>m(!1),[]),modal:s,children:n})})};
1eg.displayName=ec;var eb="PopoverAnchor";r.forwardRef((e,a)=>{let{__scopePopover:n,...o}=e,l=eh(eb,n),i=ef(n),{onCustomAnchorAdd:s,onCustomAnchorRemove:u}=l;return r.useEffect(()=>(s(),()=>u()),[s,u]),(0,t.jsx)(en.Anchor,{...i,...o,ref:a})}).displayName=eb;var ex="PopoverTrigger",ey=r.forwardRef((e,r)=>{let{__scopePopover:a,...n}=e,o=eh(ex,a),l=ef(a),i=(0,h.useComposedRefs)(r,o.triggerRef),s=(0,t.jsx)(f.Primitive.button,{type:"button","aria-haspopup":"dialog","aria-expanded":o.open,"aria-controls":o.open?o.contentId:void 0,"data-state":eA(o.open),...n,ref:i,onClick:(0,Q.composeEventHandlers)(e.onClick,o.onOpenToggle)});return o.hasCustomAnchor?s:(0,t.jsx)(en.Anchor,{asChild:!0,...l,children:s})});ey.displayName=ex;var eC="PopoverPortal",[ek,eE]=em(eC,{forceMount:void 0}),ew=e=>{let{__scopePopover:r,forceMount:a,children:n,container:o}=e,l=eh(eC,r);return(0,t.jsx)(ek,{scope:r,forceMount:a,children:(0,t.jsx)(el.Presence,{present:a||l.open,children:(0,t.jsx)(eo.Portal,{asChild:!0,container:o,children:n})})})};ew.displayName=eC;var eR="PopoverContent",ej=r.forwardRef((e,r)=>{let a=eE(eR,e.__scopePopover),{forceMount:n=a.forceMount,...o}=e,l=eh(eR,e.__scopePopover);return(0,t.jsx)(el.Presence,{present:n||l.open,children:l.modal?(0,t.jsx)(e_,{...o,ref:r}):(0,t.jsx)(eD,{...o,ref:r})})});ej.displayName=eR;var eS=(0,ei.createSlot)("PopoverContent.RemoveScroll"),e_=r.forwardRef((e,a)=>{let n=eh(eR,e.__scopePopover),o=r.useRef(null),l=(0,h.useComposedRefs)(a,o),i=r.useRef(!1);return r.useEffect(()=>{let e=o.current;if(e)return(0,eu.hideOthers)(e)},[]),(0,t.jsx)(ed.RemoveScroll,{as:eS,allowPinchZoom:!0,children:(0,t.jsx)(eP,{...e,ref:l,trapFocus:n.open,disableOutsidePointerEvents:!0,onCloseAutoFocus:(0,Q.composeEventHandlers)(e.onCloseAutoFocus,e=>{e.preventDefault(),i.current||n.triggerRef.current?.focus()}),onPointerDownOutside:(0,Q.composeEventHandlers)(e.onPointerDownOutside,e=>{let t=e.detail.originalEvent,r=0===t.button&&!0===t.ctrlKey;i.current=2===t.button||r},{checkForDefaultPrevented:!1}),onFocusOutside:(0,Q.composeEventHandlers)(e.onFocusOutside,e=>e.preventDefault(),{checkForDefaultPrevented:!1})})})}),eD=r.forwardRef((e,a)=>{let n=eh(eR,e.__scopePopover),o=r.useRef(!1),l=r.useRef(!1);return(0,t.jsx)(eP,{...e,ref:a,trapFocus:!1,disableOutsidePointerEvents:!1,onCloseAutoFocus:t=>{e.onCloseAutoFocus?.(t),t.defaultPrevented||(o.current||n.triggerRef.current?.focus(),t.preventDefault()),o.current=!1,l.current=!1},onInteractOutside:t=>{e.onInteractOutside?.(t),t.defaultPrevented||(o.current=!0,"pointerdown"===t.detail.originalEvent.type&&(l.current=!0));let r=t.target;n.triggerRef.current?.contains(r)&&t.preventDefault(),"focusin"===t.detail.originalEvent.type&&l.current&&t.preventDefault()}})}),eP=r.forwardRef((e,r)=>{let{__scopePopover:a,trapFocus:n,onOpenAutoFocus:o,onCloseAutoFocus:l,disableOutsidePointerEvents:i,onEscapeKeyDown:s,onPointerDownOutside:u,onFocusOutside:d,onInteractOutside:c,...m}=e,p=eh(eR,a),f=ef(a);return(0,er.useFocusGuards)(),(0,t.jsx)(ea.FocusScope,{asChild:!0,loop:!0,trapped:n,onMountAutoFocus:o,onUnmountAutoFocus:l,children:(0,t.jsx)(et.DismissableLayer,{asChild:!0,disableOutsidePointerEvents:i,onInteractOutside:c,onEscapeKeyDown:s,onPointerDownOutside:u,onFocusOutside:d,onDismiss:()=>p.onOpenChange(!1),deferPointerDownOutside:!0,children:(0,t.jsx)(en.Content,{"data-state":eA(p.open),role:"dialog",id:p.contentId,...f,...m,ref:r,style:{...m.style,"--radix-popover-content-transform-origin":"var(--radix-popper-transform-origin)","--radix-popover-content-available-width":"var(--radix-popper-available-width)","--radix-popover-content-available-height":"var(--radix-popper-available-height)","--radix-popover-trigger-width":"var(--radix-popper-anchor-width)","--radix-popover-trigger-height":"var(--radix-popper-anchor-height)"}})})})}),eI="PopoverClose";function eA(e){return e?"open":"closed"}function eO({...e}){return(0,t.jsx)(eg,{"data-slot":"popover",...e})}function eT({...e}){return(0,t.jsx)(ey,{"data-slot":"popover-trigger",...e})}function eN({className:e,align:r="center",sideOffset:a=4,...n}){return(0,t.jsx)(ew,{children:(0,t.jsx)(ej,{"data-slot":"popover-content",align:r,sideOffset:a,className:(0,G.cn)("bg-popover text-popover-foreground data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:sli
1de-in-from-left-2 data-[side=top]:slide-in-from-bottom-2 z-50 w-72 origin-(--radix-popover-content-transform-origin) rounded-md border p-4 shadow-md outline-hidden",e),...n})})}r.forwardRef((e,r)=>{let{__scopePopover:a,...n}=e,o=eh(eI,a);return(0,t.jsx)(f.Primitive.button,{type:"button",...n,ref:r,onClick:(0,Q.composeEventHandlers)(e.onClick,()=>o.onOpenChange(!1))})}).displayName=eI,r.forwardRef((e,r)=>{let{__scopePopover:a,...n}=e,o=ef(a);return(0,t.jsx)(en.Arrow,{...o,...n,ref:r})}).displayName="PopoverArrow";var eM=e.i(64072),eF=e.i(95187);let eL=(0,eF.createServerReference)("00e7866e609bf0f07cfdb45a5d000461da24199b6d",eF.callServer,void 0,eF.findSourceMapURL,"changeCodeBlockBg");var eH=e.i(63178);e.s(["default",0,function({minimal:e=!1}){let{theme:s,setTheme:u}=(0,n.useCodeTheme)(),{theme:d}=(0,eH.useTheme)(),{setBg:c}=(0,n.useCodeThemeBg)(),m=(0,a.useRouter)(),p=(0,r.useId)(),[f,v]=(0,r.useState)(!1),[h,g]=(0,r.useState)(!1),b="light"===d?eM.LIGHT_THEMES:eM.DARK_THEMES;if((0,r.useEffect)(()=>{g(!0)},[]),!h)return null;let x=async()=>{let e=await eL();v(!1),c(e),m.refresh()};return(0,t.jsxs)("div",{className:"space-y-2",children:[!e&&(0,t.jsx)(J.Label,{htmlFor:p,className:"text-muted-foreground text-xs font-medium tracking-wider uppercase",children:"Code Theme"}),(0,t.jsxs)(eO,{onOpenChange:v,open:f,children:[(0,t.jsx)(eT,{asChild:!0,children:(0,t.jsxs)(i.Button,{"aria-expanded":f,className:"border-input bg-background hover:bg-background w-full justify-between px-3 font-normal outline-offset-0 outline-none focus-visible:outline-[3px]",id:p,role:"combobox",variant:"outline",children:[(0,t.jsx)("span",{className:"truncate",children:b.find(e=>e.value===s)?.label||"Select theme"}),(0,t.jsx)(l.ChevronDownIcon,{"aria-hidden":"true",className:"text-muted-foreground/80 shrink-0",size:16})]})}),(0,t.jsx)(eN,{align:"start",className:"border-input w-full min-w-(--radix-popper-anchor-width) p-0",children:(0,t.jsxs)(V,{children:[(0,t.jsx)(q,{placeholder:"Search theme..."}),(0,t.jsxs)(Y,{children:[(0,t.jsx)(W,{children:"No theme found."}),(0,t.jsx)(X,{children:b.sort((e,t)=>e.label.localeCompare(t.label)).map(e=>(0,t.jsxs)(Z,{onSelect:()=>{u(e.value),x(),v(!1),m.refresh()},value:e.value,className:"flex items-center justify-between",children:[e.label,(0,t.jsxs)("div",{className:"flex items-center gap-2",children:[s===e.value&&(0,t.jsx)(o.CheckIcon,{className:"ml-auto",size:16}),e.favorite&&(0,t.jsx)("span",{className:"bg-primary size-2 rounded-full"})]})]},e.value))})]})]})})]})]})}],13757)}]);
Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.