function e(e,t){let n=e.createReader(),r=[];function i(){n.readEntries(e=>{let n=Array.prototype.slice.apply(e);r=r.concat(n),n.length?i():t(r)})}i()}var t=(t,n,r)=>{let i=(t,a)=>{t.path=a||``,t.isFile?t.file(e=>{r(e)&&(t.fullPath&&!e.webkitRelativePath&&(Object.defineProperties(e,{webkitRelativePath:{writable:!0}}),e.webkitRelativePath=t.fullPath.replace(/^\//,``),Object.defineProperties(e,{webkitRelativePath:{writable:!1}})),n([e]))}):t.isDirectory&&e(t,e=>{e.forEach(e=>{i(e,`${a}${t.name}/`)})})};t.forEach(e=>{i(e.webkitGetAsEntry())})};export{t as default};