import{r as m,j as x,T as S}from"./popup-Ci3BxTSt.js";var T=(e,o,i,a,n,r,d,u)=>{let s=document.documentElement,p=["light","dark"];function c(t){(Array.isArray(e)?e:[e]).forEach(l=>{let h=l==="class",v=h&&r?n.map(y=>r[y]||y):n;h?(s.classList.remove(...v),s.classList.add(r&&r[t]?r[t]:t)):s.setAttribute(l,t)}),f(t)}function f(t){u&&p.includes(t)&&(s.style.colorScheme=t)}function g(){return window.matchMedia("(prefers-color-scheme: dark)").matches?"dark":"light"}if(a)c(a);else try{let t=localStorage.getItem(o)||i,l=d&&t==="system"?g():t;c(l)}catch{}},b=m.createContext(void 0),E={setTheme:e=>{},themes:[]},w=()=>{var e;return(e=m.useContext(b))!=null?e:E};m.memo(({forcedTheme:e,storageKey:o,attribute:i,enableSystem:a,enableColorScheme:n,defaultTheme:r,value:d,themes:u,nonce:s,scriptProps:p})=>{let c=JSON.stringify([i,o,r,e,u,d,a,n]).slice(1,-1);return m.createElement("script",{...p,suppressHydrationWarning:!0,nonce:typeof window>"u"?s:"",dangerouslySetInnerHTML:{__html:`(${T.toString()})(${c})`}})});const k=({...e})=>{const{theme:o="system"}=w();return x.jsx(S,{theme:o,className:"toaster group",style:{"--normal-bg":"var(--popover)","--normal-text":"var(--popover-foreground)","--normal-border":"var(--border)"},...e})};class I{static ID_EXTENSION="ex-root"}export{I as C,k as T};
