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