1"use strict";(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[8298],{78298:function(e,t,n){n.r(t),n.d(t,{ThemeProvider:function(){return c},useTheme:function(){return i}});var r=n(2265);let a=["light","dark"],l="(prefers-color-scheme: dark)",s="undefined"==typeof window,o=(0,r.createContext)(void 0),m={setTheme:e=>{},themes:[]},i=()=>{var e;return null!==(e=(0,r.useContext)(o))&&void 0!==e?e:m},c=e=>(0,r.useContext)(o)?r.createElement(r.Fragment,null,e.children):r.createElement(u,e),d=["light","dark"],u=({forcedTheme:e,disableTransitionOnChange:t=!1,enableSystem:n=!0,enableColorScheme:s=!0,storageKey:m="theme",themes:i=d,defaultTheme:c=n?"system":"light",attribute:u="data-theme",value:$,children:g,nonce:b})=>{let[S,w]=(0,r.useState)(()=>f(m,c)),[T,p]=(0,r.useState)(()=>f(m)),C=$?Object.values($):i,k=(0,r.useCallback)(e=>{let r=e;if(!r)return;"system"===e&&n&&(r=v());let l=$?$[r]:r,o=t?y():null,m=document.documentElement;if("class"===u?(m.classList.remove(...C),l&&m.classList.add(l)):l?m.setAttribute(u,l):m.removeAttribute(u),s){let e=a.includes(c)?c:null,t=a.includes(r)?r:e;m.style.colorScheme=t}null==o||o()},[]),E=(0,r.useCallback)(e=>{w(e);try{localStorage.setItem(m,e)}catch(e){}},[e]),x=(0,r.useCallback)(t=>{p(v(t)),"system"===S&&n&&!e&&k("system")},[S,e]);(0,r.useEffect)(()=>{let e=window.matchMedia(l);return e.addListener(x),x(e),()=>e.removeListener(x)},[x]),(0,r.useEffect)(()=>{let e=e=>{e.key===m&&E(e.newValue||c)};return window.addEventListener("storage",e),()=>window.removeEventListener("storage",e)},[E]),(0,r.useEffect)(()=>{k(null!=e?e:S)},[e,S]);let L=(0,r.useMemo)(()=>({theme:S,setTheme:E,forcedTheme:e,resolvedTheme:"system"===S?T:S,themes:n?[...i,"system"]:i,systemTheme:n?T:void 0}),[S,E,e,T,n,i]);return r.createElement(o.Provider,{value:L},r.createElement(h,{forcedTheme:e,disableTransitionOnChange:t,enableSystem:n,enableColorScheme:s,storageKey:m,themes:i,defaultTheme:c,attribute:u,value:$,children:g,attrs:C,nonce:b}),g)},h=(0,r.memo)(({forcedTheme:e,storageKey:t,attribute:n,enableSystem:s,enableColorScheme:o,defaultTheme:m,value:i,attrs:c,nonce:d})=>{let u="system"===m,h="class"===n?`var d=document.documentElement,c=d.classList;c.remove(${c.map(e=>`'${e}'`).join(",")});`:`var d=document.documentElement,n='${n}',s='setAttribute';`,f=o?a.includes(m)&&m?`if(e==='light'||e==='dark'||!e)d.style.colorScheme=e||'${m}'`:"if(e==='light'||e==='dark')d.style.colorScheme=e":"",y=(e,t=!1,r=!0)=>{let l=i?i[e]:e,s=t?e+"|| ''":`'${l}'`,m="";return o&&r&&!t&&a.includes(e)&&(m+=`d.style.colorScheme = '${e}';`),"class"===n?m+=t||l?`c.add(${s})`:"null":l&&(m+=`d[s](n,${s})`),m},v=e?`!function(){${h}${y(e)}}()`:s?`!function(){try{${h}var e=localStorage.getItem('${t}');if('system'===e||(!e&&${u})){var t='${l}',m=window.matchMedia(t);if(m.media!==t||m.matches){${y("dark")}}else{${y("light")}}}else if(e){${i?`var x=${JSON.stringify(i)};`:""}${y(i?"x[e]":"e",!0)}}${u?"":"else{"+y(m,!1,!1)+"}"}${f}}catch(e){}}()`:`!function(){try{${h}var e=localStorage.getItem('${t}');if(e){${i?`var x=${JSON.stringify(i)};`:""}${y(i?"x[e]":"e",!0)}}else{${y(m,!1,!1)};}${f}}catch(t){}}();`;return r.createElement("script",{nonce:d,dangerouslySetInnerHTML:{__html:v}})},()=>!0),f=(e,t)=>{let n;if(!s){try{n=localStorage.getItem(e)||void 0}catch(e){}return n||t}},y=()=>{let e=document.createElement("style");return e.appendChild(document.createTextNode("*{-webkit-transition:none!important;-moz-transition:none!important;-o-transition:none!important;-ms-transition:none!important;transition:none!important}")),document.head.appendChild(e),()=>{window.getComputedStyle(document.body),setTimeout(()=>{document.head.removeChild(e)},1)}},v=e=>(e||(e=window.matchMedia(l)),e.matches?"dark":"light")}}]);
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.