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