1import{p}from"./M64MF_6r.js";const h=new Set(["br","hr","img"]),g=new Set(["script","style","template","object","embed","applet","form","input","textarea","select","option","link","meta","base"]),d=new Set(["a","b","blockquote","button","br","code","del","div","esp-web-install-button","em","figcaption","figure","h1","h2","h3","h4","h5","h6","hr","iframe","img","i","li","ol","p","pre","s","span","strong","sub","sup","table","tbody","td","th","thead","tr","u","ul"]),w=new Set(["class","id","title","role","slot"]),S={a:new Set(["href","target","rel"]),button:new Set(["type"]),"esp-web-install-button":new Set(["manifest"]),img:new Set(["src","srcset","sizes","alt","width","height","loading","decoding"]),iframe:new Set(["src","title","width","height","loading","allow","allowfullscreen","frameborder"]),td:new Set(["colspan","rowspan"]),th:new Set(["colspan","rowspan","scope"])},m=/^https:\/\/(player\.vimeo\.com|www\.youtube\.com|youtube\.com|www\.youtube-nocookie\.com)\//i,b=new Set(["width","min-width","max-width","height","text-align","display","white-space","line-height","margin-left","padding-bottom","object-fit","color"]);function u(i){return String(i||"").replace(/&/g,"&").replace(/</g,"<").replace(/>/g,">").replace(/"/g,""").replace(/'/g,"'")}function y(i){return u(i)}function c(i,{allowIframe:r=!1}={}){const t=String(i||"").trim();if(!t)return"";const e=t.replace(/[\u0000-\u001F\u007F\s]+/g,"").toLowerCase();return e.startsWith("javascript:")||e.startsWith("vbscript:")||e.startsWith("data:")||e.startsWith("file:")?"":r?m.test(t)?t:"":t.startsWith("/")||t.startsWith("./")||t.startsWith("../")||t.startsWith("#")||t.startsWith("?")||/^(https?:)?\/\//i.test(t)?t:""}function A(i){return String(i||"").split(",").map(r=>{const t=String(r||"").trim();if(!t)return"";const[e,n]=t.split(/\s+/,2),o=c(e);return o?n?`${o} ${n}`:o:""}).filter(Boolean).join(", ")}function _(i){return String(i||"").split(";").map(r=>r.trim()).filter(Boolean).map(r=>{const t=r.indexOf(":");if(t===-1)return"";const e=r.slice(0,t).trim().toLowerCase(),n=r.slice(t+1).trim();return!b.has(e)||!n||/expression\s*\(|url\s*\(|javascript:|vbscript:|data:|behavior:|@import|[<>]/i.test(n)?"":`${e}:${n}`}).filter(Boolean).join("; ")}function W(i,r,t){return r==="href"||r==="src"?c(t,{allowIframe:i==="iframe"&&r==="src"}):i==="esp-web-install-button"&&r==="manifest"?c(t):r==="srcset"?A(t):r==="style"?_(t):r==="type"?["button","submit","reset"].includes(t)?t:"":r==="target"?["_blank","_self","_parent","_top"].includes(t)?t:"":r==="rel"?String(t||"").replace(/[^\w\s-]/g," ").trim():r==="loading"?["lazy","eager"].includes(t)?t:"":r==="decoding"?["async","sync","auto"].includes(t)?t:"":r==="allowfullscreen"?"":r==="allow"?String(t||"").split(/[;,]/).map(e=>e.trim()).filter(Boolean).filter(e=>/^[a-z0-9* -]+$/i.test(e)).join("; "):r==="width"||r==="height"||r==="colspan"||r==="rowspan"?/^\d{1,4}$/.test(String(t||"").trim())?String(t).trim():"":r==="scope"?["col","row","colgroup","rowgroup"].includes(t)?t:"":r==="frameborder"?["0","1"].includes(String(t||"").trim())?String(t).trim():"":r==="sizes"?String(t||"").trim().replace(/[<>]/g,""):r==="class"||r==="id"||r==="title"||r==="role"||r==="slot"||r.startsWith("aria-")||r.startsWith("data-")?String(t||"").trim():String(t||"")}function z(i,r=[]){const t=S[i]||new Set,e=[];let n=!1,o=!1;for(const l of r){const s=String((l==null?void 0:l.name)||"").toLowerCase();if(!s||s.startsWith("on")||!(w.has(s)||t.has(s)||s==="style"||s.startsWith("aria-")||s.startsWith("data-")))continue;const a=W(i,s,String((l==null?void 0:l.value)||"").trim());if(!(!a&&s!=="allowfullscreen")){if(i==="a"&&s==="target"&&a==="_blank"&&(n=!0),i==="a"&&s==="rel"&&(o=!0),s==="allowfullscreen"){e.push(" allowfullscreen");continue}e.push(` ${s}="${y(a)}"`)}}return i==="a"&&n&&!o&&e.push(' rel="noopener noreferrer"'),e.join("")}function f(i){if(!i)return"";if(i.nodeName==="#text")return u(i.value||"");if(i.nodeName==="#comment")return"";const r=String(i.tagName||"").toLowerCase();if(!r)return Array.isArray(i.childNodes)?i.childNodes.map(f).join(""):"";if(g.has(r))return"";const t=Array.isArray(i.childNodes)?i.childNodes.map(f).join(""):"";if(!d.has(r))return t;const e=z(r,i.attrs);return h.has(r)?`<${r}${e}>`:`<${r}${e}>${t}</${r}>`}function $(i){const r=String(i||"");if(!r)return"";const t=p(r);return Array.isArray(t.childNodes)?t.childNodes.map(f).join(""):""}export{u as e,$ as s};
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.