PageSourceSearch

https://rodrigosf672-data-compass.hf.space/assets/useTheme-CI2eq4XN.js

js rodrigosf672-data-compass.hf.space collected 2026-10-03 17:19:10 UTC 1,595 bytes, 1 lines download raw bytes

1import{i as o,p as d,u as h}from"./useEvent-D91BmmQi.js";import{t as f}from"./compiler-runtime-B3qBwwSJ.js";import{t as k,y}from"./utils-CvI-39U6.js";var b=f();const g=["light","dark","system"];var p=d(t=>{if(k()){if(document.body.classList.contains("dark-mode")||document.body.classList.contains("dark")||document.body.dataset.theme==="dark"||document.body.dataset.mode==="dark"||s()==="dark")return"dark";let e=window.getComputedStyle(document.body),r=e.getPropertyValue("color-scheme").trim();if(r)return r.includes("dark")?"dark":"light";let a=e.getPropertyValue("background-color").match(/\d+/g);if(a){let[m,u,l]=a.map(Number);return(m*299+u*587+l*114)/1e3<128?"dark":"light"}return"light"}return t(y).display.theme}),n=d(!1);function v(){if(typeof window>"u"||!window.matchMedia)return;let t=window.matchMedia("(prefers-color-scheme: dark)");o.set(n,t.matches),t.addEventListener("change",e=>{o.set(n,e.matches)})}v();function s(){switch(document.body.dataset.vscodeThemeKind){case"vscode-dark":return"dark";case"vscode-high-contrast":return"dark";case"vscode-light":return"light"}}var i=d(s());function w(){let t=new MutationObserver(()=>{let e=s();o.set(i,e)});return t.observe(document.body,{attributes:!0,attributeFilter:["data-vscode-theme-kind"]}),()=>t.disconnect()}w();const c=d(t=>{let e=t(p),r=t(i);if(r!==void 0)return r;let a=t(n);return e==="system"?a?"dark":"light":e});function L(){let t=(0,b.c)(3),e;t[0]===Symbol.for("react.memo_cache_sentinel")?(e={store:o},t[0]=e):e=t[0];let r=h(c,e),a;return t[1]===r?a=t[2]:(a={theme:r},t[1]=r,t[2]=a),a}export{c as n,L as r,g as t};

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.