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