PageSourceSearch

https://www.pyur.com/assets/use-media-query-ROALRhxJ.js

js pyur.com collected 2026-10-01 12:37:24 UTC 787 bytes, 1 lines download raw bytes

1import{r as f}from"./chunk-4N6VE7H7-BkdS-kab.js";import{u as E}from"./env-CVPlUD9i.js";function A(s,d={}){const{ssr:h=!0,fallback:n}=d,{getWindow:c}=E(),i=Array.isArray(s)?s:[s];let o=Array.isArray(n)?n:[n];o=o.filter(a=>a!=null);const[l,u]=f.useState(()=>i.map((a,t)=>({media:a,matches:h?!!o[t]:c().matchMedia(a).matches})));return f.useEffect(()=>{const a=c();u(i.map(e=>({media:e,matches:a.matchMedia(e).matches})));const t=i.map(e=>a.matchMedia(e)),r=e=>{u(p=>p.slice().map(m=>m.media===e.media?{...m,matches:e.matches}:m))};return t.forEach(e=>{typeof e.addListener=="function"?e.addListener(r):e.addEventListener("change",r)}),()=>{t.forEach(e=>{typeof e.removeListener=="function"?e.removeListener(r):e.removeEventListener("change",r)})}},[c]),l.map(a=>a.matches)}export{A as u};

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.