function e(t){function n(e){if(Object(e)!==e)return Promise.reject(TypeError(e+` is not an object.`));var t=e.done;return Promise.resolve(e.value).then(function(e){return{value:e,done:t}})}return e=function(e){this.s=e,this.n=e.next},e.prototype={s:null,n:null,next:function(){return n(this.n.apply(this.s,arguments))},return:function(e){var t=this.s.return;return t===void 0?Promise.resolve({value:e,done:!0}):n(t.apply(this.s,arguments))},throw:function(e){var t=this.s.return;return t===void 0?Promise.reject(e):n(t.apply(this.s,arguments))}},new e(t)}var t=async(n,r,i=n.name,a)=>{let o=[],s=[];var c,l=!1,u=!1;try{for(var d,f=function(t){var n,r,i,a=2;for(typeof Symbol<`u`&&(r=Symbol.asyncIterator,i=Symbol.iterator);a--;){if(r&&(n=t[r])!=null)return n.call(t);if(i&&(n=t[i])!=null)return new e(n.call(t));r=`@@asyncIterator`,i=`@@iterator`}throw TypeError(`Object is not async iterable`)}(n.values());l=!(d=await f.next()).done;l=!1){let e=d.value,c=`${i}/${e.name}`;e.kind===`file`?s.push(e.getFile().then(t=>(t.directoryHandle=n,t.handle=e,Object.defineProperty(t,"webkitRelativePath",{configurable:!0,enumerable:!0,get:()=>c})))):e.kind!==`directory`||!r||a&&a(e)||o.push(t(e,r,c,a))}}catch(e){u=!0,c=e}finally{try{l&&f.return!=null&&await f.return()}finally{if(u)throw c}}return[...(await Promise.all(o)).flat(),...await Promise.all(s)]},n=async(e={})=>(e.recursive=e.recursive||!1,t(await window.showDirectoryPicker({id:e.id,startIn:e.startIn}),e.recursive,void 0,e.skipDirectory));export{n as default};