Files
base/build/client/_app/immutable/chunks/D4nn9Y_6.js
T
eewing ec317eb17c
CI / build (push) Has been skipped
CI / deploy (push) Successful in 1m11s
INIT
2026-02-18 15:17:47 -06:00

2 lines
1.2 KiB
JavaScript

const y="modulepreload",P=function(f,a){return new URL(f,a).href},E={},g=function(a,u,d){let h=Promise.resolve();if(u&&u.length>0){let o=function(e){return Promise.all(e.map(r=>Promise.resolve(r).then(l=>({status:"fulfilled",value:l}),l=>({status:"rejected",reason:l}))))};const t=document.getElementsByTagName("link"),s=document.querySelector("meta[property=csp-nonce]"),v=(s==null?void 0:s.nonce)||(s==null?void 0:s.getAttribute("nonce"));h=o(u.map(e=>{if(e=P(e,d),e in E)return;E[e]=!0;const r=e.endsWith(".css"),l=r?'[rel="stylesheet"]':"";if(d)for(let i=t.length-1;i>=0;i--){const c=t[i];if(c.href===e&&(!r||c.rel==="stylesheet"))return}else if(document.querySelector(`link[href="${e}"]${l}`))return;const n=document.createElement("link");if(n.rel=r?"stylesheet":y,r||(n.as="script"),n.crossOrigin="",n.href=e,v&&n.setAttribute("nonce",v),document.head.appendChild(n),r)return new Promise((i,c)=>{n.addEventListener("load",i),n.addEventListener("error",()=>c(Error(`Unable to preload CSS for ${e}`)))})}))}function m(o){const t=new Event("vite:preloadError",{cancelable:!0});if(t.payload=o,window.dispatchEvent(t),!t.defaultPrevented)throw o}return h.then(o=>{for(const t of o||[])t.status==="rejected"&&m(t.reason);return a().catch(m)})};export{g as _};