@vue-office/docx
Version:
支持多种文件(**docx、excel、pdf、pptx**)预览的vue组件库,支持vue2/3。也支持非Vue框架的预览。
973 lines (970 loc) • 251 kB
JavaScript
var Re = Object.defineProperty, Me = Object.defineProperties;
var Te = Object.getOwnPropertyDescriptors;
var re = Object.getOwnPropertySymbols;
var Oe = Object.prototype.hasOwnProperty, Ie = Object.prototype.propertyIsEnumerable;
var ne = (i, e, t) => e in i ? Re(i, e, { enumerable: !0, configurable: !0, writable: !0, value: t }) : i[e] = t, vt = (i, e) => {
for (var t in e || (e = {}))
Oe.call(e, t) && ne(i, t, e[t]);
if (re)
for (var t of re(e))
Ie.call(e, t) && ne(i, t, e[t]);
return i;
}, Tt = (i, e) => Me(i, Te(e));
var _t = (i, e, t) => new Promise((r, n) => {
var a = (h) => {
try {
o(t.next(h));
} catch (g) {
n(g);
}
}, l = (h) => {
try {
o(t.throw(h));
} catch (g) {
n(g);
}
}, o = (h) => h.done ? r(h.value) : Promise.resolve(h.value).then(a, l);
o((t = t.apply(i, e)).next());
});
import { defineComponent as Fe, ref as De, onMounted as Le, watch as je } from "vue-demi";
typeof window.setImmediate == "undefined" && (window.setImmediate = function(i, ...e) {
setTimeout(() => i(e));
});
var jt = typeof globalThis != "undefined" ? globalThis : typeof window != "undefined" ? window : typeof global != "undefined" ? global : typeof self != "undefined" ? self : {};
function Ue(i) {
return i && i.__esModule && Object.prototype.hasOwnProperty.call(i, "default") ? i.default : i;
}
function Ut(i) {
throw new Error('Could not dynamically require "' + i + '". Please configure the dynamicRequireTargets or/and ignoreDynamicRequires option of @rollup/plugin-commonjs appropriately for this require call to work.');
}
var me = { exports: {} };
/*!
JSZip v3.10.1 - A JavaScript class for generating and reading zip files
<http://stuartk.com/jszip>
(c) 2009-2016 Stuart Knightley <stuart [at] stuartk.com>
Dual licenced under the MIT license or GPLv3. See https://raw.github.com/Stuk/jszip/main/LICENSE.markdown.
JSZip uses the library pako released under the MIT license :
https://github.com/nodeca/pako/blob/main/LICENSE
*/
(function(i, e) {
(function(t) {
i.exports = t();
})(function() {
return function t(r, n, a) {
function l(g, y) {
if (!n[g]) {
if (!r[g]) {
var w = typeof Ut == "function" && Ut;
if (!y && w)
return w(g, !0);
if (o)
return o(g, !0);
var k = new Error("Cannot find module '" + g + "'");
throw k.code = "MODULE_NOT_FOUND", k;
}
var d = n[g] = { exports: {} };
r[g][0].call(d.exports, function(v) {
var u = r[g][1][v];
return l(u || v);
}, d, d.exports, t, r, n, a);
}
return n[g].exports;
}
for (var o = typeof Ut == "function" && Ut, h = 0; h < a.length; h++)
l(a[h]);
return l;
}({ 1: [function(t, r, n) {
var a = t("./utils"), l = t("./support"), o = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=";
n.encode = function(h) {
for (var g, y, w, k, d, v, u, m = [], f = 0, _ = h.length, C = _, A = a.getTypeOf(h) !== "string"; f < h.length; )
C = _ - f, w = A ? (g = h[f++], y = f < _ ? h[f++] : 0, f < _ ? h[f++] : 0) : (g = h.charCodeAt(f++), y = f < _ ? h.charCodeAt(f++) : 0, f < _ ? h.charCodeAt(f++) : 0), k = g >> 2, d = (3 & g) << 4 | y >> 4, v = 1 < C ? (15 & y) << 2 | w >> 6 : 64, u = 2 < C ? 63 & w : 64, m.push(o.charAt(k) + o.charAt(d) + o.charAt(v) + o.charAt(u));
return m.join("");
}, n.decode = function(h) {
var g, y, w, k, d, v, u = 0, m = 0, f = "data:";
if (h.substr(0, f.length) === f)
throw new Error("Invalid base64 input, it looks like a data url.");
var _, C = 3 * (h = h.replace(/[^A-Za-z0-9+/=]/g, "")).length / 4;
if (h.charAt(h.length - 1) === o.charAt(64) && C--, h.charAt(h.length - 2) === o.charAt(64) && C--, C % 1 != 0)
throw new Error("Invalid base64 input, bad content length.");
for (_ = l.uint8array ? new Uint8Array(0 | C) : new Array(0 | C); u < h.length; )
g = o.indexOf(h.charAt(u++)) << 2 | (k = o.indexOf(h.charAt(u++))) >> 4, y = (15 & k) << 4 | (d = o.indexOf(h.charAt(u++))) >> 2, w = (3 & d) << 6 | (v = o.indexOf(h.charAt(u++))), _[m++] = g, d !== 64 && (_[m++] = y), v !== 64 && (_[m++] = w);
return _;
};
}, { "./support": 30, "./utils": 32 }], 2: [function(t, r, n) {
var a = t("./external"), l = t("./stream/DataWorker"), o = t("./stream/Crc32Probe"), h = t("./stream/DataLengthProbe");
function g(y, w, k, d, v) {
this.compressedSize = y, this.uncompressedSize = w, this.crc32 = k, this.compression = d, this.compressedContent = v;
}
g.prototype = { getContentWorker: function() {
var y = new l(a.Promise.resolve(this.compressedContent)).pipe(this.compression.uncompressWorker()).pipe(new h("data_length")), w = this;
return y.on("end", function() {
if (this.streamInfo.data_length !== w.uncompressedSize)
throw new Error("Bug : uncompressed data size mismatch");
}), y;
}, getCompressedWorker: function() {
return new l(a.Promise.resolve(this.compressedContent)).withStreamInfo("compressedSize", this.compressedSize).withStreamInfo("uncompressedSize", this.uncompressedSize).withStreamInfo("crc32", this.crc32).withStreamInfo("compression", this.compression);
} }, g.createWorkerFrom = function(y, w, k) {
return y.pipe(new o()).pipe(new h("uncompressedSize")).pipe(w.compressWorker(k)).pipe(new h("compressedSize")).withStreamInfo("compression", w);
}, r.exports = g;
}, { "./external": 6, "./stream/Crc32Probe": 25, "./stream/DataLengthProbe": 26, "./stream/DataWorker": 27 }], 3: [function(t, r, n) {
var a = t("./stream/GenericWorker");
n.STORE = { magic: "\0\0", compressWorker: function() {
return new a("STORE compression");
}, uncompressWorker: function() {
return new a("STORE decompression");
} }, n.DEFLATE = t("./flate");
}, { "./flate": 7, "./stream/GenericWorker": 28 }], 4: [function(t, r, n) {
var a = t("./utils"), l = function() {
for (var o, h = [], g = 0; g < 256; g++) {
o = g;
for (var y = 0; y < 8; y++)
o = 1 & o ? 3988292384 ^ o >>> 1 : o >>> 1;
h[g] = o;
}
return h;
}();
r.exports = function(o, h) {
return o !== void 0 && o.length ? a.getTypeOf(o) !== "string" ? function(g, y, w, k) {
var d = l, v = k + w;
g ^= -1;
for (var u = k; u < v; u++)
g = g >>> 8 ^ d[255 & (g ^ y[u])];
return -1 ^ g;
}(0 | h, o, o.length, 0) : function(g, y, w, k) {
var d = l, v = k + w;
g ^= -1;
for (var u = k; u < v; u++)
g = g >>> 8 ^ d[255 & (g ^ y.charCodeAt(u))];
return -1 ^ g;
}(0 | h, o, o.length, 0) : 0;
};
}, { "./utils": 32 }], 5: [function(t, r, n) {
n.base64 = !1, n.binary = !1, n.dir = !1, n.createFolders = !0, n.date = null, n.compression = null, n.compressionOptions = null, n.comment = null, n.unixPermissions = null, n.dosPermissions = null;
}, {}], 6: [function(t, r, n) {
var a = null;
a = typeof Promise != "undefined" ? Promise : t("lie"), r.exports = { Promise: a };
}, { lie: 37 }], 7: [function(t, r, n) {
var a = typeof Uint8Array != "undefined" && typeof Uint16Array != "undefined" && typeof Uint32Array != "undefined", l = t("pako"), o = t("./utils"), h = t("./stream/GenericWorker"), g = a ? "uint8array" : "array";
function y(w, k) {
h.call(this, "FlateWorker/" + w), this._pako = null, this._pakoAction = w, this._pakoOptions = k, this.meta = {};
}
n.magic = "\b\0", o.inherits(y, h), y.prototype.processChunk = function(w) {
this.meta = w.meta, this._pako === null && this._createPako(), this._pako.push(o.transformTo(g, w.data), !1);
}, y.prototype.flush = function() {
h.prototype.flush.call(this), this._pako === null && this._createPako(), this._pako.push([], !0);
}, y.prototype.cleanUp = function() {
h.prototype.cleanUp.call(this), this._pako = null;
}, y.prototype._createPako = function() {
this._pako = new l[this._pakoAction]({ raw: !0, level: this._pakoOptions.level || -1 });
var w = this;
this._pako.onData = function(k) {
w.push({ data: k, meta: w.meta });
};
}, n.compressWorker = function(w) {
return new y("Deflate", w);
}, n.uncompressWorker = function() {
return new y("Inflate", {});
};
}, { "./stream/GenericWorker": 28, "./utils": 32, pako: 38 }], 8: [function(t, r, n) {
function a(d, v) {
var u, m = "";
for (u = 0; u < v; u++)
m += String.fromCharCode(255 & d), d >>>= 8;
return m;
}
function l(d, v, u, m, f, _) {
var C, A, E = d.file, D = d.compression, O = _ !== g.utf8encode, W = o.transformTo("string", _(E.name)), T = o.transformTo("string", g.utf8encode(E.name)), X = E.comment, Q = o.transformTo("string", _(X)), S = o.transformTo("string", g.utf8encode(X)), I = T.length !== E.name.length, c = S.length !== X.length, L = "", et = "", $ = "", rt = E.dir, H = E.date, tt = { crc32: 0, compressedSize: 0, uncompressedSize: 0 };
v && !u || (tt.crc32 = d.crc32, tt.compressedSize = d.compressedSize, tt.uncompressedSize = d.uncompressedSize);
var R = 0;
v && (R |= 8), O || !I && !c || (R |= 2048);
var B = 0, J = 0;
rt && (B |= 16), f === "UNIX" ? (J = 798, B |= function(G, ut) {
var bt = G;
return G || (bt = ut ? 16893 : 33204), (65535 & bt) << 16;
}(E.unixPermissions, rt)) : (J = 20, B |= function(G) {
return 63 & (G || 0);
}(E.dosPermissions)), C = H.getUTCHours(), C <<= 6, C |= H.getUTCMinutes(), C <<= 5, C |= H.getUTCSeconds() / 2, A = H.getUTCFullYear() - 1980, A <<= 4, A |= H.getUTCMonth() + 1, A <<= 5, A |= H.getUTCDate(), I && (et = a(1, 1) + a(y(W), 4) + T, L += "up" + a(et.length, 2) + et), c && ($ = a(1, 1) + a(y(Q), 4) + S, L += "uc" + a($.length, 2) + $);
var q = "";
return q += `
\0`, q += a(R, 2), q += D.magic, q += a(C, 2), q += a(A, 2), q += a(tt.crc32, 4), q += a(tt.compressedSize, 4), q += a(tt.uncompressedSize, 4), q += a(W.length, 2), q += a(L.length, 2), { fileRecord: w.LOCAL_FILE_HEADER + q + W + L, dirRecord: w.CENTRAL_FILE_HEADER + a(J, 2) + q + a(Q.length, 2) + "\0\0\0\0" + a(B, 4) + a(m, 4) + W + L + Q };
}
var o = t("../utils"), h = t("../stream/GenericWorker"), g = t("../utf8"), y = t("../crc32"), w = t("../signature");
function k(d, v, u, m) {
h.call(this, "ZipFileWorker"), this.bytesWritten = 0, this.zipComment = v, this.zipPlatform = u, this.encodeFileName = m, this.streamFiles = d, this.accumulate = !1, this.contentBuffer = [], this.dirRecords = [], this.currentSourceOffset = 0, this.entriesCount = 0, this.currentFile = null, this._sources = [];
}
o.inherits(k, h), k.prototype.push = function(d) {
var v = d.meta.percent || 0, u = this.entriesCount, m = this._sources.length;
this.accumulate ? this.contentBuffer.push(d) : (this.bytesWritten += d.data.length, h.prototype.push.call(this, { data: d.data, meta: { currentFile: this.currentFile, percent: u ? (v + 100 * (u - m - 1)) / u : 100 } }));
}, k.prototype.openedSource = function(d) {
this.currentSourceOffset = this.bytesWritten, this.currentFile = d.file.name;
var v = this.streamFiles && !d.file.dir;
if (v) {
var u = l(d, v, !1, this.currentSourceOffset, this.zipPlatform, this.encodeFileName);
this.push({ data: u.fileRecord, meta: { percent: 0 } });
} else
this.accumulate = !0;
}, k.prototype.closedSource = function(d) {
this.accumulate = !1;
var v = this.streamFiles && !d.file.dir, u = l(d, v, !0, this.currentSourceOffset, this.zipPlatform, this.encodeFileName);
if (this.dirRecords.push(u.dirRecord), v)
this.push({ data: function(m) {
return w.DATA_DESCRIPTOR + a(m.crc32, 4) + a(m.compressedSize, 4) + a(m.uncompressedSize, 4);
}(d), meta: { percent: 100 } });
else
for (this.push({ data: u.fileRecord, meta: { percent: 0 } }); this.contentBuffer.length; )
this.push(this.contentBuffer.shift());
this.currentFile = null;
}, k.prototype.flush = function() {
for (var d = this.bytesWritten, v = 0; v < this.dirRecords.length; v++)
this.push({ data: this.dirRecords[v], meta: { percent: 100 } });
var u = this.bytesWritten - d, m = function(f, _, C, A, E) {
var D = o.transformTo("string", E(A));
return w.CENTRAL_DIRECTORY_END + "\0\0\0\0" + a(f, 2) + a(f, 2) + a(_, 4) + a(C, 4) + a(D.length, 2) + D;
}(this.dirRecords.length, u, d, this.zipComment, this.encodeFileName);
this.push({ data: m, meta: { percent: 100 } });
}, k.prototype.prepareNextSource = function() {
this.previous = this._sources.shift(), this.openedSource(this.previous.streamInfo), this.isPaused ? this.previous.pause() : this.previous.resume();
}, k.prototype.registerPrevious = function(d) {
this._sources.push(d);
var v = this;
return d.on("data", function(u) {
v.processChunk(u);
}), d.on("end", function() {
v.closedSource(v.previous.streamInfo), v._sources.length ? v.prepareNextSource() : v.end();
}), d.on("error", function(u) {
v.error(u);
}), this;
}, k.prototype.resume = function() {
return !!h.prototype.resume.call(this) && (!this.previous && this._sources.length ? (this.prepareNextSource(), !0) : this.previous || this._sources.length || this.generatedError ? void 0 : (this.end(), !0));
}, k.prototype.error = function(d) {
var v = this._sources;
if (!h.prototype.error.call(this, d))
return !1;
for (var u = 0; u < v.length; u++)
try {
v[u].error(d);
} catch (m) {
}
return !0;
}, k.prototype.lock = function() {
h.prototype.lock.call(this);
for (var d = this._sources, v = 0; v < d.length; v++)
d[v].lock();
}, r.exports = k;
}, { "../crc32": 4, "../signature": 23, "../stream/GenericWorker": 28, "../utf8": 31, "../utils": 32 }], 9: [function(t, r, n) {
var a = t("../compressions"), l = t("./ZipFileWorker");
n.generateWorker = function(o, h, g) {
var y = new l(h.streamFiles, g, h.platform, h.encodeFileName), w = 0;
try {
o.forEach(function(k, d) {
w++;
var v = function(_, C) {
var A = _ || C, E = a[A];
if (!E)
throw new Error(A + " is not a valid compression method !");
return E;
}(d.options.compression, h.compression), u = d.options.compressionOptions || h.compressionOptions || {}, m = d.dir, f = d.date;
d._compressWorker(v, u).withStreamInfo("file", { name: k, dir: m, date: f, comment: d.comment || "", unixPermissions: d.unixPermissions, dosPermissions: d.dosPermissions }).pipe(y);
}), y.entriesCount = w;
} catch (k) {
y.error(k);
}
return y;
};
}, { "../compressions": 3, "./ZipFileWorker": 8 }], 10: [function(t, r, n) {
function a() {
if (!(this instanceof a))
return new a();
if (arguments.length)
throw new Error("The constructor with parameters has been removed in JSZip 3.0, please check the upgrade guide.");
this.files = /* @__PURE__ */ Object.create(null), this.comment = null, this.root = "", this.clone = function() {
var l = new a();
for (var o in this)
typeof this[o] != "function" && (l[o] = this[o]);
return l;
};
}
(a.prototype = t("./object")).loadAsync = t("./load"), a.support = t("./support"), a.defaults = t("./defaults"), a.version = "3.10.1", a.loadAsync = function(l, o) {
return new a().loadAsync(l, o);
}, a.external = t("./external"), r.exports = a;
}, { "./defaults": 5, "./external": 6, "./load": 11, "./object": 15, "./support": 30 }], 11: [function(t, r, n) {
var a = t("./utils"), l = t("./external"), o = t("./utf8"), h = t("./zipEntries"), g = t("./stream/Crc32Probe"), y = t("./nodejsUtils");
function w(k) {
return new l.Promise(function(d, v) {
var u = k.decompressed.getContentWorker().pipe(new g());
u.on("error", function(m) {
v(m);
}).on("end", function() {
u.streamInfo.crc32 !== k.decompressed.crc32 ? v(new Error("Corrupted zip : CRC32 mismatch")) : d();
}).resume();
});
}
r.exports = function(k, d) {
var v = this;
return d = a.extend(d || {}, { base64: !1, checkCRC32: !1, optimizedBinaryString: !1, createFolders: !1, decodeFileName: o.utf8decode }), y.isNode && y.isStream(k) ? l.Promise.reject(new Error("JSZip can't accept a stream when loading a zip file.")) : a.prepareContent("the loaded zip file", k, !0, d.optimizedBinaryString, d.base64).then(function(u) {
var m = new h(d);
return m.load(u), m;
}).then(function(u) {
var m = [l.Promise.resolve(u)], f = u.files;
if (d.checkCRC32)
for (var _ = 0; _ < f.length; _++)
m.push(w(f[_]));
return l.Promise.all(m);
}).then(function(u) {
for (var m = u.shift(), f = m.files, _ = 0; _ < f.length; _++) {
var C = f[_], A = C.fileNameStr, E = a.resolve(C.fileNameStr);
v.file(E, C.decompressed, { binary: !0, optimizedBinaryString: !0, date: C.date, dir: C.dir, comment: C.fileCommentStr.length ? C.fileCommentStr : null, unixPermissions: C.unixPermissions, dosPermissions: C.dosPermissions, createFolders: d.createFolders }), C.dir || (v.file(E).unsafeOriginalName = A);
}
return m.zipComment.length && (v.comment = m.zipComment), v;
});
};
}, { "./external": 6, "./nodejsUtils": 14, "./stream/Crc32Probe": 25, "./utf8": 31, "./utils": 32, "./zipEntries": 33 }], 12: [function(t, r, n) {
var a = t("../utils"), l = t("../stream/GenericWorker");
function o(h, g) {
l.call(this, "Nodejs stream input adapter for " + h), this._upstreamEnded = !1, this._bindStream(g);
}
a.inherits(o, l), o.prototype._bindStream = function(h) {
var g = this;
(this._stream = h).pause(), h.on("data", function(y) {
g.push({ data: y, meta: { percent: 0 } });
}).on("error", function(y) {
g.isPaused ? this.generatedError = y : g.error(y);
}).on("end", function() {
g.isPaused ? g._upstreamEnded = !0 : g.end();
});
}, o.prototype.pause = function() {
return !!l.prototype.pause.call(this) && (this._stream.pause(), !0);
}, o.prototype.resume = function() {
return !!l.prototype.resume.call(this) && (this._upstreamEnded ? this.end() : this._stream.resume(), !0);
}, r.exports = o;
}, { "../stream/GenericWorker": 28, "../utils": 32 }], 13: [function(t, r, n) {
var a = t("readable-stream").Readable;
function l(o, h, g) {
a.call(this, h), this._helper = o;
var y = this;
o.on("data", function(w, k) {
y.push(w) || y._helper.pause(), g && g(k);
}).on("error", function(w) {
y.emit("error", w);
}).on("end", function() {
y.push(null);
});
}
t("../utils").inherits(l, a), l.prototype._read = function() {
this._helper.resume();
}, r.exports = l;
}, { "../utils": 32, "readable-stream": 16 }], 14: [function(t, r, n) {
r.exports = { isNode: typeof Buffer != "undefined", newBufferFrom: function(a, l) {
if (Buffer.from && Buffer.from !== Uint8Array.from)
return Buffer.from(a, l);
if (typeof a == "number")
throw new Error('The "data" argument must not be a number');
return new Buffer(a, l);
}, allocBuffer: function(a) {
if (Buffer.alloc)
return Buffer.alloc(a);
var l = new Buffer(a);
return l.fill(0), l;
}, isBuffer: function(a) {
return Buffer.isBuffer(a);
}, isStream: function(a) {
return a && typeof a.on == "function" && typeof a.pause == "function" && typeof a.resume == "function";
} };
}, {}], 15: [function(t, r, n) {
function a(E, D, O) {
var W, T = o.getTypeOf(D), X = o.extend(O || {}, y);
X.date = X.date || /* @__PURE__ */ new Date(), X.compression !== null && (X.compression = X.compression.toUpperCase()), typeof X.unixPermissions == "string" && (X.unixPermissions = parseInt(X.unixPermissions, 8)), X.unixPermissions && 16384 & X.unixPermissions && (X.dir = !0), X.dosPermissions && 16 & X.dosPermissions && (X.dir = !0), X.dir && (E = f(E)), X.createFolders && (W = m(E)) && _.call(this, W, !0);
var Q = T === "string" && X.binary === !1 && X.base64 === !1;
O && O.binary !== void 0 || (X.binary = !Q), (D instanceof w && D.uncompressedSize === 0 || X.dir || !D || D.length === 0) && (X.base64 = !1, X.binary = !0, D = "", X.compression = "STORE", T = "string");
var S = null;
S = D instanceof w || D instanceof h ? D : v.isNode && v.isStream(D) ? new u(E, D) : o.prepareContent(E, D, X.binary, X.optimizedBinaryString, X.base64);
var I = new k(E, S, X);
this.files[E] = I;
}
var l = t("./utf8"), o = t("./utils"), h = t("./stream/GenericWorker"), g = t("./stream/StreamHelper"), y = t("./defaults"), w = t("./compressedObject"), k = t("./zipObject"), d = t("./generate"), v = t("./nodejsUtils"), u = t("./nodejs/NodejsStreamInputAdapter"), m = function(E) {
E.slice(-1) === "/" && (E = E.substring(0, E.length - 1));
var D = E.lastIndexOf("/");
return 0 < D ? E.substring(0, D) : "";
}, f = function(E) {
return E.slice(-1) !== "/" && (E += "/"), E;
}, _ = function(E, D) {
return D = D !== void 0 ? D : y.createFolders, E = f(E), this.files[E] || a.call(this, E, null, { dir: !0, createFolders: D }), this.files[E];
};
function C(E) {
return Object.prototype.toString.call(E) === "[object RegExp]";
}
var A = { load: function() {
throw new Error("This method has been removed in JSZip 3.0, please check the upgrade guide.");
}, forEach: function(E) {
var D, O, W;
for (D in this.files)
W = this.files[D], (O = D.slice(this.root.length, D.length)) && D.slice(0, this.root.length) === this.root && E(O, W);
}, filter: function(E) {
var D = [];
return this.forEach(function(O, W) {
E(O, W) && D.push(W);
}), D;
}, file: function(E, D, O) {
if (arguments.length !== 1)
return E = this.root + E, a.call(this, E, D, O), this;
if (C(E)) {
var W = E;
return this.filter(function(X, Q) {
return !Q.dir && W.test(X);
});
}
var T = this.files[this.root + E];
return T && !T.dir ? T : null;
}, folder: function(E) {
if (!E)
return this;
if (C(E))
return this.filter(function(T, X) {
return X.dir && E.test(T);
});
var D = this.root + E, O = _.call(this, D), W = this.clone();
return W.root = O.name, W;
}, remove: function(E) {
E = this.root + E;
var D = this.files[E];
if (D || (E.slice(-1) !== "/" && (E += "/"), D = this.files[E]), D && !D.dir)
delete this.files[E];
else
for (var O = this.filter(function(T, X) {
return X.name.slice(0, E.length) === E;
}), W = 0; W < O.length; W++)
delete this.files[O[W].name];
return this;
}, generate: function() {
throw new Error("This method has been removed in JSZip 3.0, please check the upgrade guide.");
}, generateInternalStream: function(E) {
var D, O = {};
try {
if ((O = o.extend(E || {}, { streamFiles: !1, compression: "STORE", compressionOptions: null, type: "", platform: "DOS", comment: null, mimeType: "application/zip", encodeFileName: l.utf8encode })).type = O.type.toLowerCase(), O.compression = O.compression.toUpperCase(), O.type === "binarystring" && (O.type = "string"), !O.type)
throw new Error("No output type specified.");
o.checkSupport(O.type), O.platform !== "darwin" && O.platform !== "freebsd" && O.platform !== "linux" && O.platform !== "sunos" || (O.platform = "UNIX"), O.platform === "win32" && (O.platform = "DOS");
var W = O.comment || this.comment || "";
D = d.generateWorker(this, O, W);
} catch (T) {
(D = new h("error")).error(T);
}
return new g(D, O.type || "string", O.mimeType);
}, generateAsync: function(E, D) {
return this.generateInternalStream(E).accumulate(D);
}, generateNodeStream: function(E, D) {
return (E = E || {}).type || (E.type = "nodebuffer"), this.generateInternalStream(E).toNodejsStream(D);
} };
r.exports = A;
}, { "./compressedObject": 2, "./defaults": 5, "./generate": 9, "./nodejs/NodejsStreamInputAdapter": 12, "./nodejsUtils": 14, "./stream/GenericWorker": 28, "./stream/StreamHelper": 29, "./utf8": 31, "./utils": 32, "./zipObject": 35 }], 16: [function(t, r, n) {
r.exports = t("stream");
}, { stream: void 0 }], 17: [function(t, r, n) {
var a = t("./DataReader");
function l(o) {
a.call(this, o);
for (var h = 0; h < this.data.length; h++)
o[h] = 255 & o[h];
}
t("../utils").inherits(l, a), l.prototype.byteAt = function(o) {
return this.data[this.zero + o];
}, l.prototype.lastIndexOfSignature = function(o) {
for (var h = o.charCodeAt(0), g = o.charCodeAt(1), y = o.charCodeAt(2), w = o.charCodeAt(3), k = this.length - 4; 0 <= k; --k)
if (this.data[k] === h && this.data[k + 1] === g && this.data[k + 2] === y && this.data[k + 3] === w)
return k - this.zero;
return -1;
}, l.prototype.readAndCheckSignature = function(o) {
var h = o.charCodeAt(0), g = o.charCodeAt(1), y = o.charCodeAt(2), w = o.charCodeAt(3), k = this.readData(4);
return h === k[0] && g === k[1] && y === k[2] && w === k[3];
}, l.prototype.readData = function(o) {
if (this.checkOffset(o), o === 0)
return [];
var h = this.data.slice(this.zero + this.index, this.zero + this.index + o);
return this.index += o, h;
}, r.exports = l;
}, { "../utils": 32, "./DataReader": 18 }], 18: [function(t, r, n) {
var a = t("../utils");
function l(o) {
this.data = o, this.length = o.length, this.index = 0, this.zero = 0;
}
l.prototype = { checkOffset: function(o) {
this.checkIndex(this.index + o);
}, checkIndex: function(o) {
if (this.length < this.zero + o || o < 0)
throw new Error("End of data reached (data length = " + this.length + ", asked index = " + o + "). Corrupted zip ?");
}, setIndex: function(o) {
this.checkIndex(o), this.index = o;
}, skip: function(o) {
this.setIndex(this.index + o);
}, byteAt: function() {
}, readInt: function(o) {
var h, g = 0;
for (this.checkOffset(o), h = this.index + o - 1; h >= this.index; h--)
g = (g << 8) + this.byteAt(h);
return this.index += o, g;
}, readString: function(o) {
return a.transformTo("string", this.readData(o));
}, readData: function() {
}, lastIndexOfSignature: function() {
}, readAndCheckSignature: function() {
}, readDate: function() {
var o = this.readInt(4);
return new Date(Date.UTC(1980 + (o >> 25 & 127), (o >> 21 & 15) - 1, o >> 16 & 31, o >> 11 & 31, o >> 5 & 63, (31 & o) << 1));
} }, r.exports = l;
}, { "../utils": 32 }], 19: [function(t, r, n) {
var a = t("./Uint8ArrayReader");
function l(o) {
a.call(this, o);
}
t("../utils").inherits(l, a), l.prototype.readData = function(o) {
this.checkOffset(o);
var h = this.data.slice(this.zero + this.index, this.zero + this.index + o);
return this.index += o, h;
}, r.exports = l;
}, { "../utils": 32, "./Uint8ArrayReader": 21 }], 20: [function(t, r, n) {
var a = t("./DataReader");
function l(o) {
a.call(this, o);
}
t("../utils").inherits(l, a), l.prototype.byteAt = function(o) {
return this.data.charCodeAt(this.zero + o);
}, l.prototype.lastIndexOfSignature = function(o) {
return this.data.lastIndexOf(o) - this.zero;
}, l.prototype.readAndCheckSignature = function(o) {
return o === this.readData(4);
}, l.prototype.readData = function(o) {
this.checkOffset(o);
var h = this.data.slice(this.zero + this.index, this.zero + this.index + o);
return this.index += o, h;
}, r.exports = l;
}, { "../utils": 32, "./DataReader": 18 }], 21: [function(t, r, n) {
var a = t("./ArrayReader");
function l(o) {
a.call(this, o);
}
t("../utils").inherits(l, a), l.prototype.readData = function(o) {
if (this.checkOffset(o), o === 0)
return new Uint8Array(0);
var h = this.data.subarray(this.zero + this.index, this.zero + this.index + o);
return this.index += o, h;
}, r.exports = l;
}, { "../utils": 32, "./ArrayReader": 17 }], 22: [function(t, r, n) {
var a = t("../utils"), l = t("../support"), o = t("./ArrayReader"), h = t("./StringReader"), g = t("./NodeBufferReader"), y = t("./Uint8ArrayReader");
r.exports = function(w) {
var k = a.getTypeOf(w);
return a.checkSupport(k), k !== "string" || l.uint8array ? k === "nodebuffer" ? new g(w) : l.uint8array ? new y(a.transformTo("uint8array", w)) : new o(a.transformTo("array", w)) : new h(w);
};
}, { "../support": 30, "../utils": 32, "./ArrayReader": 17, "./NodeBufferReader": 19, "./StringReader": 20, "./Uint8ArrayReader": 21 }], 23: [function(t, r, n) {
n.LOCAL_FILE_HEADER = "PK", n.CENTRAL_FILE_HEADER = "PK", n.CENTRAL_DIRECTORY_END = "PK", n.ZIP64_CENTRAL_DIRECTORY_LOCATOR = "PK\x07", n.ZIP64_CENTRAL_DIRECTORY_END = "PK", n.DATA_DESCRIPTOR = "PK\x07\b";
}, {}], 24: [function(t, r, n) {
var a = t("./GenericWorker"), l = t("../utils");
function o(h) {
a.call(this, "ConvertWorker to " + h), this.destType = h;
}
l.inherits(o, a), o.prototype.processChunk = function(h) {
this.push({ data: l.transformTo(this.destType, h.data), meta: h.meta });
}, r.exports = o;
}, { "../utils": 32, "./GenericWorker": 28 }], 25: [function(t, r, n) {
var a = t("./GenericWorker"), l = t("../crc32");
function o() {
a.call(this, "Crc32Probe"), this.withStreamInfo("crc32", 0);
}
t("../utils").inherits(o, a), o.prototype.processChunk = function(h) {
this.streamInfo.crc32 = l(h.data, this.streamInfo.crc32 || 0), this.push(h);
}, r.exports = o;
}, { "../crc32": 4, "../utils": 32, "./GenericWorker": 28 }], 26: [function(t, r, n) {
var a = t("../utils"), l = t("./GenericWorker");
function o(h) {
l.call(this, "DataLengthProbe for " + h), this.propName = h, this.withStreamInfo(h, 0);
}
a.inherits(o, l), o.prototype.processChunk = function(h) {
if (h) {
var g = this.streamInfo[this.propName] || 0;
this.streamInfo[this.propName] = g + h.data.length;
}
l.prototype.processChunk.call(this, h);
}, r.exports = o;
}, { "../utils": 32, "./GenericWorker": 28 }], 27: [function(t, r, n) {
var a = t("../utils"), l = t("./GenericWorker");
function o(h) {
l.call(this, "DataWorker");
var g = this;
this.dataIsReady = !1, this.index = 0, this.max = 0, this.data = null, this.type = "", this._tickScheduled = !1, h.then(function(y) {
g.dataIsReady = !0, g.data = y, g.max = y && y.length || 0, g.type = a.getTypeOf(y), g.isPaused || g._tickAndRepeat();
}, function(y) {
g.error(y);
});
}
a.inherits(o, l), o.prototype.cleanUp = function() {
l.prototype.cleanUp.call(this), this.data = null;
}, o.prototype.resume = function() {
return !!l.prototype.resume.call(this) && (!this._tickScheduled && this.dataIsReady && (this._tickScheduled = !0, a.delay(this._tickAndRepeat, [], this)), !0);
}, o.prototype._tickAndRepeat = function() {
this._tickScheduled = !1, this.isPaused || this.isFinished || (this._tick(), this.isFinished || (a.delay(this._tickAndRepeat, [], this), this._tickScheduled = !0));
}, o.prototype._tick = function() {
if (this.isPaused || this.isFinished)
return !1;
var h = null, g = Math.min(this.max, this.index + 16384);
if (this.index >= this.max)
return this.end();
switch (this.type) {
case "string":
h = this.data.substring(this.index, g);
break;
case "uint8array":
h = this.data.subarray(this.index, g);
break;
case "array":
case "nodebuffer":
h = this.data.slice(this.index, g);
}
return this.index = g, this.push({ data: h, meta: { percent: this.max ? this.index / this.max * 100 : 0 } });
}, r.exports = o;
}, { "../utils": 32, "./GenericWorker": 28 }], 28: [function(t, r, n) {
function a(l) {
this.name = l || "default", this.streamInfo = {}, this.generatedError = null, this.extraStreamInfo = {}, this.isPaused = !0, this.isFinished = !1, this.isLocked = !1, this._listeners = { data: [], end: [], error: [] }, this.previous = null;
}
a.prototype = { push: function(l) {
this.emit("data", l);
}, end: function() {
if (this.isFinished)
return !1;
this.flush();
try {
this.emit("end"), this.cleanUp(), this.isFinished = !0;
} catch (l) {
this.emit("error", l);
}
return !0;
}, error: function(l) {
return !this.isFinished && (this.isPaused ? this.generatedError = l : (this.isFinished = !0, this.emit("error", l), this.previous && this.previous.error(l), this.cleanUp()), !0);
}, on: function(l, o) {
return this._listeners[l].push(o), this;
}, cleanUp: function() {
this.streamInfo = this.generatedError = this.extraStreamInfo = null, this._listeners = [];
}, emit: function(l, o) {
if (this._listeners[l])
for (var h = 0; h < this._listeners[l].length; h++)
this._listeners[l][h].call(this, o);
}, pipe: function(l) {
return l.registerPrevious(this);
}, registerPrevious: function(l) {
if (this.isLocked)
throw new Error("The stream '" + this + "' has already been used.");
this.streamInfo = l.streamInfo, this.mergeStreamInfo(), this.previous = l;
var o = this;
return l.on("data", function(h) {
o.processChunk(h);
}), l.on("end", function() {
o.end();
}), l.on("error", function(h) {
o.error(h);
}), this;
}, pause: function() {
return !this.isPaused && !this.isFinished && (this.isPaused = !0, this.previous && this.previous.pause(), !0);
}, resume: function() {
if (!this.isPaused || this.isFinished)
return !1;
var l = this.isPaused = !1;
return this.generatedError && (this.error(this.generatedError), l = !0), this.previous && this.previous.resume(), !l;
}, flush: function() {
}, processChunk: function(l) {
this.push(l);
}, withStreamInfo: function(l, o) {
return this.extraStreamInfo[l] = o, this.mergeStreamInfo(), this;
}, mergeStreamInfo: function() {
for (var l in this.extraStreamInfo)
Object.prototype.hasOwnProperty.call(this.extraStreamInfo, l) && (this.streamInfo[l] = this.extraStreamInfo[l]);
}, lock: function() {
if (this.isLocked)
throw new Error("The stream '" + this + "' has already been used.");
this.isLocked = !0, this.previous && this.previous.lock();
}, toString: function() {
var l = "Worker " + this.name;
return this.previous ? this.previous + " -> " + l : l;
} }, r.exports = a;
}, {}], 29: [function(t, r, n) {
var a = t("../utils"), l = t("./ConvertWorker"), o = t("./GenericWorker"), h = t("../base64"), g = t("../support"), y = t("../external"), w = null;
if (g.nodestream)
try {
w = t("../nodejs/NodejsStreamOutputAdapter");
} catch (v) {
}
function k(v, u) {
return new y.Promise(function(m, f) {
var _ = [], C = v._internalType, A = v._outputType, E = v._mimeType;
v.on("data", function(D, O) {
_.push(D), u && u(O);
}).on("error", function(D) {
_ = [], f(D);
}).on("end", function() {
try {
var D = function(O, W, T) {
switch (O) {
case "blob":
return a.newBlob(a.transformTo("arraybuffer", W), T);
case "base64":
return h.encode(W);
default:
return a.transformTo(O, W);
}
}(A, function(O, W) {
var T, X = 0, Q = null, S = 0;
for (T = 0; T < W.length; T++)
S += W[T].length;
switch (O) {
case "string":
return W.join("");
case "array":
return Array.prototype.concat.apply([], W);
case "uint8array":
for (Q = new Uint8Array(S), T = 0; T < W.length; T++)
Q.set(W[T], X), X += W[T].length;
return Q;
case "nodebuffer":
return Buffer.concat(W);
default:
throw new Error("concat : unsupported type '" + O + "'");
}
}(C, _), E);
m(D);
} catch (O) {
f(O);
}
_ = [];
}).resume();
});
}
function d(v, u, m) {
var f = u;
switch (u) {
case "blob":
case "arraybuffer":
f = "uint8array";
break;
case "base64":
f = "string";
}
try {
this._internalType = f, this._outputType = u, this._mimeType = m, a.checkSupport(f), this._worker = v.pipe(new l(f)), v.lock();
} catch (_) {
this._worker = new o("error"), this._worker.error(_);
}
}
d.prototype = { accumulate: function(v) {
return k(this, v);
}, on: function(v, u) {
var m = this;
return v === "data" ? this._worker.on(v, function(f) {
u.call(m, f.data, f.meta);
}) : this._worker.on(v, function() {
a.delay(u, arguments, m);
}), this;
}, resume: function() {
return a.delay(this._worker.resume, [], this._worker), this;
}, pause: function() {
return this._worker.pause(), this;
}, toNodejsStream: function(v) {
if (a.checkSupport("nodestream"), this._outputType !== "nodebuffer")
throw new Error(this._outputType + " is not supported by this method");
return new w(this, { objectMode: this._outputType !== "nodebuffer" }, v);
} }, r.exports = d;
}, { "../base64": 1, "../external": 6, "../nodejs/NodejsStreamOutputAdapter": 13, "../support": 30, "../utils": 32, "./ConvertWorker": 24, "./GenericWorker": 28 }], 30: [function(t, r, n) {
if (n.base64 = !0, n.array = !0, n.string = !0, n.arraybuffer = typeof ArrayBuffer != "undefined" && typeof Uint8Array != "undefined", n.nodebuffer = typeof Buffer != "undefined", n.uint8array = typeof Uint8Array != "undefined", typeof ArrayBuffer == "undefined")
n.blob = !1;
else {
var a = new ArrayBuffer(0);
try {
n.blob = new Blob([a], { type: "application/zip" }).size === 0;
} catch (o) {
try {
var l = new (self.BlobBuilder || self.WebKitBlobBuilder || self.MozBlobBuilder || self.MSBlobBuilder)();
l.append(a), n.blob = l.getBlob("application/zip").size === 0;
} catch (h) {
n.blob = !1;
}
}
}
try {
n.nodestream = !!t("readable-stream").Readable;
} catch (o) {
n.nodestream = !1;
}
}, { "readable-stream": 16 }], 31: [function(t, r, n) {
for (var a = t("./utils"), l = t("./support"), o = t("./nodejsUtils"), h = t("./stream/GenericWorker"), g = new Array(256), y = 0; y < 256; y++)
g[y] = 252 <= y ? 6 : 248 <= y ? 5 : 240 <= y ? 4 : 224 <= y ? 3 : 192 <= y ? 2 : 1;
g[254] = g[254] = 1;
function w() {
h.call(this, "utf-8 decode"), this.leftOver = null;
}
function k() {
h.call(this, "utf-8 encode");
}
n.utf8encode = function(d) {
return l.nodebuffer ? o.newBufferFrom(d, "utf-8") : function(v) {
var u, m, f, _, C, A = v.length, E = 0;
for (_ = 0; _ < A; _++)
(64512 & (m = v.charCodeAt(_))) == 55296 && _ + 1 < A && (64512 & (f = v.charCodeAt(_ + 1))) == 56320 && (m = 65536 + (m - 55296 << 10) + (f - 56320), _++), E += m < 128 ? 1 : m < 2048 ? 2 : m < 65536 ? 3 : 4;
for (u = l.uint8array ? new Uint8Array(E) : new Array(E), _ = C = 0; C < E; _++)
(64512 & (m = v.charCodeAt(_))) == 55296 && _ + 1 < A && (64512 & (f = v.charCodeAt(_ + 1))) == 56320 && (m = 65536 + (m - 55296 << 10) + (f - 56320), _++), m < 128 ? u[C++] = m : (m < 2048 ? u[C++] = 192 | m >>> 6 : (m < 65536 ? u[C++] = 224 | m >>> 12 : (u[C++] = 240 | m >>> 18, u[C++] = 128 | m >>> 12 & 63), u[C++] = 128 | m >>> 6 & 63), u[C++] = 128 | 63 & m);
return u;
}(d);
}, n.utf8decode = function(d) {
return l.nodebuffer ? a.transformTo("nodebuffer", d).toString("utf-8") : function(v) {
var u, m, f, _, C = v.length, A = new Array(2 * C);
for (u = m = 0; u < C; )
if ((f = v[u++]) < 128)
A[m++] = f;
else if (4 < (_ = g[f]))
A[m++] = 65533, u += _ - 1;
else {
for (f &= _ === 2 ? 31 : _ === 3 ? 15 : 7; 1 < _ && u < C; )
f = f << 6 | 63 & v[u++], _--;
1 < _ ? A[m++] = 65533 : f < 65536 ? A[m++] = f : (f -= 65536, A[m++] = 55296 | f >> 10 & 1023, A[m++] = 56320 | 1023 & f);
}
return A.length !== m && (A.subarray ? A = A.subarray(0, m) : A.length = m), a.applyFromCharCode(A);
}(d = a.transformTo(l.uint8array ? "uint8array" : "array", d));
}, a.inherits(w, h), w.prototype.processChunk = function(d) {
var v = a.transformTo(l.uint8array ? "uint8array" : "array", d.data);
if (this.leftOver && this.leftOver.length) {
if (l.uint8array) {
var u = v;
(v = new Uint8Array(u.length + this.leftOver.length)).set(this.leftOver, 0), v.set(u, this.leftOver.length);
} else
v = this.leftOver.concat(v);
this.leftOver = null;
}
var m = function(_, C) {
var A;
for ((C = C || _.length) > _.length && (C = _.length), A = C - 1; 0 <= A && (192 & _[A]) == 128; )
A--;
return A < 0 || A === 0 ? C : A + g[_[A]] > C ? A : C;
}(v), f = v;
m !== v.length && (l.uint8array ? (f = v.subarray(0, m), this.leftOver = v.subarray(m, v.length)) : (f = v.slice(0, m), this.leftOver = v.slice(m, v.length))), this.push({ data: n.utf8decode(f), meta: d.meta });
}, w.prototype.flush = function() {
this.leftOver && this.leftOver.length && (this.push({ data: n.utf8decode(this.leftOver), meta: {} }), this.leftOver = null);
}, n.Utf8DecodeWorker = w, a.inherits(k, h), k.prototype.processChunk = function(d) {
this.push({ data: n.utf8encode(d.data), meta: d.meta });
}, n.Utf8EncodeWorker = k;
}, { "./nodejsUtils": 14, "./stream/GenericWorker": 28, "./support": 30, "./utils": 32 }], 32: [function(t, r, n) {
var a = t("./support"), l = t("./base64"), o = t("./nodejsUtils"), h = t("./external");
function g(u) {
return u;
}
function y(u, m) {
for (var f = 0; f < u.length; ++f)
m[f] = 255 & u.charCodeAt(f);
return m;
}
t("setimmediate"), n.newBlob = function(u, m) {
n.checkSupport("blob");
try {
return new Blob([u], { type: m });
} catch (_) {
try {
var f = new (self.BlobBuilder || self.WebKitBlobBuilder || self.MozBlobBuilder || self.MSBlobBuilder)();
return f.append(u), f.getBlob(m);
} catch (C) {
throw new Error("Bug : can't construct the Blob.");
}
}
};
var w = { stringifyByChunk: function(u, m, f) {
var _ = [], C = 0, A = u.length;
if (A <= f)
return String.fromCharCode.apply(null, u);
for (; C < A; )
m === "array" || m === "nodebuffer" ? _.push(String.fromCharCode.apply(null, u.slice(C, Math.min(C + f, A)))) : _.push(String.fromCharCode.apply(null, u.subarray(C, Math.min(C + f, A)))), C += f;
return _.join("");
}, stringifyByChar: function(u) {
for (var m = "", f = 0; f < u.length; f++)
m += String.fromCharCode(u[f]);
return m;
}, applyCanBeUsed: { uint8array: function() {
try {
return a.uint8array && String.fromCharCode.apply(null, new Uint8Array(1)).length === 1;
} catch (u) {
return !1;
}
}(), nodebuffer: function() {
try {
return a.nodebuffer && String.fromCharCode.apply(null, o.allocBuffer(1)).length === 1;
} catch (u) {
return !1;
}
}() } };
function k(u) {
var m = 65536, f = n.getTypeOf(u), _ = !0;
if (f === "uint8array" ? _ = w.applyCanBeUsed.uint8array : f === "nodebuffer" && (_ = w.applyCanBeUsed.nodebuffer), _)
for (; 1 < m; )
try {
return w.stringifyByChunk(u, f, m);
} catch (C) {
m = Math.floor(m / 2);
}
return w.stringifyByChar(u);
}
function d(u, m) {
for (var f = 0; f < u.length; f++)
m[f] = u[f];
return m;
}
n.applyFromCharCode = k;
var v = {};
v.string = { string: g, array: function(u) {
return y(u, new Array(u.length));
}, arraybuffer: function(u) {
return v.string.uint8array(u).buffer;
}, uint8array: function(u) {
return y(u, new Uint8Array(u.length));
}, nodebuffer: function(u) {
return y(u, o.allocBuffer(u.length));
} }, v.array = { string: k, array: g, arraybuffer: function(u) {
return new Uint8Array(u).buffer;
}, uint8array: function(u) {
return new Uint8Array(u);
}, nodebuffer: function(u) {
return o.newBufferFrom(u);
} }, v.arraybuffer = { string: function(u) {
return k(new Uint8Array(u));
}, array: function(u) {
return d(new Uint8Array(u), new Array(u.byteLength));
}, arraybuffer: g, uint8array: function(u) {
return new Uint8Array(u);
}, nodebuffer: function(u) {
return o.newBufferFrom(new Uint8Array(u));
} }, v.uint8array = { string: k, array: function(u) {
return d(u, new Array(u.length));
}, arraybuffer: function(u) {
return u.buffer;
}, uint8array: g, nodebuffer: function(u) {
return o.newBufferFrom(u);
} }, v.nodebuffer = { string: k, array: function(u) {
return d(u, new Array(u.length));
}, arraybuffer: function(u) {
return v.nodebuffer.uint8array(u).buffer;
}, uint8array: function(u) {
return d(u, new Uint8Array(u.length));
}, nodebuffer: g }, n.transformTo = function(u, m) {
if (m = m || "", !u)
return m;
n.checkSupport(u);
var f = n.getTypeOf(m);
return v[f][u](m);
}, n.resolve = function(u) {
for (var m = u.split("/"), f = [], _ = 0; _ < m.length; _++) {
var C = m[_];
C === "." || C === "" && _ !== 0 && _ !== m.length - 1 || (C === ".." ? f.pop() : f.push(C));
}
return f.join("/");
}, n.getTypeOf = function(u) {
return typeof u == "string" ? "string" : Object.prototype.toString.call(u) === "[object Array]" ? "array" : a.nodebuffer && o.isBuffer(u) ? "nodebuffer" : a.uint8array && u instanceof Uint8Array ? "uint8array" : a.arraybuffer && u instanceof ArrayBuffer ? "arraybuffer" : void 0;
}, n.checkSupport = function(u) {
if (!a[u.toLowerCase()])
throw new Error(u + " is not supported by this platform");
}, n.MAX_VALUE_16BITS = 65535, n.MAX_VALUE_32BITS = -1, n.pretty = function(u) {
var m, f, _ = "";
for (f = 0; f < (u || "").length; f++)
_ += "\\x" + ((m = u.charCodeAt(f)) < 16 ? "0" : "") + m.toString(16).toUpperCase();
return _;
}, n.delay = function(u, m, f) {
setImmediate(function() {
u.