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