var t=async(a=[{}])=>(Array.isArray(a)||(a=[a]),new Promise((s,c)=>{const e=document.createElement("input");e.type="file";const p=[...a.map(i=>i.mimeTypes||[]),...a.map(i=>i.extensions||[])].join();e.multiple=a[0].multiple||!1,e.accept=p||"";const n=i=>{typeof l=="function"&&l(),s(i)},l=a[0].legacySetup&&a[0].legacySetup(n,()=>l(c),e);e.addEventListener("change",()=>{n(e.multiple?Array.from(e.files):e.files[0])}),e.click()}));export{t as default};
