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