"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const n=async e=>{const i=await e.getFile();return i.handle=e,i};var r=async(e=[{}])=>{Array.isArray(e)||(e=[e]);const i=[];e.forEach((t,a)=>{i[a]={description:t.description||"",accept:{}},t.mimeTypes?t.mimeTypes.map(l=>{i[a].accept[l]=t.extensions||[]}):i[a].accept["*/*"]=t.extensions||[]});const s=await window.showOpenFilePicker({id:e[0].id,startIn:e[0].startIn,types:i,multiple:e[0].multiple||!1,excludeAcceptAllOption:e[0].excludeAcceptAllOption||!1}),c=await Promise.all(s.map(n));return e[0].multiple?c:c[0]};exports.default=r;
