easyproctor 2.5.1 → 2.5.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +12 -0
- package/esm/index.js +3012 -188
- package/index.js +3010 -188
- package/interfaces/ParamsConfig.d.ts +2 -1
- package/new-flow/backend/BackendService.d.ts +1 -1
- package/new-flow/proctoring/ProctoringSession.d.ts +8 -4
- package/new-flow/recorders/AlertRecorder.d.ts +20 -4
- package/new-flow/recorders/CameraRecorder.d.ts +2 -1
- package/new-flow/recorders/NoiseRecorder.d.ts +7 -0
- package/new-flow/upload/UploadService.d.ts +1 -0
- package/package.json +3 -1
- package/proctoring/proctoring.d.ts +8 -3
- package/proctoring/useProctoring.d.ts +3 -3
- package/unpkg/easyproctor.min.js +64 -45
package/index.js
CHANGED
|
@@ -11645,6 +11645,2372 @@ var require_follow_redirects = __commonJS({
|
|
|
11645
11645
|
}
|
|
11646
11646
|
});
|
|
11647
11647
|
|
|
11648
|
+
// node_modules/jszip/dist/jszip.min.js
|
|
11649
|
+
var require_jszip_min = __commonJS({
|
|
11650
|
+
"node_modules/jszip/dist/jszip.min.js"(exports2, module2) {
|
|
11651
|
+
!(function(e3) {
|
|
11652
|
+
if ("object" == typeof exports2 && "undefined" != typeof module2) module2.exports = e3();
|
|
11653
|
+
else if ("function" == typeof define && define.amd) define([], e3);
|
|
11654
|
+
else {
|
|
11655
|
+
("undefined" != typeof window ? window : "undefined" != typeof global ? global : "undefined" != typeof self ? self : this).JSZip = e3();
|
|
11656
|
+
}
|
|
11657
|
+
})(function() {
|
|
11658
|
+
return (function s3(a3, o3, h2) {
|
|
11659
|
+
function u3(r3, e4) {
|
|
11660
|
+
if (!o3[r3]) {
|
|
11661
|
+
if (!a3[r3]) {
|
|
11662
|
+
var t3 = "function" == typeof require && require;
|
|
11663
|
+
if (!e4 && t3) return t3(r3, true);
|
|
11664
|
+
if (l2) return l2(r3, true);
|
|
11665
|
+
var n3 = new Error("Cannot find module '" + r3 + "'");
|
|
11666
|
+
throw n3.code = "MODULE_NOT_FOUND", n3;
|
|
11667
|
+
}
|
|
11668
|
+
var i3 = o3[r3] = { exports: {} };
|
|
11669
|
+
a3[r3][0].call(i3.exports, function(e5) {
|
|
11670
|
+
var t4 = a3[r3][1][e5];
|
|
11671
|
+
return u3(t4 || e5);
|
|
11672
|
+
}, i3, i3.exports, s3, a3, o3, h2);
|
|
11673
|
+
}
|
|
11674
|
+
return o3[r3].exports;
|
|
11675
|
+
}
|
|
11676
|
+
for (var l2 = "function" == typeof require && require, e3 = 0; e3 < h2.length; e3++) u3(h2[e3]);
|
|
11677
|
+
return u3;
|
|
11678
|
+
})({ 1: [function(e3, t3, r3) {
|
|
11679
|
+
"use strict";
|
|
11680
|
+
var d = e3("./utils"), c3 = e3("./support"), p3 = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=";
|
|
11681
|
+
r3.encode = function(e4) {
|
|
11682
|
+
for (var t4, r4, n3, i3, s3, a3, o3, h2 = [], u3 = 0, l2 = e4.length, f = l2, c4 = "string" !== d.getTypeOf(e4); u3 < e4.length; ) f = l2 - u3, n3 = c4 ? (t4 = e4[u3++], r4 = u3 < l2 ? e4[u3++] : 0, u3 < l2 ? e4[u3++] : 0) : (t4 = e4.charCodeAt(u3++), r4 = u3 < l2 ? e4.charCodeAt(u3++) : 0, u3 < l2 ? e4.charCodeAt(u3++) : 0), i3 = t4 >> 2, s3 = (3 & t4) << 4 | r4 >> 4, a3 = 1 < f ? (15 & r4) << 2 | n3 >> 6 : 64, o3 = 2 < f ? 63 & n3 : 64, h2.push(p3.charAt(i3) + p3.charAt(s3) + p3.charAt(a3) + p3.charAt(o3));
|
|
11683
|
+
return h2.join("");
|
|
11684
|
+
}, r3.decode = function(e4) {
|
|
11685
|
+
var t4, r4, n3, i3, s3, a3, o3 = 0, h2 = 0, u3 = "data:";
|
|
11686
|
+
if (e4.substr(0, u3.length) === u3) throw new Error("Invalid base64 input, it looks like a data url.");
|
|
11687
|
+
var l2, f = 3 * (e4 = e4.replace(/[^A-Za-z0-9+/=]/g, "")).length / 4;
|
|
11688
|
+
if (e4.charAt(e4.length - 1) === p3.charAt(64) && f--, e4.charAt(e4.length - 2) === p3.charAt(64) && f--, f % 1 != 0) throw new Error("Invalid base64 input, bad content length.");
|
|
11689
|
+
for (l2 = c3.uint8array ? new Uint8Array(0 | f) : new Array(0 | f); o3 < e4.length; ) t4 = p3.indexOf(e4.charAt(o3++)) << 2 | (i3 = p3.indexOf(e4.charAt(o3++))) >> 4, r4 = (15 & i3) << 4 | (s3 = p3.indexOf(e4.charAt(o3++))) >> 2, n3 = (3 & s3) << 6 | (a3 = p3.indexOf(e4.charAt(o3++))), l2[h2++] = t4, 64 !== s3 && (l2[h2++] = r4), 64 !== a3 && (l2[h2++] = n3);
|
|
11690
|
+
return l2;
|
|
11691
|
+
};
|
|
11692
|
+
}, { "./support": 30, "./utils": 32 }], 2: [function(e3, t3, r3) {
|
|
11693
|
+
"use strict";
|
|
11694
|
+
var n3 = e3("./external"), i3 = e3("./stream/DataWorker"), s3 = e3("./stream/Crc32Probe"), a3 = e3("./stream/DataLengthProbe");
|
|
11695
|
+
function o3(e4, t4, r4, n4, i4) {
|
|
11696
|
+
this.compressedSize = e4, this.uncompressedSize = t4, this.crc32 = r4, this.compression = n4, this.compressedContent = i4;
|
|
11697
|
+
}
|
|
11698
|
+
o3.prototype = { getContentWorker: function() {
|
|
11699
|
+
var e4 = new i3(n3.Promise.resolve(this.compressedContent)).pipe(this.compression.uncompressWorker()).pipe(new a3("data_length")), t4 = this;
|
|
11700
|
+
return e4.on("end", function() {
|
|
11701
|
+
if (this.streamInfo.data_length !== t4.uncompressedSize) throw new Error("Bug : uncompressed data size mismatch");
|
|
11702
|
+
}), e4;
|
|
11703
|
+
}, getCompressedWorker: function() {
|
|
11704
|
+
return new i3(n3.Promise.resolve(this.compressedContent)).withStreamInfo("compressedSize", this.compressedSize).withStreamInfo("uncompressedSize", this.uncompressedSize).withStreamInfo("crc32", this.crc32).withStreamInfo("compression", this.compression);
|
|
11705
|
+
} }, o3.createWorkerFrom = function(e4, t4, r4) {
|
|
11706
|
+
return e4.pipe(new s3()).pipe(new a3("uncompressedSize")).pipe(t4.compressWorker(r4)).pipe(new a3("compressedSize")).withStreamInfo("compression", t4);
|
|
11707
|
+
}, t3.exports = o3;
|
|
11708
|
+
}, { "./external": 6, "./stream/Crc32Probe": 25, "./stream/DataLengthProbe": 26, "./stream/DataWorker": 27 }], 3: [function(e3, t3, r3) {
|
|
11709
|
+
"use strict";
|
|
11710
|
+
var n3 = e3("./stream/GenericWorker");
|
|
11711
|
+
r3.STORE = { magic: "\0\0", compressWorker: function() {
|
|
11712
|
+
return new n3("STORE compression");
|
|
11713
|
+
}, uncompressWorker: function() {
|
|
11714
|
+
return new n3("STORE decompression");
|
|
11715
|
+
} }, r3.DEFLATE = e3("./flate");
|
|
11716
|
+
}, { "./flate": 7, "./stream/GenericWorker": 28 }], 4: [function(e3, t3, r3) {
|
|
11717
|
+
"use strict";
|
|
11718
|
+
var n3 = e3("./utils");
|
|
11719
|
+
var o3 = (function() {
|
|
11720
|
+
for (var e4, t4 = [], r4 = 0; r4 < 256; r4++) {
|
|
11721
|
+
e4 = r4;
|
|
11722
|
+
for (var n4 = 0; n4 < 8; n4++) e4 = 1 & e4 ? 3988292384 ^ e4 >>> 1 : e4 >>> 1;
|
|
11723
|
+
t4[r4] = e4;
|
|
11724
|
+
}
|
|
11725
|
+
return t4;
|
|
11726
|
+
})();
|
|
11727
|
+
t3.exports = function(e4, t4) {
|
|
11728
|
+
return void 0 !== e4 && e4.length ? "string" !== n3.getTypeOf(e4) ? (function(e5, t5, r4, n4) {
|
|
11729
|
+
var i3 = o3, s3 = n4 + r4;
|
|
11730
|
+
e5 ^= -1;
|
|
11731
|
+
for (var a3 = n4; a3 < s3; a3++) e5 = e5 >>> 8 ^ i3[255 & (e5 ^ t5[a3])];
|
|
11732
|
+
return -1 ^ e5;
|
|
11733
|
+
})(0 | t4, e4, e4.length, 0) : (function(e5, t5, r4, n4) {
|
|
11734
|
+
var i3 = o3, s3 = n4 + r4;
|
|
11735
|
+
e5 ^= -1;
|
|
11736
|
+
for (var a3 = n4; a3 < s3; a3++) e5 = e5 >>> 8 ^ i3[255 & (e5 ^ t5.charCodeAt(a3))];
|
|
11737
|
+
return -1 ^ e5;
|
|
11738
|
+
})(0 | t4, e4, e4.length, 0) : 0;
|
|
11739
|
+
};
|
|
11740
|
+
}, { "./utils": 32 }], 5: [function(e3, t3, r3) {
|
|
11741
|
+
"use strict";
|
|
11742
|
+
r3.base64 = false, r3.binary = false, r3.dir = false, r3.createFolders = true, r3.date = null, r3.compression = null, r3.compressionOptions = null, r3.comment = null, r3.unixPermissions = null, r3.dosPermissions = null;
|
|
11743
|
+
}, {}], 6: [function(e3, t3, r3) {
|
|
11744
|
+
"use strict";
|
|
11745
|
+
var n3 = null;
|
|
11746
|
+
n3 = "undefined" != typeof Promise ? Promise : e3("lie"), t3.exports = { Promise: n3 };
|
|
11747
|
+
}, { lie: 37 }], 7: [function(e3, t3, r3) {
|
|
11748
|
+
"use strict";
|
|
11749
|
+
var n3 = "undefined" != typeof Uint8Array && "undefined" != typeof Uint16Array && "undefined" != typeof Uint32Array, i3 = e3("pako"), s3 = e3("./utils"), a3 = e3("./stream/GenericWorker"), o3 = n3 ? "uint8array" : "array";
|
|
11750
|
+
function h2(e4, t4) {
|
|
11751
|
+
a3.call(this, "FlateWorker/" + e4), this._pako = null, this._pakoAction = e4, this._pakoOptions = t4, this.meta = {};
|
|
11752
|
+
}
|
|
11753
|
+
r3.magic = "\b\0", s3.inherits(h2, a3), h2.prototype.processChunk = function(e4) {
|
|
11754
|
+
this.meta = e4.meta, null === this._pako && this._createPako(), this._pako.push(s3.transformTo(o3, e4.data), false);
|
|
11755
|
+
}, h2.prototype.flush = function() {
|
|
11756
|
+
a3.prototype.flush.call(this), null === this._pako && this._createPako(), this._pako.push([], true);
|
|
11757
|
+
}, h2.prototype.cleanUp = function() {
|
|
11758
|
+
a3.prototype.cleanUp.call(this), this._pako = null;
|
|
11759
|
+
}, h2.prototype._createPako = function() {
|
|
11760
|
+
this._pako = new i3[this._pakoAction]({ raw: true, level: this._pakoOptions.level || -1 });
|
|
11761
|
+
var t4 = this;
|
|
11762
|
+
this._pako.onData = function(e4) {
|
|
11763
|
+
t4.push({ data: e4, meta: t4.meta });
|
|
11764
|
+
};
|
|
11765
|
+
}, r3.compressWorker = function(e4) {
|
|
11766
|
+
return new h2("Deflate", e4);
|
|
11767
|
+
}, r3.uncompressWorker = function() {
|
|
11768
|
+
return new h2("Inflate", {});
|
|
11769
|
+
};
|
|
11770
|
+
}, { "./stream/GenericWorker": 28, "./utils": 32, pako: 38 }], 8: [function(e3, t3, r3) {
|
|
11771
|
+
"use strict";
|
|
11772
|
+
function A3(e4, t4) {
|
|
11773
|
+
var r4, n4 = "";
|
|
11774
|
+
for (r4 = 0; r4 < t4; r4++) n4 += String.fromCharCode(255 & e4), e4 >>>= 8;
|
|
11775
|
+
return n4;
|
|
11776
|
+
}
|
|
11777
|
+
function n3(e4, t4, r4, n4, i4, s4) {
|
|
11778
|
+
var a3, o3, h2 = e4.file, u3 = e4.compression, l2 = s4 !== O3.utf8encode, f = I3.transformTo("string", s4(h2.name)), c3 = I3.transformTo("string", O3.utf8encode(h2.name)), d = h2.comment, p3 = I3.transformTo("string", s4(d)), m3 = I3.transformTo("string", O3.utf8encode(d)), _3 = c3.length !== h2.name.length, g3 = m3.length !== d.length, b3 = "", v3 = "", y3 = "", w3 = h2.dir, k3 = h2.date, x3 = { crc32: 0, compressedSize: 0, uncompressedSize: 0 };
|
|
11779
|
+
t4 && !r4 || (x3.crc32 = e4.crc32, x3.compressedSize = e4.compressedSize, x3.uncompressedSize = e4.uncompressedSize);
|
|
11780
|
+
var S3 = 0;
|
|
11781
|
+
t4 && (S3 |= 8), l2 || !_3 && !g3 || (S3 |= 2048);
|
|
11782
|
+
var z3 = 0, C3 = 0;
|
|
11783
|
+
w3 && (z3 |= 16), "UNIX" === i4 ? (C3 = 798, z3 |= (function(e5, t5) {
|
|
11784
|
+
var r5 = e5;
|
|
11785
|
+
return e5 || (r5 = t5 ? 16893 : 33204), (65535 & r5) << 16;
|
|
11786
|
+
})(h2.unixPermissions, w3)) : (C3 = 20, z3 |= (function(e5) {
|
|
11787
|
+
return 63 & (e5 || 0);
|
|
11788
|
+
})(h2.dosPermissions)), a3 = k3.getUTCHours(), a3 <<= 6, a3 |= k3.getUTCMinutes(), a3 <<= 5, a3 |= k3.getUTCSeconds() / 2, o3 = k3.getUTCFullYear() - 1980, o3 <<= 4, o3 |= k3.getUTCMonth() + 1, o3 <<= 5, o3 |= k3.getUTCDate(), _3 && (v3 = A3(1, 1) + A3(B3(f), 4) + c3, b3 += "up" + A3(v3.length, 2) + v3), g3 && (y3 = A3(1, 1) + A3(B3(p3), 4) + m3, b3 += "uc" + A3(y3.length, 2) + y3);
|
|
11789
|
+
var E3 = "";
|
|
11790
|
+
return E3 += "\n\0", E3 += A3(S3, 2), E3 += u3.magic, E3 += A3(a3, 2), E3 += A3(o3, 2), E3 += A3(x3.crc32, 4), E3 += A3(x3.compressedSize, 4), E3 += A3(x3.uncompressedSize, 4), E3 += A3(f.length, 2), E3 += A3(b3.length, 2), { fileRecord: R3.LOCAL_FILE_HEADER + E3 + f + b3, dirRecord: R3.CENTRAL_FILE_HEADER + A3(C3, 2) + E3 + A3(p3.length, 2) + "\0\0\0\0" + A3(z3, 4) + A3(n4, 4) + f + b3 + p3 };
|
|
11791
|
+
}
|
|
11792
|
+
var I3 = e3("../utils"), i3 = e3("../stream/GenericWorker"), O3 = e3("../utf8"), B3 = e3("../crc32"), R3 = e3("../signature");
|
|
11793
|
+
function s3(e4, t4, r4, n4) {
|
|
11794
|
+
i3.call(this, "ZipFileWorker"), this.bytesWritten = 0, this.zipComment = t4, this.zipPlatform = r4, this.encodeFileName = n4, this.streamFiles = e4, this.accumulate = false, this.contentBuffer = [], this.dirRecords = [], this.currentSourceOffset = 0, this.entriesCount = 0, this.currentFile = null, this._sources = [];
|
|
11795
|
+
}
|
|
11796
|
+
I3.inherits(s3, i3), s3.prototype.push = function(e4) {
|
|
11797
|
+
var t4 = e4.meta.percent || 0, r4 = this.entriesCount, n4 = this._sources.length;
|
|
11798
|
+
this.accumulate ? this.contentBuffer.push(e4) : (this.bytesWritten += e4.data.length, i3.prototype.push.call(this, { data: e4.data, meta: { currentFile: this.currentFile, percent: r4 ? (t4 + 100 * (r4 - n4 - 1)) / r4 : 100 } }));
|
|
11799
|
+
}, s3.prototype.openedSource = function(e4) {
|
|
11800
|
+
this.currentSourceOffset = this.bytesWritten, this.currentFile = e4.file.name;
|
|
11801
|
+
var t4 = this.streamFiles && !e4.file.dir;
|
|
11802
|
+
if (t4) {
|
|
11803
|
+
var r4 = n3(e4, t4, false, this.currentSourceOffset, this.zipPlatform, this.encodeFileName);
|
|
11804
|
+
this.push({ data: r4.fileRecord, meta: { percent: 0 } });
|
|
11805
|
+
} else this.accumulate = true;
|
|
11806
|
+
}, s3.prototype.closedSource = function(e4) {
|
|
11807
|
+
this.accumulate = false;
|
|
11808
|
+
var t4 = this.streamFiles && !e4.file.dir, r4 = n3(e4, t4, true, this.currentSourceOffset, this.zipPlatform, this.encodeFileName);
|
|
11809
|
+
if (this.dirRecords.push(r4.dirRecord), t4) this.push({ data: (function(e5) {
|
|
11810
|
+
return R3.DATA_DESCRIPTOR + A3(e5.crc32, 4) + A3(e5.compressedSize, 4) + A3(e5.uncompressedSize, 4);
|
|
11811
|
+
})(e4), meta: { percent: 100 } });
|
|
11812
|
+
else for (this.push({ data: r4.fileRecord, meta: { percent: 0 } }); this.contentBuffer.length; ) this.push(this.contentBuffer.shift());
|
|
11813
|
+
this.currentFile = null;
|
|
11814
|
+
}, s3.prototype.flush = function() {
|
|
11815
|
+
for (var e4 = this.bytesWritten, t4 = 0; t4 < this.dirRecords.length; t4++) this.push({ data: this.dirRecords[t4], meta: { percent: 100 } });
|
|
11816
|
+
var r4 = this.bytesWritten - e4, n4 = (function(e5, t5, r5, n5, i4) {
|
|
11817
|
+
var s4 = I3.transformTo("string", i4(n5));
|
|
11818
|
+
return R3.CENTRAL_DIRECTORY_END + "\0\0\0\0" + A3(e5, 2) + A3(e5, 2) + A3(t5, 4) + A3(r5, 4) + A3(s4.length, 2) + s4;
|
|
11819
|
+
})(this.dirRecords.length, r4, e4, this.zipComment, this.encodeFileName);
|
|
11820
|
+
this.push({ data: n4, meta: { percent: 100 } });
|
|
11821
|
+
}, s3.prototype.prepareNextSource = function() {
|
|
11822
|
+
this.previous = this._sources.shift(), this.openedSource(this.previous.streamInfo), this.isPaused ? this.previous.pause() : this.previous.resume();
|
|
11823
|
+
}, s3.prototype.registerPrevious = function(e4) {
|
|
11824
|
+
this._sources.push(e4);
|
|
11825
|
+
var t4 = this;
|
|
11826
|
+
return e4.on("data", function(e5) {
|
|
11827
|
+
t4.processChunk(e5);
|
|
11828
|
+
}), e4.on("end", function() {
|
|
11829
|
+
t4.closedSource(t4.previous.streamInfo), t4._sources.length ? t4.prepareNextSource() : t4.end();
|
|
11830
|
+
}), e4.on("error", function(e5) {
|
|
11831
|
+
t4.error(e5);
|
|
11832
|
+
}), this;
|
|
11833
|
+
}, s3.prototype.resume = function() {
|
|
11834
|
+
return !!i3.prototype.resume.call(this) && (!this.previous && this._sources.length ? (this.prepareNextSource(), true) : this.previous || this._sources.length || this.generatedError ? void 0 : (this.end(), true));
|
|
11835
|
+
}, s3.prototype.error = function(e4) {
|
|
11836
|
+
var t4 = this._sources;
|
|
11837
|
+
if (!i3.prototype.error.call(this, e4)) return false;
|
|
11838
|
+
for (var r4 = 0; r4 < t4.length; r4++) try {
|
|
11839
|
+
t4[r4].error(e4);
|
|
11840
|
+
} catch (e5) {
|
|
11841
|
+
}
|
|
11842
|
+
return true;
|
|
11843
|
+
}, s3.prototype.lock = function() {
|
|
11844
|
+
i3.prototype.lock.call(this);
|
|
11845
|
+
for (var e4 = this._sources, t4 = 0; t4 < e4.length; t4++) e4[t4].lock();
|
|
11846
|
+
}, t3.exports = s3;
|
|
11847
|
+
}, { "../crc32": 4, "../signature": 23, "../stream/GenericWorker": 28, "../utf8": 31, "../utils": 32 }], 9: [function(e3, t3, r3) {
|
|
11848
|
+
"use strict";
|
|
11849
|
+
var u3 = e3("../compressions"), n3 = e3("./ZipFileWorker");
|
|
11850
|
+
r3.generateWorker = function(e4, a3, t4) {
|
|
11851
|
+
var o3 = new n3(a3.streamFiles, t4, a3.platform, a3.encodeFileName), h2 = 0;
|
|
11852
|
+
try {
|
|
11853
|
+
e4.forEach(function(e5, t5) {
|
|
11854
|
+
h2++;
|
|
11855
|
+
var r4 = (function(e6, t6) {
|
|
11856
|
+
var r5 = e6 || t6, n5 = u3[r5];
|
|
11857
|
+
if (!n5) throw new Error(r5 + " is not a valid compression method !");
|
|
11858
|
+
return n5;
|
|
11859
|
+
})(t5.options.compression, a3.compression), n4 = t5.options.compressionOptions || a3.compressionOptions || {}, i3 = t5.dir, s3 = t5.date;
|
|
11860
|
+
t5._compressWorker(r4, n4).withStreamInfo("file", { name: e5, dir: i3, date: s3, comment: t5.comment || "", unixPermissions: t5.unixPermissions, dosPermissions: t5.dosPermissions }).pipe(o3);
|
|
11861
|
+
}), o3.entriesCount = h2;
|
|
11862
|
+
} catch (e5) {
|
|
11863
|
+
o3.error(e5);
|
|
11864
|
+
}
|
|
11865
|
+
return o3;
|
|
11866
|
+
};
|
|
11867
|
+
}, { "../compressions": 3, "./ZipFileWorker": 8 }], 10: [function(e3, t3, r3) {
|
|
11868
|
+
"use strict";
|
|
11869
|
+
function n3() {
|
|
11870
|
+
if (!(this instanceof n3)) return new n3();
|
|
11871
|
+
if (arguments.length) throw new Error("The constructor with parameters has been removed in JSZip 3.0, please check the upgrade guide.");
|
|
11872
|
+
this.files = /* @__PURE__ */ Object.create(null), this.comment = null, this.root = "", this.clone = function() {
|
|
11873
|
+
var e4 = new n3();
|
|
11874
|
+
for (var t4 in this) "function" != typeof this[t4] && (e4[t4] = this[t4]);
|
|
11875
|
+
return e4;
|
|
11876
|
+
};
|
|
11877
|
+
}
|
|
11878
|
+
(n3.prototype = e3("./object")).loadAsync = e3("./load"), n3.support = e3("./support"), n3.defaults = e3("./defaults"), n3.version = "3.10.1", n3.loadAsync = function(e4, t4) {
|
|
11879
|
+
return new n3().loadAsync(e4, t4);
|
|
11880
|
+
}, n3.external = e3("./external"), t3.exports = n3;
|
|
11881
|
+
}, { "./defaults": 5, "./external": 6, "./load": 11, "./object": 15, "./support": 30 }], 11: [function(e3, t3, r3) {
|
|
11882
|
+
"use strict";
|
|
11883
|
+
var u3 = e3("./utils"), i3 = e3("./external"), n3 = e3("./utf8"), s3 = e3("./zipEntries"), a3 = e3("./stream/Crc32Probe"), l2 = e3("./nodejsUtils");
|
|
11884
|
+
function f(n4) {
|
|
11885
|
+
return new i3.Promise(function(e4, t4) {
|
|
11886
|
+
var r4 = n4.decompressed.getContentWorker().pipe(new a3());
|
|
11887
|
+
r4.on("error", function(e5) {
|
|
11888
|
+
t4(e5);
|
|
11889
|
+
}).on("end", function() {
|
|
11890
|
+
r4.streamInfo.crc32 !== n4.decompressed.crc32 ? t4(new Error("Corrupted zip : CRC32 mismatch")) : e4();
|
|
11891
|
+
}).resume();
|
|
11892
|
+
});
|
|
11893
|
+
}
|
|
11894
|
+
t3.exports = function(e4, o3) {
|
|
11895
|
+
var h2 = this;
|
|
11896
|
+
return o3 = u3.extend(o3 || {}, { base64: false, checkCRC32: false, optimizedBinaryString: false, createFolders: false, decodeFileName: n3.utf8decode }), l2.isNode && l2.isStream(e4) ? i3.Promise.reject(new Error("JSZip can't accept a stream when loading a zip file.")) : u3.prepareContent("the loaded zip file", e4, true, o3.optimizedBinaryString, o3.base64).then(function(e5) {
|
|
11897
|
+
var t4 = new s3(o3);
|
|
11898
|
+
return t4.load(e5), t4;
|
|
11899
|
+
}).then(function(e5) {
|
|
11900
|
+
var t4 = [i3.Promise.resolve(e5)], r4 = e5.files;
|
|
11901
|
+
if (o3.checkCRC32) for (var n4 = 0; n4 < r4.length; n4++) t4.push(f(r4[n4]));
|
|
11902
|
+
return i3.Promise.all(t4);
|
|
11903
|
+
}).then(function(e5) {
|
|
11904
|
+
for (var t4 = e5.shift(), r4 = t4.files, n4 = 0; n4 < r4.length; n4++) {
|
|
11905
|
+
var i4 = r4[n4], s4 = i4.fileNameStr, a4 = u3.resolve(i4.fileNameStr);
|
|
11906
|
+
h2.file(a4, i4.decompressed, { binary: true, optimizedBinaryString: true, date: i4.date, dir: i4.dir, comment: i4.fileCommentStr.length ? i4.fileCommentStr : null, unixPermissions: i4.unixPermissions, dosPermissions: i4.dosPermissions, createFolders: o3.createFolders }), i4.dir || (h2.file(a4).unsafeOriginalName = s4);
|
|
11907
|
+
}
|
|
11908
|
+
return t4.zipComment.length && (h2.comment = t4.zipComment), h2;
|
|
11909
|
+
});
|
|
11910
|
+
};
|
|
11911
|
+
}, { "./external": 6, "./nodejsUtils": 14, "./stream/Crc32Probe": 25, "./utf8": 31, "./utils": 32, "./zipEntries": 33 }], 12: [function(e3, t3, r3) {
|
|
11912
|
+
"use strict";
|
|
11913
|
+
var n3 = e3("../utils"), i3 = e3("../stream/GenericWorker");
|
|
11914
|
+
function s3(e4, t4) {
|
|
11915
|
+
i3.call(this, "Nodejs stream input adapter for " + e4), this._upstreamEnded = false, this._bindStream(t4);
|
|
11916
|
+
}
|
|
11917
|
+
n3.inherits(s3, i3), s3.prototype._bindStream = function(e4) {
|
|
11918
|
+
var t4 = this;
|
|
11919
|
+
(this._stream = e4).pause(), e4.on("data", function(e5) {
|
|
11920
|
+
t4.push({ data: e5, meta: { percent: 0 } });
|
|
11921
|
+
}).on("error", function(e5) {
|
|
11922
|
+
t4.isPaused ? this.generatedError = e5 : t4.error(e5);
|
|
11923
|
+
}).on("end", function() {
|
|
11924
|
+
t4.isPaused ? t4._upstreamEnded = true : t4.end();
|
|
11925
|
+
});
|
|
11926
|
+
}, s3.prototype.pause = function() {
|
|
11927
|
+
return !!i3.prototype.pause.call(this) && (this._stream.pause(), true);
|
|
11928
|
+
}, s3.prototype.resume = function() {
|
|
11929
|
+
return !!i3.prototype.resume.call(this) && (this._upstreamEnded ? this.end() : this._stream.resume(), true);
|
|
11930
|
+
}, t3.exports = s3;
|
|
11931
|
+
}, { "../stream/GenericWorker": 28, "../utils": 32 }], 13: [function(e3, t3, r3) {
|
|
11932
|
+
"use strict";
|
|
11933
|
+
var i3 = e3("readable-stream").Readable;
|
|
11934
|
+
function n3(e4, t4, r4) {
|
|
11935
|
+
i3.call(this, t4), this._helper = e4;
|
|
11936
|
+
var n4 = this;
|
|
11937
|
+
e4.on("data", function(e5, t5) {
|
|
11938
|
+
n4.push(e5) || n4._helper.pause(), r4 && r4(t5);
|
|
11939
|
+
}).on("error", function(e5) {
|
|
11940
|
+
n4.emit("error", e5);
|
|
11941
|
+
}).on("end", function() {
|
|
11942
|
+
n4.push(null);
|
|
11943
|
+
});
|
|
11944
|
+
}
|
|
11945
|
+
e3("../utils").inherits(n3, i3), n3.prototype._read = function() {
|
|
11946
|
+
this._helper.resume();
|
|
11947
|
+
}, t3.exports = n3;
|
|
11948
|
+
}, { "../utils": 32, "readable-stream": 16 }], 14: [function(e3, t3, r3) {
|
|
11949
|
+
"use strict";
|
|
11950
|
+
t3.exports = { isNode: "undefined" != typeof Buffer, newBufferFrom: function(e4, t4) {
|
|
11951
|
+
if (Buffer.from && Buffer.from !== Uint8Array.from) return Buffer.from(e4, t4);
|
|
11952
|
+
if ("number" == typeof e4) throw new Error('The "data" argument must not be a number');
|
|
11953
|
+
return new Buffer(e4, t4);
|
|
11954
|
+
}, allocBuffer: function(e4) {
|
|
11955
|
+
if (Buffer.alloc) return Buffer.alloc(e4);
|
|
11956
|
+
var t4 = new Buffer(e4);
|
|
11957
|
+
return t4.fill(0), t4;
|
|
11958
|
+
}, isBuffer: function(e4) {
|
|
11959
|
+
return Buffer.isBuffer(e4);
|
|
11960
|
+
}, isStream: function(e4) {
|
|
11961
|
+
return e4 && "function" == typeof e4.on && "function" == typeof e4.pause && "function" == typeof e4.resume;
|
|
11962
|
+
} };
|
|
11963
|
+
}, {}], 15: [function(e3, t3, r3) {
|
|
11964
|
+
"use strict";
|
|
11965
|
+
function s3(e4, t4, r4) {
|
|
11966
|
+
var n4, i4 = u3.getTypeOf(t4), s4 = u3.extend(r4 || {}, f);
|
|
11967
|
+
s4.date = s4.date || /* @__PURE__ */ new Date(), null !== s4.compression && (s4.compression = s4.compression.toUpperCase()), "string" == typeof s4.unixPermissions && (s4.unixPermissions = parseInt(s4.unixPermissions, 8)), s4.unixPermissions && 16384 & s4.unixPermissions && (s4.dir = true), s4.dosPermissions && 16 & s4.dosPermissions && (s4.dir = true), s4.dir && (e4 = g3(e4)), s4.createFolders && (n4 = _3(e4)) && b3.call(this, n4, true);
|
|
11968
|
+
var a4 = "string" === i4 && false === s4.binary && false === s4.base64;
|
|
11969
|
+
r4 && void 0 !== r4.binary || (s4.binary = !a4), (t4 instanceof c3 && 0 === t4.uncompressedSize || s4.dir || !t4 || 0 === t4.length) && (s4.base64 = false, s4.binary = true, t4 = "", s4.compression = "STORE", i4 = "string");
|
|
11970
|
+
var o4 = null;
|
|
11971
|
+
o4 = t4 instanceof c3 || t4 instanceof l2 ? t4 : p3.isNode && p3.isStream(t4) ? new m3(e4, t4) : u3.prepareContent(e4, t4, s4.binary, s4.optimizedBinaryString, s4.base64);
|
|
11972
|
+
var h3 = new d(e4, o4, s4);
|
|
11973
|
+
this.files[e4] = h3;
|
|
11974
|
+
}
|
|
11975
|
+
var i3 = e3("./utf8"), u3 = e3("./utils"), l2 = e3("./stream/GenericWorker"), a3 = e3("./stream/StreamHelper"), f = e3("./defaults"), c3 = e3("./compressedObject"), d = e3("./zipObject"), o3 = e3("./generate"), p3 = e3("./nodejsUtils"), m3 = e3("./nodejs/NodejsStreamInputAdapter"), _3 = function(e4) {
|
|
11976
|
+
"/" === e4.slice(-1) && (e4 = e4.substring(0, e4.length - 1));
|
|
11977
|
+
var t4 = e4.lastIndexOf("/");
|
|
11978
|
+
return 0 < t4 ? e4.substring(0, t4) : "";
|
|
11979
|
+
}, g3 = function(e4) {
|
|
11980
|
+
return "/" !== e4.slice(-1) && (e4 += "/"), e4;
|
|
11981
|
+
}, b3 = function(e4, t4) {
|
|
11982
|
+
return t4 = void 0 !== t4 ? t4 : f.createFolders, e4 = g3(e4), this.files[e4] || s3.call(this, e4, null, { dir: true, createFolders: t4 }), this.files[e4];
|
|
11983
|
+
};
|
|
11984
|
+
function h2(e4) {
|
|
11985
|
+
return "[object RegExp]" === Object.prototype.toString.call(e4);
|
|
11986
|
+
}
|
|
11987
|
+
var n3 = { load: function() {
|
|
11988
|
+
throw new Error("This method has been removed in JSZip 3.0, please check the upgrade guide.");
|
|
11989
|
+
}, forEach: function(e4) {
|
|
11990
|
+
var t4, r4, n4;
|
|
11991
|
+
for (t4 in this.files) n4 = this.files[t4], (r4 = t4.slice(this.root.length, t4.length)) && t4.slice(0, this.root.length) === this.root && e4(r4, n4);
|
|
11992
|
+
}, filter: function(r4) {
|
|
11993
|
+
var n4 = [];
|
|
11994
|
+
return this.forEach(function(e4, t4) {
|
|
11995
|
+
r4(e4, t4) && n4.push(t4);
|
|
11996
|
+
}), n4;
|
|
11997
|
+
}, file: function(e4, t4, r4) {
|
|
11998
|
+
if (1 !== arguments.length) return e4 = this.root + e4, s3.call(this, e4, t4, r4), this;
|
|
11999
|
+
if (h2(e4)) {
|
|
12000
|
+
var n4 = e4;
|
|
12001
|
+
return this.filter(function(e5, t5) {
|
|
12002
|
+
return !t5.dir && n4.test(e5);
|
|
12003
|
+
});
|
|
12004
|
+
}
|
|
12005
|
+
var i4 = this.files[this.root + e4];
|
|
12006
|
+
return i4 && !i4.dir ? i4 : null;
|
|
12007
|
+
}, folder: function(r4) {
|
|
12008
|
+
if (!r4) return this;
|
|
12009
|
+
if (h2(r4)) return this.filter(function(e5, t5) {
|
|
12010
|
+
return t5.dir && r4.test(e5);
|
|
12011
|
+
});
|
|
12012
|
+
var e4 = this.root + r4, t4 = b3.call(this, e4), n4 = this.clone();
|
|
12013
|
+
return n4.root = t4.name, n4;
|
|
12014
|
+
}, remove: function(r4) {
|
|
12015
|
+
r4 = this.root + r4;
|
|
12016
|
+
var e4 = this.files[r4];
|
|
12017
|
+
if (e4 || ("/" !== r4.slice(-1) && (r4 += "/"), e4 = this.files[r4]), e4 && !e4.dir) delete this.files[r4];
|
|
12018
|
+
else for (var t4 = this.filter(function(e5, t5) {
|
|
12019
|
+
return t5.name.slice(0, r4.length) === r4;
|
|
12020
|
+
}), n4 = 0; n4 < t4.length; n4++) delete this.files[t4[n4].name];
|
|
12021
|
+
return this;
|
|
12022
|
+
}, generate: function() {
|
|
12023
|
+
throw new Error("This method has been removed in JSZip 3.0, please check the upgrade guide.");
|
|
12024
|
+
}, generateInternalStream: function(e4) {
|
|
12025
|
+
var t4, r4 = {};
|
|
12026
|
+
try {
|
|
12027
|
+
if ((r4 = u3.extend(e4 || {}, { streamFiles: false, compression: "STORE", compressionOptions: null, type: "", platform: "DOS", comment: null, mimeType: "application/zip", encodeFileName: i3.utf8encode })).type = r4.type.toLowerCase(), r4.compression = r4.compression.toUpperCase(), "binarystring" === r4.type && (r4.type = "string"), !r4.type) throw new Error("No output type specified.");
|
|
12028
|
+
u3.checkSupport(r4.type), "darwin" !== r4.platform && "freebsd" !== r4.platform && "linux" !== r4.platform && "sunos" !== r4.platform || (r4.platform = "UNIX"), "win32" === r4.platform && (r4.platform = "DOS");
|
|
12029
|
+
var n4 = r4.comment || this.comment || "";
|
|
12030
|
+
t4 = o3.generateWorker(this, r4, n4);
|
|
12031
|
+
} catch (e5) {
|
|
12032
|
+
(t4 = new l2("error")).error(e5);
|
|
12033
|
+
}
|
|
12034
|
+
return new a3(t4, r4.type || "string", r4.mimeType);
|
|
12035
|
+
}, generateAsync: function(e4, t4) {
|
|
12036
|
+
return this.generateInternalStream(e4).accumulate(t4);
|
|
12037
|
+
}, generateNodeStream: function(e4, t4) {
|
|
12038
|
+
return (e4 = e4 || {}).type || (e4.type = "nodebuffer"), this.generateInternalStream(e4).toNodejsStream(t4);
|
|
12039
|
+
} };
|
|
12040
|
+
t3.exports = n3;
|
|
12041
|
+
}, { "./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(e3, t3, r3) {
|
|
12042
|
+
"use strict";
|
|
12043
|
+
t3.exports = e3("stream");
|
|
12044
|
+
}, { stream: void 0 }], 17: [function(e3, t3, r3) {
|
|
12045
|
+
"use strict";
|
|
12046
|
+
var n3 = e3("./DataReader");
|
|
12047
|
+
function i3(e4) {
|
|
12048
|
+
n3.call(this, e4);
|
|
12049
|
+
for (var t4 = 0; t4 < this.data.length; t4++) e4[t4] = 255 & e4[t4];
|
|
12050
|
+
}
|
|
12051
|
+
e3("../utils").inherits(i3, n3), i3.prototype.byteAt = function(e4) {
|
|
12052
|
+
return this.data[this.zero + e4];
|
|
12053
|
+
}, i3.prototype.lastIndexOfSignature = function(e4) {
|
|
12054
|
+
for (var t4 = e4.charCodeAt(0), r4 = e4.charCodeAt(1), n4 = e4.charCodeAt(2), i4 = e4.charCodeAt(3), s3 = this.length - 4; 0 <= s3; --s3) if (this.data[s3] === t4 && this.data[s3 + 1] === r4 && this.data[s3 + 2] === n4 && this.data[s3 + 3] === i4) return s3 - this.zero;
|
|
12055
|
+
return -1;
|
|
12056
|
+
}, i3.prototype.readAndCheckSignature = function(e4) {
|
|
12057
|
+
var t4 = e4.charCodeAt(0), r4 = e4.charCodeAt(1), n4 = e4.charCodeAt(2), i4 = e4.charCodeAt(3), s3 = this.readData(4);
|
|
12058
|
+
return t4 === s3[0] && r4 === s3[1] && n4 === s3[2] && i4 === s3[3];
|
|
12059
|
+
}, i3.prototype.readData = function(e4) {
|
|
12060
|
+
if (this.checkOffset(e4), 0 === e4) return [];
|
|
12061
|
+
var t4 = this.data.slice(this.zero + this.index, this.zero + this.index + e4);
|
|
12062
|
+
return this.index += e4, t4;
|
|
12063
|
+
}, t3.exports = i3;
|
|
12064
|
+
}, { "../utils": 32, "./DataReader": 18 }], 18: [function(e3, t3, r3) {
|
|
12065
|
+
"use strict";
|
|
12066
|
+
var n3 = e3("../utils");
|
|
12067
|
+
function i3(e4) {
|
|
12068
|
+
this.data = e4, this.length = e4.length, this.index = 0, this.zero = 0;
|
|
12069
|
+
}
|
|
12070
|
+
i3.prototype = { checkOffset: function(e4) {
|
|
12071
|
+
this.checkIndex(this.index + e4);
|
|
12072
|
+
}, checkIndex: function(e4) {
|
|
12073
|
+
if (this.length < this.zero + e4 || e4 < 0) throw new Error("End of data reached (data length = " + this.length + ", asked index = " + e4 + "). Corrupted zip ?");
|
|
12074
|
+
}, setIndex: function(e4) {
|
|
12075
|
+
this.checkIndex(e4), this.index = e4;
|
|
12076
|
+
}, skip: function(e4) {
|
|
12077
|
+
this.setIndex(this.index + e4);
|
|
12078
|
+
}, byteAt: function() {
|
|
12079
|
+
}, readInt: function(e4) {
|
|
12080
|
+
var t4, r4 = 0;
|
|
12081
|
+
for (this.checkOffset(e4), t4 = this.index + e4 - 1; t4 >= this.index; t4--) r4 = (r4 << 8) + this.byteAt(t4);
|
|
12082
|
+
return this.index += e4, r4;
|
|
12083
|
+
}, readString: function(e4) {
|
|
12084
|
+
return n3.transformTo("string", this.readData(e4));
|
|
12085
|
+
}, readData: function() {
|
|
12086
|
+
}, lastIndexOfSignature: function() {
|
|
12087
|
+
}, readAndCheckSignature: function() {
|
|
12088
|
+
}, readDate: function() {
|
|
12089
|
+
var e4 = this.readInt(4);
|
|
12090
|
+
return new Date(Date.UTC(1980 + (e4 >> 25 & 127), (e4 >> 21 & 15) - 1, e4 >> 16 & 31, e4 >> 11 & 31, e4 >> 5 & 63, (31 & e4) << 1));
|
|
12091
|
+
} }, t3.exports = i3;
|
|
12092
|
+
}, { "../utils": 32 }], 19: [function(e3, t3, r3) {
|
|
12093
|
+
"use strict";
|
|
12094
|
+
var n3 = e3("./Uint8ArrayReader");
|
|
12095
|
+
function i3(e4) {
|
|
12096
|
+
n3.call(this, e4);
|
|
12097
|
+
}
|
|
12098
|
+
e3("../utils").inherits(i3, n3), i3.prototype.readData = function(e4) {
|
|
12099
|
+
this.checkOffset(e4);
|
|
12100
|
+
var t4 = this.data.slice(this.zero + this.index, this.zero + this.index + e4);
|
|
12101
|
+
return this.index += e4, t4;
|
|
12102
|
+
}, t3.exports = i3;
|
|
12103
|
+
}, { "../utils": 32, "./Uint8ArrayReader": 21 }], 20: [function(e3, t3, r3) {
|
|
12104
|
+
"use strict";
|
|
12105
|
+
var n3 = e3("./DataReader");
|
|
12106
|
+
function i3(e4) {
|
|
12107
|
+
n3.call(this, e4);
|
|
12108
|
+
}
|
|
12109
|
+
e3("../utils").inherits(i3, n3), i3.prototype.byteAt = function(e4) {
|
|
12110
|
+
return this.data.charCodeAt(this.zero + e4);
|
|
12111
|
+
}, i3.prototype.lastIndexOfSignature = function(e4) {
|
|
12112
|
+
return this.data.lastIndexOf(e4) - this.zero;
|
|
12113
|
+
}, i3.prototype.readAndCheckSignature = function(e4) {
|
|
12114
|
+
return e4 === this.readData(4);
|
|
12115
|
+
}, i3.prototype.readData = function(e4) {
|
|
12116
|
+
this.checkOffset(e4);
|
|
12117
|
+
var t4 = this.data.slice(this.zero + this.index, this.zero + this.index + e4);
|
|
12118
|
+
return this.index += e4, t4;
|
|
12119
|
+
}, t3.exports = i3;
|
|
12120
|
+
}, { "../utils": 32, "./DataReader": 18 }], 21: [function(e3, t3, r3) {
|
|
12121
|
+
"use strict";
|
|
12122
|
+
var n3 = e3("./ArrayReader");
|
|
12123
|
+
function i3(e4) {
|
|
12124
|
+
n3.call(this, e4);
|
|
12125
|
+
}
|
|
12126
|
+
e3("../utils").inherits(i3, n3), i3.prototype.readData = function(e4) {
|
|
12127
|
+
if (this.checkOffset(e4), 0 === e4) return new Uint8Array(0);
|
|
12128
|
+
var t4 = this.data.subarray(this.zero + this.index, this.zero + this.index + e4);
|
|
12129
|
+
return this.index += e4, t4;
|
|
12130
|
+
}, t3.exports = i3;
|
|
12131
|
+
}, { "../utils": 32, "./ArrayReader": 17 }], 22: [function(e3, t3, r3) {
|
|
12132
|
+
"use strict";
|
|
12133
|
+
var n3 = e3("../utils"), i3 = e3("../support"), s3 = e3("./ArrayReader"), a3 = e3("./StringReader"), o3 = e3("./NodeBufferReader"), h2 = e3("./Uint8ArrayReader");
|
|
12134
|
+
t3.exports = function(e4) {
|
|
12135
|
+
var t4 = n3.getTypeOf(e4);
|
|
12136
|
+
return n3.checkSupport(t4), "string" !== t4 || i3.uint8array ? "nodebuffer" === t4 ? new o3(e4) : i3.uint8array ? new h2(n3.transformTo("uint8array", e4)) : new s3(n3.transformTo("array", e4)) : new a3(e4);
|
|
12137
|
+
};
|
|
12138
|
+
}, { "../support": 30, "../utils": 32, "./ArrayReader": 17, "./NodeBufferReader": 19, "./StringReader": 20, "./Uint8ArrayReader": 21 }], 23: [function(e3, t3, r3) {
|
|
12139
|
+
"use strict";
|
|
12140
|
+
r3.LOCAL_FILE_HEADER = "PK", r3.CENTRAL_FILE_HEADER = "PK", r3.CENTRAL_DIRECTORY_END = "PK", r3.ZIP64_CENTRAL_DIRECTORY_LOCATOR = "PK\x07", r3.ZIP64_CENTRAL_DIRECTORY_END = "PK", r3.DATA_DESCRIPTOR = "PK\x07\b";
|
|
12141
|
+
}, {}], 24: [function(e3, t3, r3) {
|
|
12142
|
+
"use strict";
|
|
12143
|
+
var n3 = e3("./GenericWorker"), i3 = e3("../utils");
|
|
12144
|
+
function s3(e4) {
|
|
12145
|
+
n3.call(this, "ConvertWorker to " + e4), this.destType = e4;
|
|
12146
|
+
}
|
|
12147
|
+
i3.inherits(s3, n3), s3.prototype.processChunk = function(e4) {
|
|
12148
|
+
this.push({ data: i3.transformTo(this.destType, e4.data), meta: e4.meta });
|
|
12149
|
+
}, t3.exports = s3;
|
|
12150
|
+
}, { "../utils": 32, "./GenericWorker": 28 }], 25: [function(e3, t3, r3) {
|
|
12151
|
+
"use strict";
|
|
12152
|
+
var n3 = e3("./GenericWorker"), i3 = e3("../crc32");
|
|
12153
|
+
function s3() {
|
|
12154
|
+
n3.call(this, "Crc32Probe"), this.withStreamInfo("crc32", 0);
|
|
12155
|
+
}
|
|
12156
|
+
e3("../utils").inherits(s3, n3), s3.prototype.processChunk = function(e4) {
|
|
12157
|
+
this.streamInfo.crc32 = i3(e4.data, this.streamInfo.crc32 || 0), this.push(e4);
|
|
12158
|
+
}, t3.exports = s3;
|
|
12159
|
+
}, { "../crc32": 4, "../utils": 32, "./GenericWorker": 28 }], 26: [function(e3, t3, r3) {
|
|
12160
|
+
"use strict";
|
|
12161
|
+
var n3 = e3("../utils"), i3 = e3("./GenericWorker");
|
|
12162
|
+
function s3(e4) {
|
|
12163
|
+
i3.call(this, "DataLengthProbe for " + e4), this.propName = e4, this.withStreamInfo(e4, 0);
|
|
12164
|
+
}
|
|
12165
|
+
n3.inherits(s3, i3), s3.prototype.processChunk = function(e4) {
|
|
12166
|
+
if (e4) {
|
|
12167
|
+
var t4 = this.streamInfo[this.propName] || 0;
|
|
12168
|
+
this.streamInfo[this.propName] = t4 + e4.data.length;
|
|
12169
|
+
}
|
|
12170
|
+
i3.prototype.processChunk.call(this, e4);
|
|
12171
|
+
}, t3.exports = s3;
|
|
12172
|
+
}, { "../utils": 32, "./GenericWorker": 28 }], 27: [function(e3, t3, r3) {
|
|
12173
|
+
"use strict";
|
|
12174
|
+
var n3 = e3("../utils"), i3 = e3("./GenericWorker");
|
|
12175
|
+
function s3(e4) {
|
|
12176
|
+
i3.call(this, "DataWorker");
|
|
12177
|
+
var t4 = this;
|
|
12178
|
+
this.dataIsReady = false, this.index = 0, this.max = 0, this.data = null, this.type = "", this._tickScheduled = false, e4.then(function(e5) {
|
|
12179
|
+
t4.dataIsReady = true, t4.data = e5, t4.max = e5 && e5.length || 0, t4.type = n3.getTypeOf(e5), t4.isPaused || t4._tickAndRepeat();
|
|
12180
|
+
}, function(e5) {
|
|
12181
|
+
t4.error(e5);
|
|
12182
|
+
});
|
|
12183
|
+
}
|
|
12184
|
+
n3.inherits(s3, i3), s3.prototype.cleanUp = function() {
|
|
12185
|
+
i3.prototype.cleanUp.call(this), this.data = null;
|
|
12186
|
+
}, s3.prototype.resume = function() {
|
|
12187
|
+
return !!i3.prototype.resume.call(this) && (!this._tickScheduled && this.dataIsReady && (this._tickScheduled = true, n3.delay(this._tickAndRepeat, [], this)), true);
|
|
12188
|
+
}, s3.prototype._tickAndRepeat = function() {
|
|
12189
|
+
this._tickScheduled = false, this.isPaused || this.isFinished || (this._tick(), this.isFinished || (n3.delay(this._tickAndRepeat, [], this), this._tickScheduled = true));
|
|
12190
|
+
}, s3.prototype._tick = function() {
|
|
12191
|
+
if (this.isPaused || this.isFinished) return false;
|
|
12192
|
+
var e4 = null, t4 = Math.min(this.max, this.index + 16384);
|
|
12193
|
+
if (this.index >= this.max) return this.end();
|
|
12194
|
+
switch (this.type) {
|
|
12195
|
+
case "string":
|
|
12196
|
+
e4 = this.data.substring(this.index, t4);
|
|
12197
|
+
break;
|
|
12198
|
+
case "uint8array":
|
|
12199
|
+
e4 = this.data.subarray(this.index, t4);
|
|
12200
|
+
break;
|
|
12201
|
+
case "array":
|
|
12202
|
+
case "nodebuffer":
|
|
12203
|
+
e4 = this.data.slice(this.index, t4);
|
|
12204
|
+
}
|
|
12205
|
+
return this.index = t4, this.push({ data: e4, meta: { percent: this.max ? this.index / this.max * 100 : 0 } });
|
|
12206
|
+
}, t3.exports = s3;
|
|
12207
|
+
}, { "../utils": 32, "./GenericWorker": 28 }], 28: [function(e3, t3, r3) {
|
|
12208
|
+
"use strict";
|
|
12209
|
+
function n3(e4) {
|
|
12210
|
+
this.name = e4 || "default", this.streamInfo = {}, this.generatedError = null, this.extraStreamInfo = {}, this.isPaused = true, this.isFinished = false, this.isLocked = false, this._listeners = { data: [], end: [], error: [] }, this.previous = null;
|
|
12211
|
+
}
|
|
12212
|
+
n3.prototype = { push: function(e4) {
|
|
12213
|
+
this.emit("data", e4);
|
|
12214
|
+
}, end: function() {
|
|
12215
|
+
if (this.isFinished) return false;
|
|
12216
|
+
this.flush();
|
|
12217
|
+
try {
|
|
12218
|
+
this.emit("end"), this.cleanUp(), this.isFinished = true;
|
|
12219
|
+
} catch (e4) {
|
|
12220
|
+
this.emit("error", e4);
|
|
12221
|
+
}
|
|
12222
|
+
return true;
|
|
12223
|
+
}, error: function(e4) {
|
|
12224
|
+
return !this.isFinished && (this.isPaused ? this.generatedError = e4 : (this.isFinished = true, this.emit("error", e4), this.previous && this.previous.error(e4), this.cleanUp()), true);
|
|
12225
|
+
}, on: function(e4, t4) {
|
|
12226
|
+
return this._listeners[e4].push(t4), this;
|
|
12227
|
+
}, cleanUp: function() {
|
|
12228
|
+
this.streamInfo = this.generatedError = this.extraStreamInfo = null, this._listeners = [];
|
|
12229
|
+
}, emit: function(e4, t4) {
|
|
12230
|
+
if (this._listeners[e4]) for (var r4 = 0; r4 < this._listeners[e4].length; r4++) this._listeners[e4][r4].call(this, t4);
|
|
12231
|
+
}, pipe: function(e4) {
|
|
12232
|
+
return e4.registerPrevious(this);
|
|
12233
|
+
}, registerPrevious: function(e4) {
|
|
12234
|
+
if (this.isLocked) throw new Error("The stream '" + this + "' has already been used.");
|
|
12235
|
+
this.streamInfo = e4.streamInfo, this.mergeStreamInfo(), this.previous = e4;
|
|
12236
|
+
var t4 = this;
|
|
12237
|
+
return e4.on("data", function(e5) {
|
|
12238
|
+
t4.processChunk(e5);
|
|
12239
|
+
}), e4.on("end", function() {
|
|
12240
|
+
t4.end();
|
|
12241
|
+
}), e4.on("error", function(e5) {
|
|
12242
|
+
t4.error(e5);
|
|
12243
|
+
}), this;
|
|
12244
|
+
}, pause: function() {
|
|
12245
|
+
return !this.isPaused && !this.isFinished && (this.isPaused = true, this.previous && this.previous.pause(), true);
|
|
12246
|
+
}, resume: function() {
|
|
12247
|
+
if (!this.isPaused || this.isFinished) return false;
|
|
12248
|
+
var e4 = this.isPaused = false;
|
|
12249
|
+
return this.generatedError && (this.error(this.generatedError), e4 = true), this.previous && this.previous.resume(), !e4;
|
|
12250
|
+
}, flush: function() {
|
|
12251
|
+
}, processChunk: function(e4) {
|
|
12252
|
+
this.push(e4);
|
|
12253
|
+
}, withStreamInfo: function(e4, t4) {
|
|
12254
|
+
return this.extraStreamInfo[e4] = t4, this.mergeStreamInfo(), this;
|
|
12255
|
+
}, mergeStreamInfo: function() {
|
|
12256
|
+
for (var e4 in this.extraStreamInfo) Object.prototype.hasOwnProperty.call(this.extraStreamInfo, e4) && (this.streamInfo[e4] = this.extraStreamInfo[e4]);
|
|
12257
|
+
}, lock: function() {
|
|
12258
|
+
if (this.isLocked) throw new Error("The stream '" + this + "' has already been used.");
|
|
12259
|
+
this.isLocked = true, this.previous && this.previous.lock();
|
|
12260
|
+
}, toString: function() {
|
|
12261
|
+
var e4 = "Worker " + this.name;
|
|
12262
|
+
return this.previous ? this.previous + " -> " + e4 : e4;
|
|
12263
|
+
} }, t3.exports = n3;
|
|
12264
|
+
}, {}], 29: [function(e3, t3, r3) {
|
|
12265
|
+
"use strict";
|
|
12266
|
+
var h2 = e3("../utils"), i3 = e3("./ConvertWorker"), s3 = e3("./GenericWorker"), u3 = e3("../base64"), n3 = e3("../support"), a3 = e3("../external"), o3 = null;
|
|
12267
|
+
if (n3.nodestream) try {
|
|
12268
|
+
o3 = e3("../nodejs/NodejsStreamOutputAdapter");
|
|
12269
|
+
} catch (e4) {
|
|
12270
|
+
}
|
|
12271
|
+
function l2(e4, o4) {
|
|
12272
|
+
return new a3.Promise(function(t4, r4) {
|
|
12273
|
+
var n4 = [], i4 = e4._internalType, s4 = e4._outputType, a4 = e4._mimeType;
|
|
12274
|
+
e4.on("data", function(e5, t5) {
|
|
12275
|
+
n4.push(e5), o4 && o4(t5);
|
|
12276
|
+
}).on("error", function(e5) {
|
|
12277
|
+
n4 = [], r4(e5);
|
|
12278
|
+
}).on("end", function() {
|
|
12279
|
+
try {
|
|
12280
|
+
var e5 = (function(e6, t5, r5) {
|
|
12281
|
+
switch (e6) {
|
|
12282
|
+
case "blob":
|
|
12283
|
+
return h2.newBlob(h2.transformTo("arraybuffer", t5), r5);
|
|
12284
|
+
case "base64":
|
|
12285
|
+
return u3.encode(t5);
|
|
12286
|
+
default:
|
|
12287
|
+
return h2.transformTo(e6, t5);
|
|
12288
|
+
}
|
|
12289
|
+
})(s4, (function(e6, t5) {
|
|
12290
|
+
var r5, n5 = 0, i5 = null, s5 = 0;
|
|
12291
|
+
for (r5 = 0; r5 < t5.length; r5++) s5 += t5[r5].length;
|
|
12292
|
+
switch (e6) {
|
|
12293
|
+
case "string":
|
|
12294
|
+
return t5.join("");
|
|
12295
|
+
case "array":
|
|
12296
|
+
return Array.prototype.concat.apply([], t5);
|
|
12297
|
+
case "uint8array":
|
|
12298
|
+
for (i5 = new Uint8Array(s5), r5 = 0; r5 < t5.length; r5++) i5.set(t5[r5], n5), n5 += t5[r5].length;
|
|
12299
|
+
return i5;
|
|
12300
|
+
case "nodebuffer":
|
|
12301
|
+
return Buffer.concat(t5);
|
|
12302
|
+
default:
|
|
12303
|
+
throw new Error("concat : unsupported type '" + e6 + "'");
|
|
12304
|
+
}
|
|
12305
|
+
})(i4, n4), a4);
|
|
12306
|
+
t4(e5);
|
|
12307
|
+
} catch (e6) {
|
|
12308
|
+
r4(e6);
|
|
12309
|
+
}
|
|
12310
|
+
n4 = [];
|
|
12311
|
+
}).resume();
|
|
12312
|
+
});
|
|
12313
|
+
}
|
|
12314
|
+
function f(e4, t4, r4) {
|
|
12315
|
+
var n4 = t4;
|
|
12316
|
+
switch (t4) {
|
|
12317
|
+
case "blob":
|
|
12318
|
+
case "arraybuffer":
|
|
12319
|
+
n4 = "uint8array";
|
|
12320
|
+
break;
|
|
12321
|
+
case "base64":
|
|
12322
|
+
n4 = "string";
|
|
12323
|
+
}
|
|
12324
|
+
try {
|
|
12325
|
+
this._internalType = n4, this._outputType = t4, this._mimeType = r4, h2.checkSupport(n4), this._worker = e4.pipe(new i3(n4)), e4.lock();
|
|
12326
|
+
} catch (e5) {
|
|
12327
|
+
this._worker = new s3("error"), this._worker.error(e5);
|
|
12328
|
+
}
|
|
12329
|
+
}
|
|
12330
|
+
f.prototype = { accumulate: function(e4) {
|
|
12331
|
+
return l2(this, e4);
|
|
12332
|
+
}, on: function(e4, t4) {
|
|
12333
|
+
var r4 = this;
|
|
12334
|
+
return "data" === e4 ? this._worker.on(e4, function(e5) {
|
|
12335
|
+
t4.call(r4, e5.data, e5.meta);
|
|
12336
|
+
}) : this._worker.on(e4, function() {
|
|
12337
|
+
h2.delay(t4, arguments, r4);
|
|
12338
|
+
}), this;
|
|
12339
|
+
}, resume: function() {
|
|
12340
|
+
return h2.delay(this._worker.resume, [], this._worker), this;
|
|
12341
|
+
}, pause: function() {
|
|
12342
|
+
return this._worker.pause(), this;
|
|
12343
|
+
}, toNodejsStream: function(e4) {
|
|
12344
|
+
if (h2.checkSupport("nodestream"), "nodebuffer" !== this._outputType) throw new Error(this._outputType + " is not supported by this method");
|
|
12345
|
+
return new o3(this, { objectMode: "nodebuffer" !== this._outputType }, e4);
|
|
12346
|
+
} }, t3.exports = f;
|
|
12347
|
+
}, { "../base64": 1, "../external": 6, "../nodejs/NodejsStreamOutputAdapter": 13, "../support": 30, "../utils": 32, "./ConvertWorker": 24, "./GenericWorker": 28 }], 30: [function(e3, t3, r3) {
|
|
12348
|
+
"use strict";
|
|
12349
|
+
if (r3.base64 = true, r3.array = true, r3.string = true, r3.arraybuffer = "undefined" != typeof ArrayBuffer && "undefined" != typeof Uint8Array, r3.nodebuffer = "undefined" != typeof Buffer, r3.uint8array = "undefined" != typeof Uint8Array, "undefined" == typeof ArrayBuffer) r3.blob = false;
|
|
12350
|
+
else {
|
|
12351
|
+
var n3 = new ArrayBuffer(0);
|
|
12352
|
+
try {
|
|
12353
|
+
r3.blob = 0 === new Blob([n3], { type: "application/zip" }).size;
|
|
12354
|
+
} catch (e4) {
|
|
12355
|
+
try {
|
|
12356
|
+
var i3 = new (self.BlobBuilder || self.WebKitBlobBuilder || self.MozBlobBuilder || self.MSBlobBuilder)();
|
|
12357
|
+
i3.append(n3), r3.blob = 0 === i3.getBlob("application/zip").size;
|
|
12358
|
+
} catch (e5) {
|
|
12359
|
+
r3.blob = false;
|
|
12360
|
+
}
|
|
12361
|
+
}
|
|
12362
|
+
}
|
|
12363
|
+
try {
|
|
12364
|
+
r3.nodestream = !!e3("readable-stream").Readable;
|
|
12365
|
+
} catch (e4) {
|
|
12366
|
+
r3.nodestream = false;
|
|
12367
|
+
}
|
|
12368
|
+
}, { "readable-stream": 16 }], 31: [function(e3, t3, s3) {
|
|
12369
|
+
"use strict";
|
|
12370
|
+
for (var o3 = e3("./utils"), h2 = e3("./support"), r3 = e3("./nodejsUtils"), n3 = e3("./stream/GenericWorker"), u3 = new Array(256), i3 = 0; i3 < 256; i3++) u3[i3] = 252 <= i3 ? 6 : 248 <= i3 ? 5 : 240 <= i3 ? 4 : 224 <= i3 ? 3 : 192 <= i3 ? 2 : 1;
|
|
12371
|
+
u3[254] = u3[254] = 1;
|
|
12372
|
+
function a3() {
|
|
12373
|
+
n3.call(this, "utf-8 decode"), this.leftOver = null;
|
|
12374
|
+
}
|
|
12375
|
+
function l2() {
|
|
12376
|
+
n3.call(this, "utf-8 encode");
|
|
12377
|
+
}
|
|
12378
|
+
s3.utf8encode = function(e4) {
|
|
12379
|
+
return h2.nodebuffer ? r3.newBufferFrom(e4, "utf-8") : (function(e5) {
|
|
12380
|
+
var t4, r4, n4, i4, s4, a4 = e5.length, o4 = 0;
|
|
12381
|
+
for (i4 = 0; i4 < a4; i4++) 55296 == (64512 & (r4 = e5.charCodeAt(i4))) && i4 + 1 < a4 && 56320 == (64512 & (n4 = e5.charCodeAt(i4 + 1))) && (r4 = 65536 + (r4 - 55296 << 10) + (n4 - 56320), i4++), o4 += r4 < 128 ? 1 : r4 < 2048 ? 2 : r4 < 65536 ? 3 : 4;
|
|
12382
|
+
for (t4 = h2.uint8array ? new Uint8Array(o4) : new Array(o4), i4 = s4 = 0; s4 < o4; i4++) 55296 == (64512 & (r4 = e5.charCodeAt(i4))) && i4 + 1 < a4 && 56320 == (64512 & (n4 = e5.charCodeAt(i4 + 1))) && (r4 = 65536 + (r4 - 55296 << 10) + (n4 - 56320), i4++), r4 < 128 ? t4[s4++] = r4 : (r4 < 2048 ? t4[s4++] = 192 | r4 >>> 6 : (r4 < 65536 ? t4[s4++] = 224 | r4 >>> 12 : (t4[s4++] = 240 | r4 >>> 18, t4[s4++] = 128 | r4 >>> 12 & 63), t4[s4++] = 128 | r4 >>> 6 & 63), t4[s4++] = 128 | 63 & r4);
|
|
12383
|
+
return t4;
|
|
12384
|
+
})(e4);
|
|
12385
|
+
}, s3.utf8decode = function(e4) {
|
|
12386
|
+
return h2.nodebuffer ? o3.transformTo("nodebuffer", e4).toString("utf-8") : (function(e5) {
|
|
12387
|
+
var t4, r4, n4, i4, s4 = e5.length, a4 = new Array(2 * s4);
|
|
12388
|
+
for (t4 = r4 = 0; t4 < s4; ) if ((n4 = e5[t4++]) < 128) a4[r4++] = n4;
|
|
12389
|
+
else if (4 < (i4 = u3[n4])) a4[r4++] = 65533, t4 += i4 - 1;
|
|
12390
|
+
else {
|
|
12391
|
+
for (n4 &= 2 === i4 ? 31 : 3 === i4 ? 15 : 7; 1 < i4 && t4 < s4; ) n4 = n4 << 6 | 63 & e5[t4++], i4--;
|
|
12392
|
+
1 < i4 ? a4[r4++] = 65533 : n4 < 65536 ? a4[r4++] = n4 : (n4 -= 65536, a4[r4++] = 55296 | n4 >> 10 & 1023, a4[r4++] = 56320 | 1023 & n4);
|
|
12393
|
+
}
|
|
12394
|
+
return a4.length !== r4 && (a4.subarray ? a4 = a4.subarray(0, r4) : a4.length = r4), o3.applyFromCharCode(a4);
|
|
12395
|
+
})(e4 = o3.transformTo(h2.uint8array ? "uint8array" : "array", e4));
|
|
12396
|
+
}, o3.inherits(a3, n3), a3.prototype.processChunk = function(e4) {
|
|
12397
|
+
var t4 = o3.transformTo(h2.uint8array ? "uint8array" : "array", e4.data);
|
|
12398
|
+
if (this.leftOver && this.leftOver.length) {
|
|
12399
|
+
if (h2.uint8array) {
|
|
12400
|
+
var r4 = t4;
|
|
12401
|
+
(t4 = new Uint8Array(r4.length + this.leftOver.length)).set(this.leftOver, 0), t4.set(r4, this.leftOver.length);
|
|
12402
|
+
} else t4 = this.leftOver.concat(t4);
|
|
12403
|
+
this.leftOver = null;
|
|
12404
|
+
}
|
|
12405
|
+
var n4 = (function(e5, t5) {
|
|
12406
|
+
var r5;
|
|
12407
|
+
for ((t5 = t5 || e5.length) > e5.length && (t5 = e5.length), r5 = t5 - 1; 0 <= r5 && 128 == (192 & e5[r5]); ) r5--;
|
|
12408
|
+
return r5 < 0 ? t5 : 0 === r5 ? t5 : r5 + u3[e5[r5]] > t5 ? r5 : t5;
|
|
12409
|
+
})(t4), i4 = t4;
|
|
12410
|
+
n4 !== t4.length && (h2.uint8array ? (i4 = t4.subarray(0, n4), this.leftOver = t4.subarray(n4, t4.length)) : (i4 = t4.slice(0, n4), this.leftOver = t4.slice(n4, t4.length))), this.push({ data: s3.utf8decode(i4), meta: e4.meta });
|
|
12411
|
+
}, a3.prototype.flush = function() {
|
|
12412
|
+
this.leftOver && this.leftOver.length && (this.push({ data: s3.utf8decode(this.leftOver), meta: {} }), this.leftOver = null);
|
|
12413
|
+
}, s3.Utf8DecodeWorker = a3, o3.inherits(l2, n3), l2.prototype.processChunk = function(e4) {
|
|
12414
|
+
this.push({ data: s3.utf8encode(e4.data), meta: e4.meta });
|
|
12415
|
+
}, s3.Utf8EncodeWorker = l2;
|
|
12416
|
+
}, { "./nodejsUtils": 14, "./stream/GenericWorker": 28, "./support": 30, "./utils": 32 }], 32: [function(e3, t3, a3) {
|
|
12417
|
+
"use strict";
|
|
12418
|
+
var o3 = e3("./support"), h2 = e3("./base64"), r3 = e3("./nodejsUtils"), u3 = e3("./external");
|
|
12419
|
+
function n3(e4) {
|
|
12420
|
+
return e4;
|
|
12421
|
+
}
|
|
12422
|
+
function l2(e4, t4) {
|
|
12423
|
+
for (var r4 = 0; r4 < e4.length; ++r4) t4[r4] = 255 & e4.charCodeAt(r4);
|
|
12424
|
+
return t4;
|
|
12425
|
+
}
|
|
12426
|
+
e3("setimmediate"), a3.newBlob = function(t4, r4) {
|
|
12427
|
+
a3.checkSupport("blob");
|
|
12428
|
+
try {
|
|
12429
|
+
return new Blob([t4], { type: r4 });
|
|
12430
|
+
} catch (e4) {
|
|
12431
|
+
try {
|
|
12432
|
+
var n4 = new (self.BlobBuilder || self.WebKitBlobBuilder || self.MozBlobBuilder || self.MSBlobBuilder)();
|
|
12433
|
+
return n4.append(t4), n4.getBlob(r4);
|
|
12434
|
+
} catch (e5) {
|
|
12435
|
+
throw new Error("Bug : can't construct the Blob.");
|
|
12436
|
+
}
|
|
12437
|
+
}
|
|
12438
|
+
};
|
|
12439
|
+
var i3 = { stringifyByChunk: function(e4, t4, r4) {
|
|
12440
|
+
var n4 = [], i4 = 0, s4 = e4.length;
|
|
12441
|
+
if (s4 <= r4) return String.fromCharCode.apply(null, e4);
|
|
12442
|
+
for (; i4 < s4; ) "array" === t4 || "nodebuffer" === t4 ? n4.push(String.fromCharCode.apply(null, e4.slice(i4, Math.min(i4 + r4, s4)))) : n4.push(String.fromCharCode.apply(null, e4.subarray(i4, Math.min(i4 + r4, s4)))), i4 += r4;
|
|
12443
|
+
return n4.join("");
|
|
12444
|
+
}, stringifyByChar: function(e4) {
|
|
12445
|
+
for (var t4 = "", r4 = 0; r4 < e4.length; r4++) t4 += String.fromCharCode(e4[r4]);
|
|
12446
|
+
return t4;
|
|
12447
|
+
}, applyCanBeUsed: { uint8array: (function() {
|
|
12448
|
+
try {
|
|
12449
|
+
return o3.uint8array && 1 === String.fromCharCode.apply(null, new Uint8Array(1)).length;
|
|
12450
|
+
} catch (e4) {
|
|
12451
|
+
return false;
|
|
12452
|
+
}
|
|
12453
|
+
})(), nodebuffer: (function() {
|
|
12454
|
+
try {
|
|
12455
|
+
return o3.nodebuffer && 1 === String.fromCharCode.apply(null, r3.allocBuffer(1)).length;
|
|
12456
|
+
} catch (e4) {
|
|
12457
|
+
return false;
|
|
12458
|
+
}
|
|
12459
|
+
})() } };
|
|
12460
|
+
function s3(e4) {
|
|
12461
|
+
var t4 = 65536, r4 = a3.getTypeOf(e4), n4 = true;
|
|
12462
|
+
if ("uint8array" === r4 ? n4 = i3.applyCanBeUsed.uint8array : "nodebuffer" === r4 && (n4 = i3.applyCanBeUsed.nodebuffer), n4) for (; 1 < t4; ) try {
|
|
12463
|
+
return i3.stringifyByChunk(e4, r4, t4);
|
|
12464
|
+
} catch (e5) {
|
|
12465
|
+
t4 = Math.floor(t4 / 2);
|
|
12466
|
+
}
|
|
12467
|
+
return i3.stringifyByChar(e4);
|
|
12468
|
+
}
|
|
12469
|
+
function f(e4, t4) {
|
|
12470
|
+
for (var r4 = 0; r4 < e4.length; r4++) t4[r4] = e4[r4];
|
|
12471
|
+
return t4;
|
|
12472
|
+
}
|
|
12473
|
+
a3.applyFromCharCode = s3;
|
|
12474
|
+
var c3 = {};
|
|
12475
|
+
c3.string = { string: n3, array: function(e4) {
|
|
12476
|
+
return l2(e4, new Array(e4.length));
|
|
12477
|
+
}, arraybuffer: function(e4) {
|
|
12478
|
+
return c3.string.uint8array(e4).buffer;
|
|
12479
|
+
}, uint8array: function(e4) {
|
|
12480
|
+
return l2(e4, new Uint8Array(e4.length));
|
|
12481
|
+
}, nodebuffer: function(e4) {
|
|
12482
|
+
return l2(e4, r3.allocBuffer(e4.length));
|
|
12483
|
+
} }, c3.array = { string: s3, array: n3, arraybuffer: function(e4) {
|
|
12484
|
+
return new Uint8Array(e4).buffer;
|
|
12485
|
+
}, uint8array: function(e4) {
|
|
12486
|
+
return new Uint8Array(e4);
|
|
12487
|
+
}, nodebuffer: function(e4) {
|
|
12488
|
+
return r3.newBufferFrom(e4);
|
|
12489
|
+
} }, c3.arraybuffer = { string: function(e4) {
|
|
12490
|
+
return s3(new Uint8Array(e4));
|
|
12491
|
+
}, array: function(e4) {
|
|
12492
|
+
return f(new Uint8Array(e4), new Array(e4.byteLength));
|
|
12493
|
+
}, arraybuffer: n3, uint8array: function(e4) {
|
|
12494
|
+
return new Uint8Array(e4);
|
|
12495
|
+
}, nodebuffer: function(e4) {
|
|
12496
|
+
return r3.newBufferFrom(new Uint8Array(e4));
|
|
12497
|
+
} }, c3.uint8array = { string: s3, array: function(e4) {
|
|
12498
|
+
return f(e4, new Array(e4.length));
|
|
12499
|
+
}, arraybuffer: function(e4) {
|
|
12500
|
+
return e4.buffer;
|
|
12501
|
+
}, uint8array: n3, nodebuffer: function(e4) {
|
|
12502
|
+
return r3.newBufferFrom(e4);
|
|
12503
|
+
} }, c3.nodebuffer = { string: s3, array: function(e4) {
|
|
12504
|
+
return f(e4, new Array(e4.length));
|
|
12505
|
+
}, arraybuffer: function(e4) {
|
|
12506
|
+
return c3.nodebuffer.uint8array(e4).buffer;
|
|
12507
|
+
}, uint8array: function(e4) {
|
|
12508
|
+
return f(e4, new Uint8Array(e4.length));
|
|
12509
|
+
}, nodebuffer: n3 }, a3.transformTo = function(e4, t4) {
|
|
12510
|
+
if (t4 = t4 || "", !e4) return t4;
|
|
12511
|
+
a3.checkSupport(e4);
|
|
12512
|
+
var r4 = a3.getTypeOf(t4);
|
|
12513
|
+
return c3[r4][e4](t4);
|
|
12514
|
+
}, a3.resolve = function(e4) {
|
|
12515
|
+
for (var t4 = e4.split("/"), r4 = [], n4 = 0; n4 < t4.length; n4++) {
|
|
12516
|
+
var i4 = t4[n4];
|
|
12517
|
+
"." === i4 || "" === i4 && 0 !== n4 && n4 !== t4.length - 1 || (".." === i4 ? r4.pop() : r4.push(i4));
|
|
12518
|
+
}
|
|
12519
|
+
return r4.join("/");
|
|
12520
|
+
}, a3.getTypeOf = function(e4) {
|
|
12521
|
+
return "string" == typeof e4 ? "string" : "[object Array]" === Object.prototype.toString.call(e4) ? "array" : o3.nodebuffer && r3.isBuffer(e4) ? "nodebuffer" : o3.uint8array && e4 instanceof Uint8Array ? "uint8array" : o3.arraybuffer && e4 instanceof ArrayBuffer ? "arraybuffer" : void 0;
|
|
12522
|
+
}, a3.checkSupport = function(e4) {
|
|
12523
|
+
if (!o3[e4.toLowerCase()]) throw new Error(e4 + " is not supported by this platform");
|
|
12524
|
+
}, a3.MAX_VALUE_16BITS = 65535, a3.MAX_VALUE_32BITS = -1, a3.pretty = function(e4) {
|
|
12525
|
+
var t4, r4, n4 = "";
|
|
12526
|
+
for (r4 = 0; r4 < (e4 || "").length; r4++) n4 += "\\x" + ((t4 = e4.charCodeAt(r4)) < 16 ? "0" : "") + t4.toString(16).toUpperCase();
|
|
12527
|
+
return n4;
|
|
12528
|
+
}, a3.delay = function(e4, t4, r4) {
|
|
12529
|
+
setImmediate(function() {
|
|
12530
|
+
e4.apply(r4 || null, t4 || []);
|
|
12531
|
+
});
|
|
12532
|
+
}, a3.inherits = function(e4, t4) {
|
|
12533
|
+
function r4() {
|
|
12534
|
+
}
|
|
12535
|
+
r4.prototype = t4.prototype, e4.prototype = new r4();
|
|
12536
|
+
}, a3.extend = function() {
|
|
12537
|
+
var e4, t4, r4 = {};
|
|
12538
|
+
for (e4 = 0; e4 < arguments.length; e4++) for (t4 in arguments[e4]) Object.prototype.hasOwnProperty.call(arguments[e4], t4) && void 0 === r4[t4] && (r4[t4] = arguments[e4][t4]);
|
|
12539
|
+
return r4;
|
|
12540
|
+
}, a3.prepareContent = function(r4, e4, n4, i4, s4) {
|
|
12541
|
+
return u3.Promise.resolve(e4).then(function(n5) {
|
|
12542
|
+
return o3.blob && (n5 instanceof Blob || -1 !== ["[object File]", "[object Blob]"].indexOf(Object.prototype.toString.call(n5))) && "undefined" != typeof FileReader ? new u3.Promise(function(t4, r5) {
|
|
12543
|
+
var e5 = new FileReader();
|
|
12544
|
+
e5.onload = function(e6) {
|
|
12545
|
+
t4(e6.target.result);
|
|
12546
|
+
}, e5.onerror = function(e6) {
|
|
12547
|
+
r5(e6.target.error);
|
|
12548
|
+
}, e5.readAsArrayBuffer(n5);
|
|
12549
|
+
}) : n5;
|
|
12550
|
+
}).then(function(e5) {
|
|
12551
|
+
var t4 = a3.getTypeOf(e5);
|
|
12552
|
+
return t4 ? ("arraybuffer" === t4 ? e5 = a3.transformTo("uint8array", e5) : "string" === t4 && (s4 ? e5 = h2.decode(e5) : n4 && true !== i4 && (e5 = (function(e6) {
|
|
12553
|
+
return l2(e6, o3.uint8array ? new Uint8Array(e6.length) : new Array(e6.length));
|
|
12554
|
+
})(e5))), e5) : u3.Promise.reject(new Error("Can't read the data of '" + r4 + "'. Is it in a supported JavaScript type (String, Blob, ArrayBuffer, etc) ?"));
|
|
12555
|
+
});
|
|
12556
|
+
};
|
|
12557
|
+
}, { "./base64": 1, "./external": 6, "./nodejsUtils": 14, "./support": 30, setimmediate: 54 }], 33: [function(e3, t3, r3) {
|
|
12558
|
+
"use strict";
|
|
12559
|
+
var n3 = e3("./reader/readerFor"), i3 = e3("./utils"), s3 = e3("./signature"), a3 = e3("./zipEntry"), o3 = e3("./support");
|
|
12560
|
+
function h2(e4) {
|
|
12561
|
+
this.files = [], this.loadOptions = e4;
|
|
12562
|
+
}
|
|
12563
|
+
h2.prototype = { checkSignature: function(e4) {
|
|
12564
|
+
if (!this.reader.readAndCheckSignature(e4)) {
|
|
12565
|
+
this.reader.index -= 4;
|
|
12566
|
+
var t4 = this.reader.readString(4);
|
|
12567
|
+
throw new Error("Corrupted zip or bug: unexpected signature (" + i3.pretty(t4) + ", expected " + i3.pretty(e4) + ")");
|
|
12568
|
+
}
|
|
12569
|
+
}, isSignature: function(e4, t4) {
|
|
12570
|
+
var r4 = this.reader.index;
|
|
12571
|
+
this.reader.setIndex(e4);
|
|
12572
|
+
var n4 = this.reader.readString(4) === t4;
|
|
12573
|
+
return this.reader.setIndex(r4), n4;
|
|
12574
|
+
}, readBlockEndOfCentral: function() {
|
|
12575
|
+
this.diskNumber = this.reader.readInt(2), this.diskWithCentralDirStart = this.reader.readInt(2), this.centralDirRecordsOnThisDisk = this.reader.readInt(2), this.centralDirRecords = this.reader.readInt(2), this.centralDirSize = this.reader.readInt(4), this.centralDirOffset = this.reader.readInt(4), this.zipCommentLength = this.reader.readInt(2);
|
|
12576
|
+
var e4 = this.reader.readData(this.zipCommentLength), t4 = o3.uint8array ? "uint8array" : "array", r4 = i3.transformTo(t4, e4);
|
|
12577
|
+
this.zipComment = this.loadOptions.decodeFileName(r4);
|
|
12578
|
+
}, readBlockZip64EndOfCentral: function() {
|
|
12579
|
+
this.zip64EndOfCentralSize = this.reader.readInt(8), this.reader.skip(4), this.diskNumber = this.reader.readInt(4), this.diskWithCentralDirStart = this.reader.readInt(4), this.centralDirRecordsOnThisDisk = this.reader.readInt(8), this.centralDirRecords = this.reader.readInt(8), this.centralDirSize = this.reader.readInt(8), this.centralDirOffset = this.reader.readInt(8), this.zip64ExtensibleData = {};
|
|
12580
|
+
for (var e4, t4, r4, n4 = this.zip64EndOfCentralSize - 44; 0 < n4; ) e4 = this.reader.readInt(2), t4 = this.reader.readInt(4), r4 = this.reader.readData(t4), this.zip64ExtensibleData[e4] = { id: e4, length: t4, value: r4 };
|
|
12581
|
+
}, readBlockZip64EndOfCentralLocator: function() {
|
|
12582
|
+
if (this.diskWithZip64CentralDirStart = this.reader.readInt(4), this.relativeOffsetEndOfZip64CentralDir = this.reader.readInt(8), this.disksCount = this.reader.readInt(4), 1 < this.disksCount) throw new Error("Multi-volumes zip are not supported");
|
|
12583
|
+
}, readLocalFiles: function() {
|
|
12584
|
+
var e4, t4;
|
|
12585
|
+
for (e4 = 0; e4 < this.files.length; e4++) t4 = this.files[e4], this.reader.setIndex(t4.localHeaderOffset), this.checkSignature(s3.LOCAL_FILE_HEADER), t4.readLocalPart(this.reader), t4.handleUTF8(), t4.processAttributes();
|
|
12586
|
+
}, readCentralDir: function() {
|
|
12587
|
+
var e4;
|
|
12588
|
+
for (this.reader.setIndex(this.centralDirOffset); this.reader.readAndCheckSignature(s3.CENTRAL_FILE_HEADER); ) (e4 = new a3({ zip64: this.zip64 }, this.loadOptions)).readCentralPart(this.reader), this.files.push(e4);
|
|
12589
|
+
if (this.centralDirRecords !== this.files.length && 0 !== this.centralDirRecords && 0 === this.files.length) throw new Error("Corrupted zip or bug: expected " + this.centralDirRecords + " records in central dir, got " + this.files.length);
|
|
12590
|
+
}, readEndOfCentral: function() {
|
|
12591
|
+
var e4 = this.reader.lastIndexOfSignature(s3.CENTRAL_DIRECTORY_END);
|
|
12592
|
+
if (e4 < 0) throw !this.isSignature(0, s3.LOCAL_FILE_HEADER) ? new Error("Can't find end of central directory : is this a zip file ? If it is, see https://stuk.github.io/jszip/documentation/howto/read_zip.html") : new Error("Corrupted zip: can't find end of central directory");
|
|
12593
|
+
this.reader.setIndex(e4);
|
|
12594
|
+
var t4 = e4;
|
|
12595
|
+
if (this.checkSignature(s3.CENTRAL_DIRECTORY_END), this.readBlockEndOfCentral(), this.diskNumber === i3.MAX_VALUE_16BITS || this.diskWithCentralDirStart === i3.MAX_VALUE_16BITS || this.centralDirRecordsOnThisDisk === i3.MAX_VALUE_16BITS || this.centralDirRecords === i3.MAX_VALUE_16BITS || this.centralDirSize === i3.MAX_VALUE_32BITS || this.centralDirOffset === i3.MAX_VALUE_32BITS) {
|
|
12596
|
+
if (this.zip64 = true, (e4 = this.reader.lastIndexOfSignature(s3.ZIP64_CENTRAL_DIRECTORY_LOCATOR)) < 0) throw new Error("Corrupted zip: can't find the ZIP64 end of central directory locator");
|
|
12597
|
+
if (this.reader.setIndex(e4), this.checkSignature(s3.ZIP64_CENTRAL_DIRECTORY_LOCATOR), this.readBlockZip64EndOfCentralLocator(), !this.isSignature(this.relativeOffsetEndOfZip64CentralDir, s3.ZIP64_CENTRAL_DIRECTORY_END) && (this.relativeOffsetEndOfZip64CentralDir = this.reader.lastIndexOfSignature(s3.ZIP64_CENTRAL_DIRECTORY_END), this.relativeOffsetEndOfZip64CentralDir < 0)) throw new Error("Corrupted zip: can't find the ZIP64 end of central directory");
|
|
12598
|
+
this.reader.setIndex(this.relativeOffsetEndOfZip64CentralDir), this.checkSignature(s3.ZIP64_CENTRAL_DIRECTORY_END), this.readBlockZip64EndOfCentral();
|
|
12599
|
+
}
|
|
12600
|
+
var r4 = this.centralDirOffset + this.centralDirSize;
|
|
12601
|
+
this.zip64 && (r4 += 20, r4 += 12 + this.zip64EndOfCentralSize);
|
|
12602
|
+
var n4 = t4 - r4;
|
|
12603
|
+
if (0 < n4) this.isSignature(t4, s3.CENTRAL_FILE_HEADER) || (this.reader.zero = n4);
|
|
12604
|
+
else if (n4 < 0) throw new Error("Corrupted zip: missing " + Math.abs(n4) + " bytes.");
|
|
12605
|
+
}, prepareReader: function(e4) {
|
|
12606
|
+
this.reader = n3(e4);
|
|
12607
|
+
}, load: function(e4) {
|
|
12608
|
+
this.prepareReader(e4), this.readEndOfCentral(), this.readCentralDir(), this.readLocalFiles();
|
|
12609
|
+
} }, t3.exports = h2;
|
|
12610
|
+
}, { "./reader/readerFor": 22, "./signature": 23, "./support": 30, "./utils": 32, "./zipEntry": 34 }], 34: [function(e3, t3, r3) {
|
|
12611
|
+
"use strict";
|
|
12612
|
+
var n3 = e3("./reader/readerFor"), s3 = e3("./utils"), i3 = e3("./compressedObject"), a3 = e3("./crc32"), o3 = e3("./utf8"), h2 = e3("./compressions"), u3 = e3("./support");
|
|
12613
|
+
function l2(e4, t4) {
|
|
12614
|
+
this.options = e4, this.loadOptions = t4;
|
|
12615
|
+
}
|
|
12616
|
+
l2.prototype = { isEncrypted: function() {
|
|
12617
|
+
return 1 == (1 & this.bitFlag);
|
|
12618
|
+
}, useUTF8: function() {
|
|
12619
|
+
return 2048 == (2048 & this.bitFlag);
|
|
12620
|
+
}, readLocalPart: function(e4) {
|
|
12621
|
+
var t4, r4;
|
|
12622
|
+
if (e4.skip(22), this.fileNameLength = e4.readInt(2), r4 = e4.readInt(2), this.fileName = e4.readData(this.fileNameLength), e4.skip(r4), -1 === this.compressedSize || -1 === this.uncompressedSize) throw new Error("Bug or corrupted zip : didn't get enough information from the central directory (compressedSize === -1 || uncompressedSize === -1)");
|
|
12623
|
+
if (null === (t4 = (function(e5) {
|
|
12624
|
+
for (var t5 in h2) if (Object.prototype.hasOwnProperty.call(h2, t5) && h2[t5].magic === e5) return h2[t5];
|
|
12625
|
+
return null;
|
|
12626
|
+
})(this.compressionMethod))) throw new Error("Corrupted zip : compression " + s3.pretty(this.compressionMethod) + " unknown (inner file : " + s3.transformTo("string", this.fileName) + ")");
|
|
12627
|
+
this.decompressed = new i3(this.compressedSize, this.uncompressedSize, this.crc32, t4, e4.readData(this.compressedSize));
|
|
12628
|
+
}, readCentralPart: function(e4) {
|
|
12629
|
+
this.versionMadeBy = e4.readInt(2), e4.skip(2), this.bitFlag = e4.readInt(2), this.compressionMethod = e4.readString(2), this.date = e4.readDate(), this.crc32 = e4.readInt(4), this.compressedSize = e4.readInt(4), this.uncompressedSize = e4.readInt(4);
|
|
12630
|
+
var t4 = e4.readInt(2);
|
|
12631
|
+
if (this.extraFieldsLength = e4.readInt(2), this.fileCommentLength = e4.readInt(2), this.diskNumberStart = e4.readInt(2), this.internalFileAttributes = e4.readInt(2), this.externalFileAttributes = e4.readInt(4), this.localHeaderOffset = e4.readInt(4), this.isEncrypted()) throw new Error("Encrypted zip are not supported");
|
|
12632
|
+
e4.skip(t4), this.readExtraFields(e4), this.parseZIP64ExtraField(e4), this.fileComment = e4.readData(this.fileCommentLength);
|
|
12633
|
+
}, processAttributes: function() {
|
|
12634
|
+
this.unixPermissions = null, this.dosPermissions = null;
|
|
12635
|
+
var e4 = this.versionMadeBy >> 8;
|
|
12636
|
+
this.dir = !!(16 & this.externalFileAttributes), 0 == e4 && (this.dosPermissions = 63 & this.externalFileAttributes), 3 == e4 && (this.unixPermissions = this.externalFileAttributes >> 16 & 65535), this.dir || "/" !== this.fileNameStr.slice(-1) || (this.dir = true);
|
|
12637
|
+
}, parseZIP64ExtraField: function() {
|
|
12638
|
+
if (this.extraFields[1]) {
|
|
12639
|
+
var e4 = n3(this.extraFields[1].value);
|
|
12640
|
+
this.uncompressedSize === s3.MAX_VALUE_32BITS && (this.uncompressedSize = e4.readInt(8)), this.compressedSize === s3.MAX_VALUE_32BITS && (this.compressedSize = e4.readInt(8)), this.localHeaderOffset === s3.MAX_VALUE_32BITS && (this.localHeaderOffset = e4.readInt(8)), this.diskNumberStart === s3.MAX_VALUE_32BITS && (this.diskNumberStart = e4.readInt(4));
|
|
12641
|
+
}
|
|
12642
|
+
}, readExtraFields: function(e4) {
|
|
12643
|
+
var t4, r4, n4, i4 = e4.index + this.extraFieldsLength;
|
|
12644
|
+
for (this.extraFields || (this.extraFields = {}); e4.index + 4 < i4; ) t4 = e4.readInt(2), r4 = e4.readInt(2), n4 = e4.readData(r4), this.extraFields[t4] = { id: t4, length: r4, value: n4 };
|
|
12645
|
+
e4.setIndex(i4);
|
|
12646
|
+
}, handleUTF8: function() {
|
|
12647
|
+
var e4 = u3.uint8array ? "uint8array" : "array";
|
|
12648
|
+
if (this.useUTF8()) this.fileNameStr = o3.utf8decode(this.fileName), this.fileCommentStr = o3.utf8decode(this.fileComment);
|
|
12649
|
+
else {
|
|
12650
|
+
var t4 = this.findExtraFieldUnicodePath();
|
|
12651
|
+
if (null !== t4) this.fileNameStr = t4;
|
|
12652
|
+
else {
|
|
12653
|
+
var r4 = s3.transformTo(e4, this.fileName);
|
|
12654
|
+
this.fileNameStr = this.loadOptions.decodeFileName(r4);
|
|
12655
|
+
}
|
|
12656
|
+
var n4 = this.findExtraFieldUnicodeComment();
|
|
12657
|
+
if (null !== n4) this.fileCommentStr = n4;
|
|
12658
|
+
else {
|
|
12659
|
+
var i4 = s3.transformTo(e4, this.fileComment);
|
|
12660
|
+
this.fileCommentStr = this.loadOptions.decodeFileName(i4);
|
|
12661
|
+
}
|
|
12662
|
+
}
|
|
12663
|
+
}, findExtraFieldUnicodePath: function() {
|
|
12664
|
+
var e4 = this.extraFields[28789];
|
|
12665
|
+
if (e4) {
|
|
12666
|
+
var t4 = n3(e4.value);
|
|
12667
|
+
return 1 !== t4.readInt(1) ? null : a3(this.fileName) !== t4.readInt(4) ? null : o3.utf8decode(t4.readData(e4.length - 5));
|
|
12668
|
+
}
|
|
12669
|
+
return null;
|
|
12670
|
+
}, findExtraFieldUnicodeComment: function() {
|
|
12671
|
+
var e4 = this.extraFields[25461];
|
|
12672
|
+
if (e4) {
|
|
12673
|
+
var t4 = n3(e4.value);
|
|
12674
|
+
return 1 !== t4.readInt(1) ? null : a3(this.fileComment) !== t4.readInt(4) ? null : o3.utf8decode(t4.readData(e4.length - 5));
|
|
12675
|
+
}
|
|
12676
|
+
return null;
|
|
12677
|
+
} }, t3.exports = l2;
|
|
12678
|
+
}, { "./compressedObject": 2, "./compressions": 3, "./crc32": 4, "./reader/readerFor": 22, "./support": 30, "./utf8": 31, "./utils": 32 }], 35: [function(e3, t3, r3) {
|
|
12679
|
+
"use strict";
|
|
12680
|
+
function n3(e4, t4, r4) {
|
|
12681
|
+
this.name = e4, this.dir = r4.dir, this.date = r4.date, this.comment = r4.comment, this.unixPermissions = r4.unixPermissions, this.dosPermissions = r4.dosPermissions, this._data = t4, this._dataBinary = r4.binary, this.options = { compression: r4.compression, compressionOptions: r4.compressionOptions };
|
|
12682
|
+
}
|
|
12683
|
+
var s3 = e3("./stream/StreamHelper"), i3 = e3("./stream/DataWorker"), a3 = e3("./utf8"), o3 = e3("./compressedObject"), h2 = e3("./stream/GenericWorker");
|
|
12684
|
+
n3.prototype = { internalStream: function(e4) {
|
|
12685
|
+
var t4 = null, r4 = "string";
|
|
12686
|
+
try {
|
|
12687
|
+
if (!e4) throw new Error("No output type specified.");
|
|
12688
|
+
var n4 = "string" === (r4 = e4.toLowerCase()) || "text" === r4;
|
|
12689
|
+
"binarystring" !== r4 && "text" !== r4 || (r4 = "string"), t4 = this._decompressWorker();
|
|
12690
|
+
var i4 = !this._dataBinary;
|
|
12691
|
+
i4 && !n4 && (t4 = t4.pipe(new a3.Utf8EncodeWorker())), !i4 && n4 && (t4 = t4.pipe(new a3.Utf8DecodeWorker()));
|
|
12692
|
+
} catch (e5) {
|
|
12693
|
+
(t4 = new h2("error")).error(e5);
|
|
12694
|
+
}
|
|
12695
|
+
return new s3(t4, r4, "");
|
|
12696
|
+
}, async: function(e4, t4) {
|
|
12697
|
+
return this.internalStream(e4).accumulate(t4);
|
|
12698
|
+
}, nodeStream: function(e4, t4) {
|
|
12699
|
+
return this.internalStream(e4 || "nodebuffer").toNodejsStream(t4);
|
|
12700
|
+
}, _compressWorker: function(e4, t4) {
|
|
12701
|
+
if (this._data instanceof o3 && this._data.compression.magic === e4.magic) return this._data.getCompressedWorker();
|
|
12702
|
+
var r4 = this._decompressWorker();
|
|
12703
|
+
return this._dataBinary || (r4 = r4.pipe(new a3.Utf8EncodeWorker())), o3.createWorkerFrom(r4, e4, t4);
|
|
12704
|
+
}, _decompressWorker: function() {
|
|
12705
|
+
return this._data instanceof o3 ? this._data.getContentWorker() : this._data instanceof h2 ? this._data : new i3(this._data);
|
|
12706
|
+
} };
|
|
12707
|
+
for (var u3 = ["asText", "asBinary", "asNodeBuffer", "asUint8Array", "asArrayBuffer"], l2 = function() {
|
|
12708
|
+
throw new Error("This method has been removed in JSZip 3.0, please check the upgrade guide.");
|
|
12709
|
+
}, f = 0; f < u3.length; f++) n3.prototype[u3[f]] = l2;
|
|
12710
|
+
t3.exports = n3;
|
|
12711
|
+
}, { "./compressedObject": 2, "./stream/DataWorker": 27, "./stream/GenericWorker": 28, "./stream/StreamHelper": 29, "./utf8": 31 }], 36: [function(e3, l2, t3) {
|
|
12712
|
+
(function(t4) {
|
|
12713
|
+
"use strict";
|
|
12714
|
+
var r3, n3, e4 = t4.MutationObserver || t4.WebKitMutationObserver;
|
|
12715
|
+
if (e4) {
|
|
12716
|
+
var i3 = 0, s3 = new e4(u3), a3 = t4.document.createTextNode("");
|
|
12717
|
+
s3.observe(a3, { characterData: true }), r3 = function() {
|
|
12718
|
+
a3.data = i3 = ++i3 % 2;
|
|
12719
|
+
};
|
|
12720
|
+
} else if (t4.setImmediate || void 0 === t4.MessageChannel) r3 = "document" in t4 && "onreadystatechange" in t4.document.createElement("script") ? function() {
|
|
12721
|
+
var e5 = t4.document.createElement("script");
|
|
12722
|
+
e5.onreadystatechange = function() {
|
|
12723
|
+
u3(), e5.onreadystatechange = null, e5.parentNode.removeChild(e5), e5 = null;
|
|
12724
|
+
}, t4.document.documentElement.appendChild(e5);
|
|
12725
|
+
} : function() {
|
|
12726
|
+
setTimeout(u3, 0);
|
|
12727
|
+
};
|
|
12728
|
+
else {
|
|
12729
|
+
var o3 = new t4.MessageChannel();
|
|
12730
|
+
o3.port1.onmessage = u3, r3 = function() {
|
|
12731
|
+
o3.port2.postMessage(0);
|
|
12732
|
+
};
|
|
12733
|
+
}
|
|
12734
|
+
var h2 = [];
|
|
12735
|
+
function u3() {
|
|
12736
|
+
var e5, t5;
|
|
12737
|
+
n3 = true;
|
|
12738
|
+
for (var r4 = h2.length; r4; ) {
|
|
12739
|
+
for (t5 = h2, h2 = [], e5 = -1; ++e5 < r4; ) t5[e5]();
|
|
12740
|
+
r4 = h2.length;
|
|
12741
|
+
}
|
|
12742
|
+
n3 = false;
|
|
12743
|
+
}
|
|
12744
|
+
l2.exports = function(e5) {
|
|
12745
|
+
1 !== h2.push(e5) || n3 || r3();
|
|
12746
|
+
};
|
|
12747
|
+
}).call(this, "undefined" != typeof global ? global : "undefined" != typeof self ? self : "undefined" != typeof window ? window : {});
|
|
12748
|
+
}, {}], 37: [function(e3, t3, r3) {
|
|
12749
|
+
"use strict";
|
|
12750
|
+
var i3 = e3("immediate");
|
|
12751
|
+
function u3() {
|
|
12752
|
+
}
|
|
12753
|
+
var l2 = {}, s3 = ["REJECTED"], a3 = ["FULFILLED"], n3 = ["PENDING"];
|
|
12754
|
+
function o3(e4) {
|
|
12755
|
+
if ("function" != typeof e4) throw new TypeError("resolver must be a function");
|
|
12756
|
+
this.state = n3, this.queue = [], this.outcome = void 0, e4 !== u3 && d(this, e4);
|
|
12757
|
+
}
|
|
12758
|
+
function h2(e4, t4, r4) {
|
|
12759
|
+
this.promise = e4, "function" == typeof t4 && (this.onFulfilled = t4, this.callFulfilled = this.otherCallFulfilled), "function" == typeof r4 && (this.onRejected = r4, this.callRejected = this.otherCallRejected);
|
|
12760
|
+
}
|
|
12761
|
+
function f(t4, r4, n4) {
|
|
12762
|
+
i3(function() {
|
|
12763
|
+
var e4;
|
|
12764
|
+
try {
|
|
12765
|
+
e4 = r4(n4);
|
|
12766
|
+
} catch (e5) {
|
|
12767
|
+
return l2.reject(t4, e5);
|
|
12768
|
+
}
|
|
12769
|
+
e4 === t4 ? l2.reject(t4, new TypeError("Cannot resolve promise with itself")) : l2.resolve(t4, e4);
|
|
12770
|
+
});
|
|
12771
|
+
}
|
|
12772
|
+
function c3(e4) {
|
|
12773
|
+
var t4 = e4 && e4.then;
|
|
12774
|
+
if (e4 && ("object" == typeof e4 || "function" == typeof e4) && "function" == typeof t4) return function() {
|
|
12775
|
+
t4.apply(e4, arguments);
|
|
12776
|
+
};
|
|
12777
|
+
}
|
|
12778
|
+
function d(t4, e4) {
|
|
12779
|
+
var r4 = false;
|
|
12780
|
+
function n4(e5) {
|
|
12781
|
+
r4 || (r4 = true, l2.reject(t4, e5));
|
|
12782
|
+
}
|
|
12783
|
+
function i4(e5) {
|
|
12784
|
+
r4 || (r4 = true, l2.resolve(t4, e5));
|
|
12785
|
+
}
|
|
12786
|
+
var s4 = p3(function() {
|
|
12787
|
+
e4(i4, n4);
|
|
12788
|
+
});
|
|
12789
|
+
"error" === s4.status && n4(s4.value);
|
|
12790
|
+
}
|
|
12791
|
+
function p3(e4, t4) {
|
|
12792
|
+
var r4 = {};
|
|
12793
|
+
try {
|
|
12794
|
+
r4.value = e4(t4), r4.status = "success";
|
|
12795
|
+
} catch (e5) {
|
|
12796
|
+
r4.status = "error", r4.value = e5;
|
|
12797
|
+
}
|
|
12798
|
+
return r4;
|
|
12799
|
+
}
|
|
12800
|
+
(t3.exports = o3).prototype.finally = function(t4) {
|
|
12801
|
+
if ("function" != typeof t4) return this;
|
|
12802
|
+
var r4 = this.constructor;
|
|
12803
|
+
return this.then(function(e4) {
|
|
12804
|
+
return r4.resolve(t4()).then(function() {
|
|
12805
|
+
return e4;
|
|
12806
|
+
});
|
|
12807
|
+
}, function(e4) {
|
|
12808
|
+
return r4.resolve(t4()).then(function() {
|
|
12809
|
+
throw e4;
|
|
12810
|
+
});
|
|
12811
|
+
});
|
|
12812
|
+
}, o3.prototype.catch = function(e4) {
|
|
12813
|
+
return this.then(null, e4);
|
|
12814
|
+
}, o3.prototype.then = function(e4, t4) {
|
|
12815
|
+
if ("function" != typeof e4 && this.state === a3 || "function" != typeof t4 && this.state === s3) return this;
|
|
12816
|
+
var r4 = new this.constructor(u3);
|
|
12817
|
+
this.state !== n3 ? f(r4, this.state === a3 ? e4 : t4, this.outcome) : this.queue.push(new h2(r4, e4, t4));
|
|
12818
|
+
return r4;
|
|
12819
|
+
}, h2.prototype.callFulfilled = function(e4) {
|
|
12820
|
+
l2.resolve(this.promise, e4);
|
|
12821
|
+
}, h2.prototype.otherCallFulfilled = function(e4) {
|
|
12822
|
+
f(this.promise, this.onFulfilled, e4);
|
|
12823
|
+
}, h2.prototype.callRejected = function(e4) {
|
|
12824
|
+
l2.reject(this.promise, e4);
|
|
12825
|
+
}, h2.prototype.otherCallRejected = function(e4) {
|
|
12826
|
+
f(this.promise, this.onRejected, e4);
|
|
12827
|
+
}, l2.resolve = function(e4, t4) {
|
|
12828
|
+
var r4 = p3(c3, t4);
|
|
12829
|
+
if ("error" === r4.status) return l2.reject(e4, r4.value);
|
|
12830
|
+
var n4 = r4.value;
|
|
12831
|
+
if (n4) d(e4, n4);
|
|
12832
|
+
else {
|
|
12833
|
+
e4.state = a3, e4.outcome = t4;
|
|
12834
|
+
for (var i4 = -1, s4 = e4.queue.length; ++i4 < s4; ) e4.queue[i4].callFulfilled(t4);
|
|
12835
|
+
}
|
|
12836
|
+
return e4;
|
|
12837
|
+
}, l2.reject = function(e4, t4) {
|
|
12838
|
+
e4.state = s3, e4.outcome = t4;
|
|
12839
|
+
for (var r4 = -1, n4 = e4.queue.length; ++r4 < n4; ) e4.queue[r4].callRejected(t4);
|
|
12840
|
+
return e4;
|
|
12841
|
+
}, o3.resolve = function(e4) {
|
|
12842
|
+
if (e4 instanceof this) return e4;
|
|
12843
|
+
return l2.resolve(new this(u3), e4);
|
|
12844
|
+
}, o3.reject = function(e4) {
|
|
12845
|
+
var t4 = new this(u3);
|
|
12846
|
+
return l2.reject(t4, e4);
|
|
12847
|
+
}, o3.all = function(e4) {
|
|
12848
|
+
var r4 = this;
|
|
12849
|
+
if ("[object Array]" !== Object.prototype.toString.call(e4)) return this.reject(new TypeError("must be an array"));
|
|
12850
|
+
var n4 = e4.length, i4 = false;
|
|
12851
|
+
if (!n4) return this.resolve([]);
|
|
12852
|
+
var s4 = new Array(n4), a4 = 0, t4 = -1, o4 = new this(u3);
|
|
12853
|
+
for (; ++t4 < n4; ) h3(e4[t4], t4);
|
|
12854
|
+
return o4;
|
|
12855
|
+
function h3(e5, t5) {
|
|
12856
|
+
r4.resolve(e5).then(function(e6) {
|
|
12857
|
+
s4[t5] = e6, ++a4 !== n4 || i4 || (i4 = true, l2.resolve(o4, s4));
|
|
12858
|
+
}, function(e6) {
|
|
12859
|
+
i4 || (i4 = true, l2.reject(o4, e6));
|
|
12860
|
+
});
|
|
12861
|
+
}
|
|
12862
|
+
}, o3.race = function(e4) {
|
|
12863
|
+
var t4 = this;
|
|
12864
|
+
if ("[object Array]" !== Object.prototype.toString.call(e4)) return this.reject(new TypeError("must be an array"));
|
|
12865
|
+
var r4 = e4.length, n4 = false;
|
|
12866
|
+
if (!r4) return this.resolve([]);
|
|
12867
|
+
var i4 = -1, s4 = new this(u3);
|
|
12868
|
+
for (; ++i4 < r4; ) a4 = e4[i4], t4.resolve(a4).then(function(e5) {
|
|
12869
|
+
n4 || (n4 = true, l2.resolve(s4, e5));
|
|
12870
|
+
}, function(e5) {
|
|
12871
|
+
n4 || (n4 = true, l2.reject(s4, e5));
|
|
12872
|
+
});
|
|
12873
|
+
var a4;
|
|
12874
|
+
return s4;
|
|
12875
|
+
};
|
|
12876
|
+
}, { immediate: 36 }], 38: [function(e3, t3, r3) {
|
|
12877
|
+
"use strict";
|
|
12878
|
+
var n3 = {};
|
|
12879
|
+
(0, e3("./lib/utils/common").assign)(n3, e3("./lib/deflate"), e3("./lib/inflate"), e3("./lib/zlib/constants")), t3.exports = n3;
|
|
12880
|
+
}, { "./lib/deflate": 39, "./lib/inflate": 40, "./lib/utils/common": 41, "./lib/zlib/constants": 44 }], 39: [function(e3, t3, r3) {
|
|
12881
|
+
"use strict";
|
|
12882
|
+
var a3 = e3("./zlib/deflate"), o3 = e3("./utils/common"), h2 = e3("./utils/strings"), i3 = e3("./zlib/messages"), s3 = e3("./zlib/zstream"), u3 = Object.prototype.toString, l2 = 0, f = -1, c3 = 0, d = 8;
|
|
12883
|
+
function p3(e4) {
|
|
12884
|
+
if (!(this instanceof p3)) return new p3(e4);
|
|
12885
|
+
this.options = o3.assign({ level: f, method: d, chunkSize: 16384, windowBits: 15, memLevel: 8, strategy: c3, to: "" }, e4 || {});
|
|
12886
|
+
var t4 = this.options;
|
|
12887
|
+
t4.raw && 0 < t4.windowBits ? t4.windowBits = -t4.windowBits : t4.gzip && 0 < t4.windowBits && t4.windowBits < 16 && (t4.windowBits += 16), this.err = 0, this.msg = "", this.ended = false, this.chunks = [], this.strm = new s3(), this.strm.avail_out = 0;
|
|
12888
|
+
var r4 = a3.deflateInit2(this.strm, t4.level, t4.method, t4.windowBits, t4.memLevel, t4.strategy);
|
|
12889
|
+
if (r4 !== l2) throw new Error(i3[r4]);
|
|
12890
|
+
if (t4.header && a3.deflateSetHeader(this.strm, t4.header), t4.dictionary) {
|
|
12891
|
+
var n4;
|
|
12892
|
+
if (n4 = "string" == typeof t4.dictionary ? h2.string2buf(t4.dictionary) : "[object ArrayBuffer]" === u3.call(t4.dictionary) ? new Uint8Array(t4.dictionary) : t4.dictionary, (r4 = a3.deflateSetDictionary(this.strm, n4)) !== l2) throw new Error(i3[r4]);
|
|
12893
|
+
this._dict_set = true;
|
|
12894
|
+
}
|
|
12895
|
+
}
|
|
12896
|
+
function n3(e4, t4) {
|
|
12897
|
+
var r4 = new p3(t4);
|
|
12898
|
+
if (r4.push(e4, true), r4.err) throw r4.msg || i3[r4.err];
|
|
12899
|
+
return r4.result;
|
|
12900
|
+
}
|
|
12901
|
+
p3.prototype.push = function(e4, t4) {
|
|
12902
|
+
var r4, n4, i4 = this.strm, s4 = this.options.chunkSize;
|
|
12903
|
+
if (this.ended) return false;
|
|
12904
|
+
n4 = t4 === ~~t4 ? t4 : true === t4 ? 4 : 0, "string" == typeof e4 ? i4.input = h2.string2buf(e4) : "[object ArrayBuffer]" === u3.call(e4) ? i4.input = new Uint8Array(e4) : i4.input = e4, i4.next_in = 0, i4.avail_in = i4.input.length;
|
|
12905
|
+
do {
|
|
12906
|
+
if (0 === i4.avail_out && (i4.output = new o3.Buf8(s4), i4.next_out = 0, i4.avail_out = s4), 1 !== (r4 = a3.deflate(i4, n4)) && r4 !== l2) return this.onEnd(r4), !(this.ended = true);
|
|
12907
|
+
0 !== i4.avail_out && (0 !== i4.avail_in || 4 !== n4 && 2 !== n4) || ("string" === this.options.to ? this.onData(h2.buf2binstring(o3.shrinkBuf(i4.output, i4.next_out))) : this.onData(o3.shrinkBuf(i4.output, i4.next_out)));
|
|
12908
|
+
} while ((0 < i4.avail_in || 0 === i4.avail_out) && 1 !== r4);
|
|
12909
|
+
return 4 === n4 ? (r4 = a3.deflateEnd(this.strm), this.onEnd(r4), this.ended = true, r4 === l2) : 2 !== n4 || (this.onEnd(l2), !(i4.avail_out = 0));
|
|
12910
|
+
}, p3.prototype.onData = function(e4) {
|
|
12911
|
+
this.chunks.push(e4);
|
|
12912
|
+
}, p3.prototype.onEnd = function(e4) {
|
|
12913
|
+
e4 === l2 && ("string" === this.options.to ? this.result = this.chunks.join("") : this.result = o3.flattenChunks(this.chunks)), this.chunks = [], this.err = e4, this.msg = this.strm.msg;
|
|
12914
|
+
}, r3.Deflate = p3, r3.deflate = n3, r3.deflateRaw = function(e4, t4) {
|
|
12915
|
+
return (t4 = t4 || {}).raw = true, n3(e4, t4);
|
|
12916
|
+
}, r3.gzip = function(e4, t4) {
|
|
12917
|
+
return (t4 = t4 || {}).gzip = true, n3(e4, t4);
|
|
12918
|
+
};
|
|
12919
|
+
}, { "./utils/common": 41, "./utils/strings": 42, "./zlib/deflate": 46, "./zlib/messages": 51, "./zlib/zstream": 53 }], 40: [function(e3, t3, r3) {
|
|
12920
|
+
"use strict";
|
|
12921
|
+
var c3 = e3("./zlib/inflate"), d = e3("./utils/common"), p3 = e3("./utils/strings"), m3 = e3("./zlib/constants"), n3 = e3("./zlib/messages"), i3 = e3("./zlib/zstream"), s3 = e3("./zlib/gzheader"), _3 = Object.prototype.toString;
|
|
12922
|
+
function a3(e4) {
|
|
12923
|
+
if (!(this instanceof a3)) return new a3(e4);
|
|
12924
|
+
this.options = d.assign({ chunkSize: 16384, windowBits: 0, to: "" }, e4 || {});
|
|
12925
|
+
var t4 = this.options;
|
|
12926
|
+
t4.raw && 0 <= t4.windowBits && t4.windowBits < 16 && (t4.windowBits = -t4.windowBits, 0 === t4.windowBits && (t4.windowBits = -15)), !(0 <= t4.windowBits && t4.windowBits < 16) || e4 && e4.windowBits || (t4.windowBits += 32), 15 < t4.windowBits && t4.windowBits < 48 && 0 == (15 & t4.windowBits) && (t4.windowBits |= 15), this.err = 0, this.msg = "", this.ended = false, this.chunks = [], this.strm = new i3(), this.strm.avail_out = 0;
|
|
12927
|
+
var r4 = c3.inflateInit2(this.strm, t4.windowBits);
|
|
12928
|
+
if (r4 !== m3.Z_OK) throw new Error(n3[r4]);
|
|
12929
|
+
this.header = new s3(), c3.inflateGetHeader(this.strm, this.header);
|
|
12930
|
+
}
|
|
12931
|
+
function o3(e4, t4) {
|
|
12932
|
+
var r4 = new a3(t4);
|
|
12933
|
+
if (r4.push(e4, true), r4.err) throw r4.msg || n3[r4.err];
|
|
12934
|
+
return r4.result;
|
|
12935
|
+
}
|
|
12936
|
+
a3.prototype.push = function(e4, t4) {
|
|
12937
|
+
var r4, n4, i4, s4, a4, o4, h2 = this.strm, u3 = this.options.chunkSize, l2 = this.options.dictionary, f = false;
|
|
12938
|
+
if (this.ended) return false;
|
|
12939
|
+
n4 = t4 === ~~t4 ? t4 : true === t4 ? m3.Z_FINISH : m3.Z_NO_FLUSH, "string" == typeof e4 ? h2.input = p3.binstring2buf(e4) : "[object ArrayBuffer]" === _3.call(e4) ? h2.input = new Uint8Array(e4) : h2.input = e4, h2.next_in = 0, h2.avail_in = h2.input.length;
|
|
12940
|
+
do {
|
|
12941
|
+
if (0 === h2.avail_out && (h2.output = new d.Buf8(u3), h2.next_out = 0, h2.avail_out = u3), (r4 = c3.inflate(h2, m3.Z_NO_FLUSH)) === m3.Z_NEED_DICT && l2 && (o4 = "string" == typeof l2 ? p3.string2buf(l2) : "[object ArrayBuffer]" === _3.call(l2) ? new Uint8Array(l2) : l2, r4 = c3.inflateSetDictionary(this.strm, o4)), r4 === m3.Z_BUF_ERROR && true === f && (r4 = m3.Z_OK, f = false), r4 !== m3.Z_STREAM_END && r4 !== m3.Z_OK) return this.onEnd(r4), !(this.ended = true);
|
|
12942
|
+
h2.next_out && (0 !== h2.avail_out && r4 !== m3.Z_STREAM_END && (0 !== h2.avail_in || n4 !== m3.Z_FINISH && n4 !== m3.Z_SYNC_FLUSH) || ("string" === this.options.to ? (i4 = p3.utf8border(h2.output, h2.next_out), s4 = h2.next_out - i4, a4 = p3.buf2string(h2.output, i4), h2.next_out = s4, h2.avail_out = u3 - s4, s4 && d.arraySet(h2.output, h2.output, i4, s4, 0), this.onData(a4)) : this.onData(d.shrinkBuf(h2.output, h2.next_out)))), 0 === h2.avail_in && 0 === h2.avail_out && (f = true);
|
|
12943
|
+
} while ((0 < h2.avail_in || 0 === h2.avail_out) && r4 !== m3.Z_STREAM_END);
|
|
12944
|
+
return r4 === m3.Z_STREAM_END && (n4 = m3.Z_FINISH), n4 === m3.Z_FINISH ? (r4 = c3.inflateEnd(this.strm), this.onEnd(r4), this.ended = true, r4 === m3.Z_OK) : n4 !== m3.Z_SYNC_FLUSH || (this.onEnd(m3.Z_OK), !(h2.avail_out = 0));
|
|
12945
|
+
}, a3.prototype.onData = function(e4) {
|
|
12946
|
+
this.chunks.push(e4);
|
|
12947
|
+
}, a3.prototype.onEnd = function(e4) {
|
|
12948
|
+
e4 === m3.Z_OK && ("string" === this.options.to ? this.result = this.chunks.join("") : this.result = d.flattenChunks(this.chunks)), this.chunks = [], this.err = e4, this.msg = this.strm.msg;
|
|
12949
|
+
}, r3.Inflate = a3, r3.inflate = o3, r3.inflateRaw = function(e4, t4) {
|
|
12950
|
+
return (t4 = t4 || {}).raw = true, o3(e4, t4);
|
|
12951
|
+
}, r3.ungzip = o3;
|
|
12952
|
+
}, { "./utils/common": 41, "./utils/strings": 42, "./zlib/constants": 44, "./zlib/gzheader": 47, "./zlib/inflate": 49, "./zlib/messages": 51, "./zlib/zstream": 53 }], 41: [function(e3, t3, r3) {
|
|
12953
|
+
"use strict";
|
|
12954
|
+
var n3 = "undefined" != typeof Uint8Array && "undefined" != typeof Uint16Array && "undefined" != typeof Int32Array;
|
|
12955
|
+
r3.assign = function(e4) {
|
|
12956
|
+
for (var t4 = Array.prototype.slice.call(arguments, 1); t4.length; ) {
|
|
12957
|
+
var r4 = t4.shift();
|
|
12958
|
+
if (r4) {
|
|
12959
|
+
if ("object" != typeof r4) throw new TypeError(r4 + "must be non-object");
|
|
12960
|
+
for (var n4 in r4) r4.hasOwnProperty(n4) && (e4[n4] = r4[n4]);
|
|
12961
|
+
}
|
|
12962
|
+
}
|
|
12963
|
+
return e4;
|
|
12964
|
+
}, r3.shrinkBuf = function(e4, t4) {
|
|
12965
|
+
return e4.length === t4 ? e4 : e4.subarray ? e4.subarray(0, t4) : (e4.length = t4, e4);
|
|
12966
|
+
};
|
|
12967
|
+
var i3 = { arraySet: function(e4, t4, r4, n4, i4) {
|
|
12968
|
+
if (t4.subarray && e4.subarray) e4.set(t4.subarray(r4, r4 + n4), i4);
|
|
12969
|
+
else for (var s4 = 0; s4 < n4; s4++) e4[i4 + s4] = t4[r4 + s4];
|
|
12970
|
+
}, flattenChunks: function(e4) {
|
|
12971
|
+
var t4, r4, n4, i4, s4, a3;
|
|
12972
|
+
for (t4 = n4 = 0, r4 = e4.length; t4 < r4; t4++) n4 += e4[t4].length;
|
|
12973
|
+
for (a3 = new Uint8Array(n4), t4 = i4 = 0, r4 = e4.length; t4 < r4; t4++) s4 = e4[t4], a3.set(s4, i4), i4 += s4.length;
|
|
12974
|
+
return a3;
|
|
12975
|
+
} }, s3 = { arraySet: function(e4, t4, r4, n4, i4) {
|
|
12976
|
+
for (var s4 = 0; s4 < n4; s4++) e4[i4 + s4] = t4[r4 + s4];
|
|
12977
|
+
}, flattenChunks: function(e4) {
|
|
12978
|
+
return [].concat.apply([], e4);
|
|
12979
|
+
} };
|
|
12980
|
+
r3.setTyped = function(e4) {
|
|
12981
|
+
e4 ? (r3.Buf8 = Uint8Array, r3.Buf16 = Uint16Array, r3.Buf32 = Int32Array, r3.assign(r3, i3)) : (r3.Buf8 = Array, r3.Buf16 = Array, r3.Buf32 = Array, r3.assign(r3, s3));
|
|
12982
|
+
}, r3.setTyped(n3);
|
|
12983
|
+
}, {}], 42: [function(e3, t3, r3) {
|
|
12984
|
+
"use strict";
|
|
12985
|
+
var h2 = e3("./common"), i3 = true, s3 = true;
|
|
12986
|
+
try {
|
|
12987
|
+
String.fromCharCode.apply(null, [0]);
|
|
12988
|
+
} catch (e4) {
|
|
12989
|
+
i3 = false;
|
|
12990
|
+
}
|
|
12991
|
+
try {
|
|
12992
|
+
String.fromCharCode.apply(null, new Uint8Array(1));
|
|
12993
|
+
} catch (e4) {
|
|
12994
|
+
s3 = false;
|
|
12995
|
+
}
|
|
12996
|
+
for (var u3 = new h2.Buf8(256), n3 = 0; n3 < 256; n3++) u3[n3] = 252 <= n3 ? 6 : 248 <= n3 ? 5 : 240 <= n3 ? 4 : 224 <= n3 ? 3 : 192 <= n3 ? 2 : 1;
|
|
12997
|
+
function l2(e4, t4) {
|
|
12998
|
+
if (t4 < 65537 && (e4.subarray && s3 || !e4.subarray && i3)) return String.fromCharCode.apply(null, h2.shrinkBuf(e4, t4));
|
|
12999
|
+
for (var r4 = "", n4 = 0; n4 < t4; n4++) r4 += String.fromCharCode(e4[n4]);
|
|
13000
|
+
return r4;
|
|
13001
|
+
}
|
|
13002
|
+
u3[254] = u3[254] = 1, r3.string2buf = function(e4) {
|
|
13003
|
+
var t4, r4, n4, i4, s4, a3 = e4.length, o3 = 0;
|
|
13004
|
+
for (i4 = 0; i4 < a3; i4++) 55296 == (64512 & (r4 = e4.charCodeAt(i4))) && i4 + 1 < a3 && 56320 == (64512 & (n4 = e4.charCodeAt(i4 + 1))) && (r4 = 65536 + (r4 - 55296 << 10) + (n4 - 56320), i4++), o3 += r4 < 128 ? 1 : r4 < 2048 ? 2 : r4 < 65536 ? 3 : 4;
|
|
13005
|
+
for (t4 = new h2.Buf8(o3), i4 = s4 = 0; s4 < o3; i4++) 55296 == (64512 & (r4 = e4.charCodeAt(i4))) && i4 + 1 < a3 && 56320 == (64512 & (n4 = e4.charCodeAt(i4 + 1))) && (r4 = 65536 + (r4 - 55296 << 10) + (n4 - 56320), i4++), r4 < 128 ? t4[s4++] = r4 : (r4 < 2048 ? t4[s4++] = 192 | r4 >>> 6 : (r4 < 65536 ? t4[s4++] = 224 | r4 >>> 12 : (t4[s4++] = 240 | r4 >>> 18, t4[s4++] = 128 | r4 >>> 12 & 63), t4[s4++] = 128 | r4 >>> 6 & 63), t4[s4++] = 128 | 63 & r4);
|
|
13006
|
+
return t4;
|
|
13007
|
+
}, r3.buf2binstring = function(e4) {
|
|
13008
|
+
return l2(e4, e4.length);
|
|
13009
|
+
}, r3.binstring2buf = function(e4) {
|
|
13010
|
+
for (var t4 = new h2.Buf8(e4.length), r4 = 0, n4 = t4.length; r4 < n4; r4++) t4[r4] = e4.charCodeAt(r4);
|
|
13011
|
+
return t4;
|
|
13012
|
+
}, r3.buf2string = function(e4, t4) {
|
|
13013
|
+
var r4, n4, i4, s4, a3 = t4 || e4.length, o3 = new Array(2 * a3);
|
|
13014
|
+
for (r4 = n4 = 0; r4 < a3; ) if ((i4 = e4[r4++]) < 128) o3[n4++] = i4;
|
|
13015
|
+
else if (4 < (s4 = u3[i4])) o3[n4++] = 65533, r4 += s4 - 1;
|
|
13016
|
+
else {
|
|
13017
|
+
for (i4 &= 2 === s4 ? 31 : 3 === s4 ? 15 : 7; 1 < s4 && r4 < a3; ) i4 = i4 << 6 | 63 & e4[r4++], s4--;
|
|
13018
|
+
1 < s4 ? o3[n4++] = 65533 : i4 < 65536 ? o3[n4++] = i4 : (i4 -= 65536, o3[n4++] = 55296 | i4 >> 10 & 1023, o3[n4++] = 56320 | 1023 & i4);
|
|
13019
|
+
}
|
|
13020
|
+
return l2(o3, n4);
|
|
13021
|
+
}, r3.utf8border = function(e4, t4) {
|
|
13022
|
+
var r4;
|
|
13023
|
+
for ((t4 = t4 || e4.length) > e4.length && (t4 = e4.length), r4 = t4 - 1; 0 <= r4 && 128 == (192 & e4[r4]); ) r4--;
|
|
13024
|
+
return r4 < 0 ? t4 : 0 === r4 ? t4 : r4 + u3[e4[r4]] > t4 ? r4 : t4;
|
|
13025
|
+
};
|
|
13026
|
+
}, { "./common": 41 }], 43: [function(e3, t3, r3) {
|
|
13027
|
+
"use strict";
|
|
13028
|
+
t3.exports = function(e4, t4, r4, n3) {
|
|
13029
|
+
for (var i3 = 65535 & e4 | 0, s3 = e4 >>> 16 & 65535 | 0, a3 = 0; 0 !== r4; ) {
|
|
13030
|
+
for (r4 -= a3 = 2e3 < r4 ? 2e3 : r4; s3 = s3 + (i3 = i3 + t4[n3++] | 0) | 0, --a3; ) ;
|
|
13031
|
+
i3 %= 65521, s3 %= 65521;
|
|
13032
|
+
}
|
|
13033
|
+
return i3 | s3 << 16 | 0;
|
|
13034
|
+
};
|
|
13035
|
+
}, {}], 44: [function(e3, t3, r3) {
|
|
13036
|
+
"use strict";
|
|
13037
|
+
t3.exports = { Z_NO_FLUSH: 0, Z_PARTIAL_FLUSH: 1, Z_SYNC_FLUSH: 2, Z_FULL_FLUSH: 3, Z_FINISH: 4, Z_BLOCK: 5, Z_TREES: 6, Z_OK: 0, Z_STREAM_END: 1, Z_NEED_DICT: 2, Z_ERRNO: -1, Z_STREAM_ERROR: -2, Z_DATA_ERROR: -3, Z_BUF_ERROR: -5, Z_NO_COMPRESSION: 0, Z_BEST_SPEED: 1, Z_BEST_COMPRESSION: 9, Z_DEFAULT_COMPRESSION: -1, Z_FILTERED: 1, Z_HUFFMAN_ONLY: 2, Z_RLE: 3, Z_FIXED: 4, Z_DEFAULT_STRATEGY: 0, Z_BINARY: 0, Z_TEXT: 1, Z_UNKNOWN: 2, Z_DEFLATED: 8 };
|
|
13038
|
+
}, {}], 45: [function(e3, t3, r3) {
|
|
13039
|
+
"use strict";
|
|
13040
|
+
var o3 = (function() {
|
|
13041
|
+
for (var e4, t4 = [], r4 = 0; r4 < 256; r4++) {
|
|
13042
|
+
e4 = r4;
|
|
13043
|
+
for (var n3 = 0; n3 < 8; n3++) e4 = 1 & e4 ? 3988292384 ^ e4 >>> 1 : e4 >>> 1;
|
|
13044
|
+
t4[r4] = e4;
|
|
13045
|
+
}
|
|
13046
|
+
return t4;
|
|
13047
|
+
})();
|
|
13048
|
+
t3.exports = function(e4, t4, r4, n3) {
|
|
13049
|
+
var i3 = o3, s3 = n3 + r4;
|
|
13050
|
+
e4 ^= -1;
|
|
13051
|
+
for (var a3 = n3; a3 < s3; a3++) e4 = e4 >>> 8 ^ i3[255 & (e4 ^ t4[a3])];
|
|
13052
|
+
return -1 ^ e4;
|
|
13053
|
+
};
|
|
13054
|
+
}, {}], 46: [function(e3, t3, r3) {
|
|
13055
|
+
"use strict";
|
|
13056
|
+
var h2, c3 = e3("../utils/common"), u3 = e3("./trees"), d = e3("./adler32"), p3 = e3("./crc32"), n3 = e3("./messages"), l2 = 0, f = 4, m3 = 0, _3 = -2, g3 = -1, b3 = 4, i3 = 2, v3 = 8, y3 = 9, s3 = 286, a3 = 30, o3 = 19, w3 = 2 * s3 + 1, k3 = 15, x3 = 3, S3 = 258, z3 = S3 + x3 + 1, C3 = 42, E3 = 113, A3 = 1, I3 = 2, O3 = 3, B3 = 4;
|
|
13057
|
+
function R3(e4, t4) {
|
|
13058
|
+
return e4.msg = n3[t4], t4;
|
|
13059
|
+
}
|
|
13060
|
+
function T3(e4) {
|
|
13061
|
+
return (e4 << 1) - (4 < e4 ? 9 : 0);
|
|
13062
|
+
}
|
|
13063
|
+
function D3(e4) {
|
|
13064
|
+
for (var t4 = e4.length; 0 <= --t4; ) e4[t4] = 0;
|
|
13065
|
+
}
|
|
13066
|
+
function F3(e4) {
|
|
13067
|
+
var t4 = e4.state, r4 = t4.pending;
|
|
13068
|
+
r4 > e4.avail_out && (r4 = e4.avail_out), 0 !== r4 && (c3.arraySet(e4.output, t4.pending_buf, t4.pending_out, r4, e4.next_out), e4.next_out += r4, t4.pending_out += r4, e4.total_out += r4, e4.avail_out -= r4, t4.pending -= r4, 0 === t4.pending && (t4.pending_out = 0));
|
|
13069
|
+
}
|
|
13070
|
+
function N3(e4, t4) {
|
|
13071
|
+
u3._tr_flush_block(e4, 0 <= e4.block_start ? e4.block_start : -1, e4.strstart - e4.block_start, t4), e4.block_start = e4.strstart, F3(e4.strm);
|
|
13072
|
+
}
|
|
13073
|
+
function U3(e4, t4) {
|
|
13074
|
+
e4.pending_buf[e4.pending++] = t4;
|
|
13075
|
+
}
|
|
13076
|
+
function P3(e4, t4) {
|
|
13077
|
+
e4.pending_buf[e4.pending++] = t4 >>> 8 & 255, e4.pending_buf[e4.pending++] = 255 & t4;
|
|
13078
|
+
}
|
|
13079
|
+
function L3(e4, t4) {
|
|
13080
|
+
var r4, n4, i4 = e4.max_chain_length, s4 = e4.strstart, a4 = e4.prev_length, o4 = e4.nice_match, h3 = e4.strstart > e4.w_size - z3 ? e4.strstart - (e4.w_size - z3) : 0, u4 = e4.window, l3 = e4.w_mask, f2 = e4.prev, c4 = e4.strstart + S3, d2 = u4[s4 + a4 - 1], p4 = u4[s4 + a4];
|
|
13081
|
+
e4.prev_length >= e4.good_match && (i4 >>= 2), o4 > e4.lookahead && (o4 = e4.lookahead);
|
|
13082
|
+
do {
|
|
13083
|
+
if (u4[(r4 = t4) + a4] === p4 && u4[r4 + a4 - 1] === d2 && u4[r4] === u4[s4] && u4[++r4] === u4[s4 + 1]) {
|
|
13084
|
+
s4 += 2, r4++;
|
|
13085
|
+
do {
|
|
13086
|
+
} while (u4[++s4] === u4[++r4] && u4[++s4] === u4[++r4] && u4[++s4] === u4[++r4] && u4[++s4] === u4[++r4] && u4[++s4] === u4[++r4] && u4[++s4] === u4[++r4] && u4[++s4] === u4[++r4] && u4[++s4] === u4[++r4] && s4 < c4);
|
|
13087
|
+
if (n4 = S3 - (c4 - s4), s4 = c4 - S3, a4 < n4) {
|
|
13088
|
+
if (e4.match_start = t4, o4 <= (a4 = n4)) break;
|
|
13089
|
+
d2 = u4[s4 + a4 - 1], p4 = u4[s4 + a4];
|
|
13090
|
+
}
|
|
13091
|
+
}
|
|
13092
|
+
} while ((t4 = f2[t4 & l3]) > h3 && 0 != --i4);
|
|
13093
|
+
return a4 <= e4.lookahead ? a4 : e4.lookahead;
|
|
13094
|
+
}
|
|
13095
|
+
function j3(e4) {
|
|
13096
|
+
var t4, r4, n4, i4, s4, a4, o4, h3, u4, l3, f2 = e4.w_size;
|
|
13097
|
+
do {
|
|
13098
|
+
if (i4 = e4.window_size - e4.lookahead - e4.strstart, e4.strstart >= f2 + (f2 - z3)) {
|
|
13099
|
+
for (c3.arraySet(e4.window, e4.window, f2, f2, 0), e4.match_start -= f2, e4.strstart -= f2, e4.block_start -= f2, t4 = r4 = e4.hash_size; n4 = e4.head[--t4], e4.head[t4] = f2 <= n4 ? n4 - f2 : 0, --r4; ) ;
|
|
13100
|
+
for (t4 = r4 = f2; n4 = e4.prev[--t4], e4.prev[t4] = f2 <= n4 ? n4 - f2 : 0, --r4; ) ;
|
|
13101
|
+
i4 += f2;
|
|
13102
|
+
}
|
|
13103
|
+
if (0 === e4.strm.avail_in) break;
|
|
13104
|
+
if (a4 = e4.strm, o4 = e4.window, h3 = e4.strstart + e4.lookahead, u4 = i4, l3 = void 0, l3 = a4.avail_in, u4 < l3 && (l3 = u4), r4 = 0 === l3 ? 0 : (a4.avail_in -= l3, c3.arraySet(o4, a4.input, a4.next_in, l3, h3), 1 === a4.state.wrap ? a4.adler = d(a4.adler, o4, l3, h3) : 2 === a4.state.wrap && (a4.adler = p3(a4.adler, o4, l3, h3)), a4.next_in += l3, a4.total_in += l3, l3), e4.lookahead += r4, e4.lookahead + e4.insert >= x3) for (s4 = e4.strstart - e4.insert, e4.ins_h = e4.window[s4], e4.ins_h = (e4.ins_h << e4.hash_shift ^ e4.window[s4 + 1]) & e4.hash_mask; e4.insert && (e4.ins_h = (e4.ins_h << e4.hash_shift ^ e4.window[s4 + x3 - 1]) & e4.hash_mask, e4.prev[s4 & e4.w_mask] = e4.head[e4.ins_h], e4.head[e4.ins_h] = s4, s4++, e4.insert--, !(e4.lookahead + e4.insert < x3)); ) ;
|
|
13105
|
+
} while (e4.lookahead < z3 && 0 !== e4.strm.avail_in);
|
|
13106
|
+
}
|
|
13107
|
+
function Z3(e4, t4) {
|
|
13108
|
+
for (var r4, n4; ; ) {
|
|
13109
|
+
if (e4.lookahead < z3) {
|
|
13110
|
+
if (j3(e4), e4.lookahead < z3 && t4 === l2) return A3;
|
|
13111
|
+
if (0 === e4.lookahead) break;
|
|
13112
|
+
}
|
|
13113
|
+
if (r4 = 0, e4.lookahead >= x3 && (e4.ins_h = (e4.ins_h << e4.hash_shift ^ e4.window[e4.strstart + x3 - 1]) & e4.hash_mask, r4 = e4.prev[e4.strstart & e4.w_mask] = e4.head[e4.ins_h], e4.head[e4.ins_h] = e4.strstart), 0 !== r4 && e4.strstart - r4 <= e4.w_size - z3 && (e4.match_length = L3(e4, r4)), e4.match_length >= x3) if (n4 = u3._tr_tally(e4, e4.strstart - e4.match_start, e4.match_length - x3), e4.lookahead -= e4.match_length, e4.match_length <= e4.max_lazy_match && e4.lookahead >= x3) {
|
|
13114
|
+
for (e4.match_length--; e4.strstart++, e4.ins_h = (e4.ins_h << e4.hash_shift ^ e4.window[e4.strstart + x3 - 1]) & e4.hash_mask, r4 = e4.prev[e4.strstart & e4.w_mask] = e4.head[e4.ins_h], e4.head[e4.ins_h] = e4.strstart, 0 != --e4.match_length; ) ;
|
|
13115
|
+
e4.strstart++;
|
|
13116
|
+
} else e4.strstart += e4.match_length, e4.match_length = 0, e4.ins_h = e4.window[e4.strstart], e4.ins_h = (e4.ins_h << e4.hash_shift ^ e4.window[e4.strstart + 1]) & e4.hash_mask;
|
|
13117
|
+
else n4 = u3._tr_tally(e4, 0, e4.window[e4.strstart]), e4.lookahead--, e4.strstart++;
|
|
13118
|
+
if (n4 && (N3(e4, false), 0 === e4.strm.avail_out)) return A3;
|
|
13119
|
+
}
|
|
13120
|
+
return e4.insert = e4.strstart < x3 - 1 ? e4.strstart : x3 - 1, t4 === f ? (N3(e4, true), 0 === e4.strm.avail_out ? O3 : B3) : e4.last_lit && (N3(e4, false), 0 === e4.strm.avail_out) ? A3 : I3;
|
|
13121
|
+
}
|
|
13122
|
+
function W3(e4, t4) {
|
|
13123
|
+
for (var r4, n4, i4; ; ) {
|
|
13124
|
+
if (e4.lookahead < z3) {
|
|
13125
|
+
if (j3(e4), e4.lookahead < z3 && t4 === l2) return A3;
|
|
13126
|
+
if (0 === e4.lookahead) break;
|
|
13127
|
+
}
|
|
13128
|
+
if (r4 = 0, e4.lookahead >= x3 && (e4.ins_h = (e4.ins_h << e4.hash_shift ^ e4.window[e4.strstart + x3 - 1]) & e4.hash_mask, r4 = e4.prev[e4.strstart & e4.w_mask] = e4.head[e4.ins_h], e4.head[e4.ins_h] = e4.strstart), e4.prev_length = e4.match_length, e4.prev_match = e4.match_start, e4.match_length = x3 - 1, 0 !== r4 && e4.prev_length < e4.max_lazy_match && e4.strstart - r4 <= e4.w_size - z3 && (e4.match_length = L3(e4, r4), e4.match_length <= 5 && (1 === e4.strategy || e4.match_length === x3 && 4096 < e4.strstart - e4.match_start) && (e4.match_length = x3 - 1)), e4.prev_length >= x3 && e4.match_length <= e4.prev_length) {
|
|
13129
|
+
for (i4 = e4.strstart + e4.lookahead - x3, n4 = u3._tr_tally(e4, e4.strstart - 1 - e4.prev_match, e4.prev_length - x3), e4.lookahead -= e4.prev_length - 1, e4.prev_length -= 2; ++e4.strstart <= i4 && (e4.ins_h = (e4.ins_h << e4.hash_shift ^ e4.window[e4.strstart + x3 - 1]) & e4.hash_mask, r4 = e4.prev[e4.strstart & e4.w_mask] = e4.head[e4.ins_h], e4.head[e4.ins_h] = e4.strstart), 0 != --e4.prev_length; ) ;
|
|
13130
|
+
if (e4.match_available = 0, e4.match_length = x3 - 1, e4.strstart++, n4 && (N3(e4, false), 0 === e4.strm.avail_out)) return A3;
|
|
13131
|
+
} else if (e4.match_available) {
|
|
13132
|
+
if ((n4 = u3._tr_tally(e4, 0, e4.window[e4.strstart - 1])) && N3(e4, false), e4.strstart++, e4.lookahead--, 0 === e4.strm.avail_out) return A3;
|
|
13133
|
+
} else e4.match_available = 1, e4.strstart++, e4.lookahead--;
|
|
13134
|
+
}
|
|
13135
|
+
return e4.match_available && (n4 = u3._tr_tally(e4, 0, e4.window[e4.strstart - 1]), e4.match_available = 0), e4.insert = e4.strstart < x3 - 1 ? e4.strstart : x3 - 1, t4 === f ? (N3(e4, true), 0 === e4.strm.avail_out ? O3 : B3) : e4.last_lit && (N3(e4, false), 0 === e4.strm.avail_out) ? A3 : I3;
|
|
13136
|
+
}
|
|
13137
|
+
function M3(e4, t4, r4, n4, i4) {
|
|
13138
|
+
this.good_length = e4, this.max_lazy = t4, this.nice_length = r4, this.max_chain = n4, this.func = i4;
|
|
13139
|
+
}
|
|
13140
|
+
function H3() {
|
|
13141
|
+
this.strm = null, this.status = 0, this.pending_buf = null, this.pending_buf_size = 0, this.pending_out = 0, this.pending = 0, this.wrap = 0, this.gzhead = null, this.gzindex = 0, this.method = v3, this.last_flush = -1, this.w_size = 0, this.w_bits = 0, this.w_mask = 0, this.window = null, this.window_size = 0, this.prev = null, this.head = null, this.ins_h = 0, this.hash_size = 0, this.hash_bits = 0, this.hash_mask = 0, this.hash_shift = 0, this.block_start = 0, this.match_length = 0, this.prev_match = 0, this.match_available = 0, this.strstart = 0, this.match_start = 0, this.lookahead = 0, this.prev_length = 0, this.max_chain_length = 0, this.max_lazy_match = 0, this.level = 0, this.strategy = 0, this.good_match = 0, this.nice_match = 0, this.dyn_ltree = new c3.Buf16(2 * w3), this.dyn_dtree = new c3.Buf16(2 * (2 * a3 + 1)), this.bl_tree = new c3.Buf16(2 * (2 * o3 + 1)), D3(this.dyn_ltree), D3(this.dyn_dtree), D3(this.bl_tree), this.l_desc = null, this.d_desc = null, this.bl_desc = null, this.bl_count = new c3.Buf16(k3 + 1), this.heap = new c3.Buf16(2 * s3 + 1), D3(this.heap), this.heap_len = 0, this.heap_max = 0, this.depth = new c3.Buf16(2 * s3 + 1), D3(this.depth), this.l_buf = 0, this.lit_bufsize = 0, this.last_lit = 0, this.d_buf = 0, this.opt_len = 0, this.static_len = 0, this.matches = 0, this.insert = 0, this.bi_buf = 0, this.bi_valid = 0;
|
|
13142
|
+
}
|
|
13143
|
+
function G3(e4) {
|
|
13144
|
+
var t4;
|
|
13145
|
+
return e4 && e4.state ? (e4.total_in = e4.total_out = 0, e4.data_type = i3, (t4 = e4.state).pending = 0, t4.pending_out = 0, t4.wrap < 0 && (t4.wrap = -t4.wrap), t4.status = t4.wrap ? C3 : E3, e4.adler = 2 === t4.wrap ? 0 : 1, t4.last_flush = l2, u3._tr_init(t4), m3) : R3(e4, _3);
|
|
13146
|
+
}
|
|
13147
|
+
function K3(e4) {
|
|
13148
|
+
var t4 = G3(e4);
|
|
13149
|
+
return t4 === m3 && (function(e5) {
|
|
13150
|
+
e5.window_size = 2 * e5.w_size, D3(e5.head), e5.max_lazy_match = h2[e5.level].max_lazy, e5.good_match = h2[e5.level].good_length, e5.nice_match = h2[e5.level].nice_length, e5.max_chain_length = h2[e5.level].max_chain, e5.strstart = 0, e5.block_start = 0, e5.lookahead = 0, e5.insert = 0, e5.match_length = e5.prev_length = x3 - 1, e5.match_available = 0, e5.ins_h = 0;
|
|
13151
|
+
})(e4.state), t4;
|
|
13152
|
+
}
|
|
13153
|
+
function Y3(e4, t4, r4, n4, i4, s4) {
|
|
13154
|
+
if (!e4) return _3;
|
|
13155
|
+
var a4 = 1;
|
|
13156
|
+
if (t4 === g3 && (t4 = 6), n4 < 0 ? (a4 = 0, n4 = -n4) : 15 < n4 && (a4 = 2, n4 -= 16), i4 < 1 || y3 < i4 || r4 !== v3 || n4 < 8 || 15 < n4 || t4 < 0 || 9 < t4 || s4 < 0 || b3 < s4) return R3(e4, _3);
|
|
13157
|
+
8 === n4 && (n4 = 9);
|
|
13158
|
+
var o4 = new H3();
|
|
13159
|
+
return (e4.state = o4).strm = e4, o4.wrap = a4, o4.gzhead = null, o4.w_bits = n4, o4.w_size = 1 << o4.w_bits, o4.w_mask = o4.w_size - 1, o4.hash_bits = i4 + 7, o4.hash_size = 1 << o4.hash_bits, o4.hash_mask = o4.hash_size - 1, o4.hash_shift = ~~((o4.hash_bits + x3 - 1) / x3), o4.window = new c3.Buf8(2 * o4.w_size), o4.head = new c3.Buf16(o4.hash_size), o4.prev = new c3.Buf16(o4.w_size), o4.lit_bufsize = 1 << i4 + 6, o4.pending_buf_size = 4 * o4.lit_bufsize, o4.pending_buf = new c3.Buf8(o4.pending_buf_size), o4.d_buf = 1 * o4.lit_bufsize, o4.l_buf = 3 * o4.lit_bufsize, o4.level = t4, o4.strategy = s4, o4.method = r4, K3(e4);
|
|
13160
|
+
}
|
|
13161
|
+
h2 = [new M3(0, 0, 0, 0, function(e4, t4) {
|
|
13162
|
+
var r4 = 65535;
|
|
13163
|
+
for (r4 > e4.pending_buf_size - 5 && (r4 = e4.pending_buf_size - 5); ; ) {
|
|
13164
|
+
if (e4.lookahead <= 1) {
|
|
13165
|
+
if (j3(e4), 0 === e4.lookahead && t4 === l2) return A3;
|
|
13166
|
+
if (0 === e4.lookahead) break;
|
|
13167
|
+
}
|
|
13168
|
+
e4.strstart += e4.lookahead, e4.lookahead = 0;
|
|
13169
|
+
var n4 = e4.block_start + r4;
|
|
13170
|
+
if ((0 === e4.strstart || e4.strstart >= n4) && (e4.lookahead = e4.strstart - n4, e4.strstart = n4, N3(e4, false), 0 === e4.strm.avail_out)) return A3;
|
|
13171
|
+
if (e4.strstart - e4.block_start >= e4.w_size - z3 && (N3(e4, false), 0 === e4.strm.avail_out)) return A3;
|
|
13172
|
+
}
|
|
13173
|
+
return e4.insert = 0, t4 === f ? (N3(e4, true), 0 === e4.strm.avail_out ? O3 : B3) : (e4.strstart > e4.block_start && (N3(e4, false), e4.strm.avail_out), A3);
|
|
13174
|
+
}), new M3(4, 4, 8, 4, Z3), new M3(4, 5, 16, 8, Z3), new M3(4, 6, 32, 32, Z3), new M3(4, 4, 16, 16, W3), new M3(8, 16, 32, 32, W3), new M3(8, 16, 128, 128, W3), new M3(8, 32, 128, 256, W3), new M3(32, 128, 258, 1024, W3), new M3(32, 258, 258, 4096, W3)], r3.deflateInit = function(e4, t4) {
|
|
13175
|
+
return Y3(e4, t4, v3, 15, 8, 0);
|
|
13176
|
+
}, r3.deflateInit2 = Y3, r3.deflateReset = K3, r3.deflateResetKeep = G3, r3.deflateSetHeader = function(e4, t4) {
|
|
13177
|
+
return e4 && e4.state ? 2 !== e4.state.wrap ? _3 : (e4.state.gzhead = t4, m3) : _3;
|
|
13178
|
+
}, r3.deflate = function(e4, t4) {
|
|
13179
|
+
var r4, n4, i4, s4;
|
|
13180
|
+
if (!e4 || !e4.state || 5 < t4 || t4 < 0) return e4 ? R3(e4, _3) : _3;
|
|
13181
|
+
if (n4 = e4.state, !e4.output || !e4.input && 0 !== e4.avail_in || 666 === n4.status && t4 !== f) return R3(e4, 0 === e4.avail_out ? -5 : _3);
|
|
13182
|
+
if (n4.strm = e4, r4 = n4.last_flush, n4.last_flush = t4, n4.status === C3) if (2 === n4.wrap) e4.adler = 0, U3(n4, 31), U3(n4, 139), U3(n4, 8), n4.gzhead ? (U3(n4, (n4.gzhead.text ? 1 : 0) + (n4.gzhead.hcrc ? 2 : 0) + (n4.gzhead.extra ? 4 : 0) + (n4.gzhead.name ? 8 : 0) + (n4.gzhead.comment ? 16 : 0)), U3(n4, 255 & n4.gzhead.time), U3(n4, n4.gzhead.time >> 8 & 255), U3(n4, n4.gzhead.time >> 16 & 255), U3(n4, n4.gzhead.time >> 24 & 255), U3(n4, 9 === n4.level ? 2 : 2 <= n4.strategy || n4.level < 2 ? 4 : 0), U3(n4, 255 & n4.gzhead.os), n4.gzhead.extra && n4.gzhead.extra.length && (U3(n4, 255 & n4.gzhead.extra.length), U3(n4, n4.gzhead.extra.length >> 8 & 255)), n4.gzhead.hcrc && (e4.adler = p3(e4.adler, n4.pending_buf, n4.pending, 0)), n4.gzindex = 0, n4.status = 69) : (U3(n4, 0), U3(n4, 0), U3(n4, 0), U3(n4, 0), U3(n4, 0), U3(n4, 9 === n4.level ? 2 : 2 <= n4.strategy || n4.level < 2 ? 4 : 0), U3(n4, 3), n4.status = E3);
|
|
13183
|
+
else {
|
|
13184
|
+
var a4 = v3 + (n4.w_bits - 8 << 4) << 8;
|
|
13185
|
+
a4 |= (2 <= n4.strategy || n4.level < 2 ? 0 : n4.level < 6 ? 1 : 6 === n4.level ? 2 : 3) << 6, 0 !== n4.strstart && (a4 |= 32), a4 += 31 - a4 % 31, n4.status = E3, P3(n4, a4), 0 !== n4.strstart && (P3(n4, e4.adler >>> 16), P3(n4, 65535 & e4.adler)), e4.adler = 1;
|
|
13186
|
+
}
|
|
13187
|
+
if (69 === n4.status) if (n4.gzhead.extra) {
|
|
13188
|
+
for (i4 = n4.pending; n4.gzindex < (65535 & n4.gzhead.extra.length) && (n4.pending !== n4.pending_buf_size || (n4.gzhead.hcrc && n4.pending > i4 && (e4.adler = p3(e4.adler, n4.pending_buf, n4.pending - i4, i4)), F3(e4), i4 = n4.pending, n4.pending !== n4.pending_buf_size)); ) U3(n4, 255 & n4.gzhead.extra[n4.gzindex]), n4.gzindex++;
|
|
13189
|
+
n4.gzhead.hcrc && n4.pending > i4 && (e4.adler = p3(e4.adler, n4.pending_buf, n4.pending - i4, i4)), n4.gzindex === n4.gzhead.extra.length && (n4.gzindex = 0, n4.status = 73);
|
|
13190
|
+
} else n4.status = 73;
|
|
13191
|
+
if (73 === n4.status) if (n4.gzhead.name) {
|
|
13192
|
+
i4 = n4.pending;
|
|
13193
|
+
do {
|
|
13194
|
+
if (n4.pending === n4.pending_buf_size && (n4.gzhead.hcrc && n4.pending > i4 && (e4.adler = p3(e4.adler, n4.pending_buf, n4.pending - i4, i4)), F3(e4), i4 = n4.pending, n4.pending === n4.pending_buf_size)) {
|
|
13195
|
+
s4 = 1;
|
|
13196
|
+
break;
|
|
13197
|
+
}
|
|
13198
|
+
s4 = n4.gzindex < n4.gzhead.name.length ? 255 & n4.gzhead.name.charCodeAt(n4.gzindex++) : 0, U3(n4, s4);
|
|
13199
|
+
} while (0 !== s4);
|
|
13200
|
+
n4.gzhead.hcrc && n4.pending > i4 && (e4.adler = p3(e4.adler, n4.pending_buf, n4.pending - i4, i4)), 0 === s4 && (n4.gzindex = 0, n4.status = 91);
|
|
13201
|
+
} else n4.status = 91;
|
|
13202
|
+
if (91 === n4.status) if (n4.gzhead.comment) {
|
|
13203
|
+
i4 = n4.pending;
|
|
13204
|
+
do {
|
|
13205
|
+
if (n4.pending === n4.pending_buf_size && (n4.gzhead.hcrc && n4.pending > i4 && (e4.adler = p3(e4.adler, n4.pending_buf, n4.pending - i4, i4)), F3(e4), i4 = n4.pending, n4.pending === n4.pending_buf_size)) {
|
|
13206
|
+
s4 = 1;
|
|
13207
|
+
break;
|
|
13208
|
+
}
|
|
13209
|
+
s4 = n4.gzindex < n4.gzhead.comment.length ? 255 & n4.gzhead.comment.charCodeAt(n4.gzindex++) : 0, U3(n4, s4);
|
|
13210
|
+
} while (0 !== s4);
|
|
13211
|
+
n4.gzhead.hcrc && n4.pending > i4 && (e4.adler = p3(e4.adler, n4.pending_buf, n4.pending - i4, i4)), 0 === s4 && (n4.status = 103);
|
|
13212
|
+
} else n4.status = 103;
|
|
13213
|
+
if (103 === n4.status && (n4.gzhead.hcrc ? (n4.pending + 2 > n4.pending_buf_size && F3(e4), n4.pending + 2 <= n4.pending_buf_size && (U3(n4, 255 & e4.adler), U3(n4, e4.adler >> 8 & 255), e4.adler = 0, n4.status = E3)) : n4.status = E3), 0 !== n4.pending) {
|
|
13214
|
+
if (F3(e4), 0 === e4.avail_out) return n4.last_flush = -1, m3;
|
|
13215
|
+
} else if (0 === e4.avail_in && T3(t4) <= T3(r4) && t4 !== f) return R3(e4, -5);
|
|
13216
|
+
if (666 === n4.status && 0 !== e4.avail_in) return R3(e4, -5);
|
|
13217
|
+
if (0 !== e4.avail_in || 0 !== n4.lookahead || t4 !== l2 && 666 !== n4.status) {
|
|
13218
|
+
var o4 = 2 === n4.strategy ? (function(e5, t5) {
|
|
13219
|
+
for (var r5; ; ) {
|
|
13220
|
+
if (0 === e5.lookahead && (j3(e5), 0 === e5.lookahead)) {
|
|
13221
|
+
if (t5 === l2) return A3;
|
|
13222
|
+
break;
|
|
13223
|
+
}
|
|
13224
|
+
if (e5.match_length = 0, r5 = u3._tr_tally(e5, 0, e5.window[e5.strstart]), e5.lookahead--, e5.strstart++, r5 && (N3(e5, false), 0 === e5.strm.avail_out)) return A3;
|
|
13225
|
+
}
|
|
13226
|
+
return e5.insert = 0, t5 === f ? (N3(e5, true), 0 === e5.strm.avail_out ? O3 : B3) : e5.last_lit && (N3(e5, false), 0 === e5.strm.avail_out) ? A3 : I3;
|
|
13227
|
+
})(n4, t4) : 3 === n4.strategy ? (function(e5, t5) {
|
|
13228
|
+
for (var r5, n5, i5, s5, a5 = e5.window; ; ) {
|
|
13229
|
+
if (e5.lookahead <= S3) {
|
|
13230
|
+
if (j3(e5), e5.lookahead <= S3 && t5 === l2) return A3;
|
|
13231
|
+
if (0 === e5.lookahead) break;
|
|
13232
|
+
}
|
|
13233
|
+
if (e5.match_length = 0, e5.lookahead >= x3 && 0 < e5.strstart && (n5 = a5[i5 = e5.strstart - 1]) === a5[++i5] && n5 === a5[++i5] && n5 === a5[++i5]) {
|
|
13234
|
+
s5 = e5.strstart + S3;
|
|
13235
|
+
do {
|
|
13236
|
+
} while (n5 === a5[++i5] && n5 === a5[++i5] && n5 === a5[++i5] && n5 === a5[++i5] && n5 === a5[++i5] && n5 === a5[++i5] && n5 === a5[++i5] && n5 === a5[++i5] && i5 < s5);
|
|
13237
|
+
e5.match_length = S3 - (s5 - i5), e5.match_length > e5.lookahead && (e5.match_length = e5.lookahead);
|
|
13238
|
+
}
|
|
13239
|
+
if (e5.match_length >= x3 ? (r5 = u3._tr_tally(e5, 1, e5.match_length - x3), e5.lookahead -= e5.match_length, e5.strstart += e5.match_length, e5.match_length = 0) : (r5 = u3._tr_tally(e5, 0, e5.window[e5.strstart]), e5.lookahead--, e5.strstart++), r5 && (N3(e5, false), 0 === e5.strm.avail_out)) return A3;
|
|
13240
|
+
}
|
|
13241
|
+
return e5.insert = 0, t5 === f ? (N3(e5, true), 0 === e5.strm.avail_out ? O3 : B3) : e5.last_lit && (N3(e5, false), 0 === e5.strm.avail_out) ? A3 : I3;
|
|
13242
|
+
})(n4, t4) : h2[n4.level].func(n4, t4);
|
|
13243
|
+
if (o4 !== O3 && o4 !== B3 || (n4.status = 666), o4 === A3 || o4 === O3) return 0 === e4.avail_out && (n4.last_flush = -1), m3;
|
|
13244
|
+
if (o4 === I3 && (1 === t4 ? u3._tr_align(n4) : 5 !== t4 && (u3._tr_stored_block(n4, 0, 0, false), 3 === t4 && (D3(n4.head), 0 === n4.lookahead && (n4.strstart = 0, n4.block_start = 0, n4.insert = 0))), F3(e4), 0 === e4.avail_out)) return n4.last_flush = -1, m3;
|
|
13245
|
+
}
|
|
13246
|
+
return t4 !== f ? m3 : n4.wrap <= 0 ? 1 : (2 === n4.wrap ? (U3(n4, 255 & e4.adler), U3(n4, e4.adler >> 8 & 255), U3(n4, e4.adler >> 16 & 255), U3(n4, e4.adler >> 24 & 255), U3(n4, 255 & e4.total_in), U3(n4, e4.total_in >> 8 & 255), U3(n4, e4.total_in >> 16 & 255), U3(n4, e4.total_in >> 24 & 255)) : (P3(n4, e4.adler >>> 16), P3(n4, 65535 & e4.adler)), F3(e4), 0 < n4.wrap && (n4.wrap = -n4.wrap), 0 !== n4.pending ? m3 : 1);
|
|
13247
|
+
}, r3.deflateEnd = function(e4) {
|
|
13248
|
+
var t4;
|
|
13249
|
+
return e4 && e4.state ? (t4 = e4.state.status) !== C3 && 69 !== t4 && 73 !== t4 && 91 !== t4 && 103 !== t4 && t4 !== E3 && 666 !== t4 ? R3(e4, _3) : (e4.state = null, t4 === E3 ? R3(e4, -3) : m3) : _3;
|
|
13250
|
+
}, r3.deflateSetDictionary = function(e4, t4) {
|
|
13251
|
+
var r4, n4, i4, s4, a4, o4, h3, u4, l3 = t4.length;
|
|
13252
|
+
if (!e4 || !e4.state) return _3;
|
|
13253
|
+
if (2 === (s4 = (r4 = e4.state).wrap) || 1 === s4 && r4.status !== C3 || r4.lookahead) return _3;
|
|
13254
|
+
for (1 === s4 && (e4.adler = d(e4.adler, t4, l3, 0)), r4.wrap = 0, l3 >= r4.w_size && (0 === s4 && (D3(r4.head), r4.strstart = 0, r4.block_start = 0, r4.insert = 0), u4 = new c3.Buf8(r4.w_size), c3.arraySet(u4, t4, l3 - r4.w_size, r4.w_size, 0), t4 = u4, l3 = r4.w_size), a4 = e4.avail_in, o4 = e4.next_in, h3 = e4.input, e4.avail_in = l3, e4.next_in = 0, e4.input = t4, j3(r4); r4.lookahead >= x3; ) {
|
|
13255
|
+
for (n4 = r4.strstart, i4 = r4.lookahead - (x3 - 1); r4.ins_h = (r4.ins_h << r4.hash_shift ^ r4.window[n4 + x3 - 1]) & r4.hash_mask, r4.prev[n4 & r4.w_mask] = r4.head[r4.ins_h], r4.head[r4.ins_h] = n4, n4++, --i4; ) ;
|
|
13256
|
+
r4.strstart = n4, r4.lookahead = x3 - 1, j3(r4);
|
|
13257
|
+
}
|
|
13258
|
+
return r4.strstart += r4.lookahead, r4.block_start = r4.strstart, r4.insert = r4.lookahead, r4.lookahead = 0, r4.match_length = r4.prev_length = x3 - 1, r4.match_available = 0, e4.next_in = o4, e4.input = h3, e4.avail_in = a4, r4.wrap = s4, m3;
|
|
13259
|
+
}, r3.deflateInfo = "pako deflate (from Nodeca project)";
|
|
13260
|
+
}, { "../utils/common": 41, "./adler32": 43, "./crc32": 45, "./messages": 51, "./trees": 52 }], 47: [function(e3, t3, r3) {
|
|
13261
|
+
"use strict";
|
|
13262
|
+
t3.exports = function() {
|
|
13263
|
+
this.text = 0, this.time = 0, this.xflags = 0, this.os = 0, this.extra = null, this.extra_len = 0, this.name = "", this.comment = "", this.hcrc = 0, this.done = false;
|
|
13264
|
+
};
|
|
13265
|
+
}, {}], 48: [function(e3, t3, r3) {
|
|
13266
|
+
"use strict";
|
|
13267
|
+
t3.exports = function(e4, t4) {
|
|
13268
|
+
var r4, n3, i3, s3, a3, o3, h2, u3, l2, f, c3, d, p3, m3, _3, g3, b3, v3, y3, w3, k3, x3, S3, z3, C3;
|
|
13269
|
+
r4 = e4.state, n3 = e4.next_in, z3 = e4.input, i3 = n3 + (e4.avail_in - 5), s3 = e4.next_out, C3 = e4.output, a3 = s3 - (t4 - e4.avail_out), o3 = s3 + (e4.avail_out - 257), h2 = r4.dmax, u3 = r4.wsize, l2 = r4.whave, f = r4.wnext, c3 = r4.window, d = r4.hold, p3 = r4.bits, m3 = r4.lencode, _3 = r4.distcode, g3 = (1 << r4.lenbits) - 1, b3 = (1 << r4.distbits) - 1;
|
|
13270
|
+
e: do {
|
|
13271
|
+
p3 < 15 && (d += z3[n3++] << p3, p3 += 8, d += z3[n3++] << p3, p3 += 8), v3 = m3[d & g3];
|
|
13272
|
+
t: for (; ; ) {
|
|
13273
|
+
if (d >>>= y3 = v3 >>> 24, p3 -= y3, 0 === (y3 = v3 >>> 16 & 255)) C3[s3++] = 65535 & v3;
|
|
13274
|
+
else {
|
|
13275
|
+
if (!(16 & y3)) {
|
|
13276
|
+
if (0 == (64 & y3)) {
|
|
13277
|
+
v3 = m3[(65535 & v3) + (d & (1 << y3) - 1)];
|
|
13278
|
+
continue t;
|
|
13279
|
+
}
|
|
13280
|
+
if (32 & y3) {
|
|
13281
|
+
r4.mode = 12;
|
|
13282
|
+
break e;
|
|
13283
|
+
}
|
|
13284
|
+
e4.msg = "invalid literal/length code", r4.mode = 30;
|
|
13285
|
+
break e;
|
|
13286
|
+
}
|
|
13287
|
+
w3 = 65535 & v3, (y3 &= 15) && (p3 < y3 && (d += z3[n3++] << p3, p3 += 8), w3 += d & (1 << y3) - 1, d >>>= y3, p3 -= y3), p3 < 15 && (d += z3[n3++] << p3, p3 += 8, d += z3[n3++] << p3, p3 += 8), v3 = _3[d & b3];
|
|
13288
|
+
r: for (; ; ) {
|
|
13289
|
+
if (d >>>= y3 = v3 >>> 24, p3 -= y3, !(16 & (y3 = v3 >>> 16 & 255))) {
|
|
13290
|
+
if (0 == (64 & y3)) {
|
|
13291
|
+
v3 = _3[(65535 & v3) + (d & (1 << y3) - 1)];
|
|
13292
|
+
continue r;
|
|
13293
|
+
}
|
|
13294
|
+
e4.msg = "invalid distance code", r4.mode = 30;
|
|
13295
|
+
break e;
|
|
13296
|
+
}
|
|
13297
|
+
if (k3 = 65535 & v3, p3 < (y3 &= 15) && (d += z3[n3++] << p3, (p3 += 8) < y3 && (d += z3[n3++] << p3, p3 += 8)), h2 < (k3 += d & (1 << y3) - 1)) {
|
|
13298
|
+
e4.msg = "invalid distance too far back", r4.mode = 30;
|
|
13299
|
+
break e;
|
|
13300
|
+
}
|
|
13301
|
+
if (d >>>= y3, p3 -= y3, (y3 = s3 - a3) < k3) {
|
|
13302
|
+
if (l2 < (y3 = k3 - y3) && r4.sane) {
|
|
13303
|
+
e4.msg = "invalid distance too far back", r4.mode = 30;
|
|
13304
|
+
break e;
|
|
13305
|
+
}
|
|
13306
|
+
if (S3 = c3, (x3 = 0) === f) {
|
|
13307
|
+
if (x3 += u3 - y3, y3 < w3) {
|
|
13308
|
+
for (w3 -= y3; C3[s3++] = c3[x3++], --y3; ) ;
|
|
13309
|
+
x3 = s3 - k3, S3 = C3;
|
|
13310
|
+
}
|
|
13311
|
+
} else if (f < y3) {
|
|
13312
|
+
if (x3 += u3 + f - y3, (y3 -= f) < w3) {
|
|
13313
|
+
for (w3 -= y3; C3[s3++] = c3[x3++], --y3; ) ;
|
|
13314
|
+
if (x3 = 0, f < w3) {
|
|
13315
|
+
for (w3 -= y3 = f; C3[s3++] = c3[x3++], --y3; ) ;
|
|
13316
|
+
x3 = s3 - k3, S3 = C3;
|
|
13317
|
+
}
|
|
13318
|
+
}
|
|
13319
|
+
} else if (x3 += f - y3, y3 < w3) {
|
|
13320
|
+
for (w3 -= y3; C3[s3++] = c3[x3++], --y3; ) ;
|
|
13321
|
+
x3 = s3 - k3, S3 = C3;
|
|
13322
|
+
}
|
|
13323
|
+
for (; 2 < w3; ) C3[s3++] = S3[x3++], C3[s3++] = S3[x3++], C3[s3++] = S3[x3++], w3 -= 3;
|
|
13324
|
+
w3 && (C3[s3++] = S3[x3++], 1 < w3 && (C3[s3++] = S3[x3++]));
|
|
13325
|
+
} else {
|
|
13326
|
+
for (x3 = s3 - k3; C3[s3++] = C3[x3++], C3[s3++] = C3[x3++], C3[s3++] = C3[x3++], 2 < (w3 -= 3); ) ;
|
|
13327
|
+
w3 && (C3[s3++] = C3[x3++], 1 < w3 && (C3[s3++] = C3[x3++]));
|
|
13328
|
+
}
|
|
13329
|
+
break;
|
|
13330
|
+
}
|
|
13331
|
+
}
|
|
13332
|
+
break;
|
|
13333
|
+
}
|
|
13334
|
+
} while (n3 < i3 && s3 < o3);
|
|
13335
|
+
n3 -= w3 = p3 >> 3, d &= (1 << (p3 -= w3 << 3)) - 1, e4.next_in = n3, e4.next_out = s3, e4.avail_in = n3 < i3 ? i3 - n3 + 5 : 5 - (n3 - i3), e4.avail_out = s3 < o3 ? o3 - s3 + 257 : 257 - (s3 - o3), r4.hold = d, r4.bits = p3;
|
|
13336
|
+
};
|
|
13337
|
+
}, {}], 49: [function(e3, t3, r3) {
|
|
13338
|
+
"use strict";
|
|
13339
|
+
var I3 = e3("../utils/common"), O3 = e3("./adler32"), B3 = e3("./crc32"), R3 = e3("./inffast"), T3 = e3("./inftrees"), D3 = 1, F3 = 2, N3 = 0, U3 = -2, P3 = 1, n3 = 852, i3 = 592;
|
|
13340
|
+
function L3(e4) {
|
|
13341
|
+
return (e4 >>> 24 & 255) + (e4 >>> 8 & 65280) + ((65280 & e4) << 8) + ((255 & e4) << 24);
|
|
13342
|
+
}
|
|
13343
|
+
function s3() {
|
|
13344
|
+
this.mode = 0, this.last = false, this.wrap = 0, this.havedict = false, this.flags = 0, this.dmax = 0, this.check = 0, this.total = 0, this.head = null, this.wbits = 0, this.wsize = 0, this.whave = 0, this.wnext = 0, this.window = null, this.hold = 0, this.bits = 0, this.length = 0, this.offset = 0, this.extra = 0, this.lencode = null, this.distcode = null, this.lenbits = 0, this.distbits = 0, this.ncode = 0, this.nlen = 0, this.ndist = 0, this.have = 0, this.next = null, this.lens = new I3.Buf16(320), this.work = new I3.Buf16(288), this.lendyn = null, this.distdyn = null, this.sane = 0, this.back = 0, this.was = 0;
|
|
13345
|
+
}
|
|
13346
|
+
function a3(e4) {
|
|
13347
|
+
var t4;
|
|
13348
|
+
return e4 && e4.state ? (t4 = e4.state, e4.total_in = e4.total_out = t4.total = 0, e4.msg = "", t4.wrap && (e4.adler = 1 & t4.wrap), t4.mode = P3, t4.last = 0, t4.havedict = 0, t4.dmax = 32768, t4.head = null, t4.hold = 0, t4.bits = 0, t4.lencode = t4.lendyn = new I3.Buf32(n3), t4.distcode = t4.distdyn = new I3.Buf32(i3), t4.sane = 1, t4.back = -1, N3) : U3;
|
|
13349
|
+
}
|
|
13350
|
+
function o3(e4) {
|
|
13351
|
+
var t4;
|
|
13352
|
+
return e4 && e4.state ? ((t4 = e4.state).wsize = 0, t4.whave = 0, t4.wnext = 0, a3(e4)) : U3;
|
|
13353
|
+
}
|
|
13354
|
+
function h2(e4, t4) {
|
|
13355
|
+
var r4, n4;
|
|
13356
|
+
return e4 && e4.state ? (n4 = e4.state, t4 < 0 ? (r4 = 0, t4 = -t4) : (r4 = 1 + (t4 >> 4), t4 < 48 && (t4 &= 15)), t4 && (t4 < 8 || 15 < t4) ? U3 : (null !== n4.window && n4.wbits !== t4 && (n4.window = null), n4.wrap = r4, n4.wbits = t4, o3(e4))) : U3;
|
|
13357
|
+
}
|
|
13358
|
+
function u3(e4, t4) {
|
|
13359
|
+
var r4, n4;
|
|
13360
|
+
return e4 ? (n4 = new s3(), (e4.state = n4).window = null, (r4 = h2(e4, t4)) !== N3 && (e4.state = null), r4) : U3;
|
|
13361
|
+
}
|
|
13362
|
+
var l2, f, c3 = true;
|
|
13363
|
+
function j3(e4) {
|
|
13364
|
+
if (c3) {
|
|
13365
|
+
var t4;
|
|
13366
|
+
for (l2 = new I3.Buf32(512), f = new I3.Buf32(32), t4 = 0; t4 < 144; ) e4.lens[t4++] = 8;
|
|
13367
|
+
for (; t4 < 256; ) e4.lens[t4++] = 9;
|
|
13368
|
+
for (; t4 < 280; ) e4.lens[t4++] = 7;
|
|
13369
|
+
for (; t4 < 288; ) e4.lens[t4++] = 8;
|
|
13370
|
+
for (T3(D3, e4.lens, 0, 288, l2, 0, e4.work, { bits: 9 }), t4 = 0; t4 < 32; ) e4.lens[t4++] = 5;
|
|
13371
|
+
T3(F3, e4.lens, 0, 32, f, 0, e4.work, { bits: 5 }), c3 = false;
|
|
13372
|
+
}
|
|
13373
|
+
e4.lencode = l2, e4.lenbits = 9, e4.distcode = f, e4.distbits = 5;
|
|
13374
|
+
}
|
|
13375
|
+
function Z3(e4, t4, r4, n4) {
|
|
13376
|
+
var i4, s4 = e4.state;
|
|
13377
|
+
return null === s4.window && (s4.wsize = 1 << s4.wbits, s4.wnext = 0, s4.whave = 0, s4.window = new I3.Buf8(s4.wsize)), n4 >= s4.wsize ? (I3.arraySet(s4.window, t4, r4 - s4.wsize, s4.wsize, 0), s4.wnext = 0, s4.whave = s4.wsize) : (n4 < (i4 = s4.wsize - s4.wnext) && (i4 = n4), I3.arraySet(s4.window, t4, r4 - n4, i4, s4.wnext), (n4 -= i4) ? (I3.arraySet(s4.window, t4, r4 - n4, n4, 0), s4.wnext = n4, s4.whave = s4.wsize) : (s4.wnext += i4, s4.wnext === s4.wsize && (s4.wnext = 0), s4.whave < s4.wsize && (s4.whave += i4))), 0;
|
|
13378
|
+
}
|
|
13379
|
+
r3.inflateReset = o3, r3.inflateReset2 = h2, r3.inflateResetKeep = a3, r3.inflateInit = function(e4) {
|
|
13380
|
+
return u3(e4, 15);
|
|
13381
|
+
}, r3.inflateInit2 = u3, r3.inflate = function(e4, t4) {
|
|
13382
|
+
var r4, n4, i4, s4, a4, o4, h3, u4, l3, f2, c4, d, p3, m3, _3, g3, b3, v3, y3, w3, k3, x3, S3, z3, C3 = 0, E3 = new I3.Buf8(4), A3 = [16, 17, 18, 0, 8, 7, 9, 6, 10, 5, 11, 4, 12, 3, 13, 2, 14, 1, 15];
|
|
13383
|
+
if (!e4 || !e4.state || !e4.output || !e4.input && 0 !== e4.avail_in) return U3;
|
|
13384
|
+
12 === (r4 = e4.state).mode && (r4.mode = 13), a4 = e4.next_out, i4 = e4.output, h3 = e4.avail_out, s4 = e4.next_in, n4 = e4.input, o4 = e4.avail_in, u4 = r4.hold, l3 = r4.bits, f2 = o4, c4 = h3, x3 = N3;
|
|
13385
|
+
e: for (; ; ) switch (r4.mode) {
|
|
13386
|
+
case P3:
|
|
13387
|
+
if (0 === r4.wrap) {
|
|
13388
|
+
r4.mode = 13;
|
|
13389
|
+
break;
|
|
13390
|
+
}
|
|
13391
|
+
for (; l3 < 16; ) {
|
|
13392
|
+
if (0 === o4) break e;
|
|
13393
|
+
o4--, u4 += n4[s4++] << l3, l3 += 8;
|
|
13394
|
+
}
|
|
13395
|
+
if (2 & r4.wrap && 35615 === u4) {
|
|
13396
|
+
E3[r4.check = 0] = 255 & u4, E3[1] = u4 >>> 8 & 255, r4.check = B3(r4.check, E3, 2, 0), l3 = u4 = 0, r4.mode = 2;
|
|
13397
|
+
break;
|
|
13398
|
+
}
|
|
13399
|
+
if (r4.flags = 0, r4.head && (r4.head.done = false), !(1 & r4.wrap) || (((255 & u4) << 8) + (u4 >> 8)) % 31) {
|
|
13400
|
+
e4.msg = "incorrect header check", r4.mode = 30;
|
|
13401
|
+
break;
|
|
13402
|
+
}
|
|
13403
|
+
if (8 != (15 & u4)) {
|
|
13404
|
+
e4.msg = "unknown compression method", r4.mode = 30;
|
|
13405
|
+
break;
|
|
13406
|
+
}
|
|
13407
|
+
if (l3 -= 4, k3 = 8 + (15 & (u4 >>>= 4)), 0 === r4.wbits) r4.wbits = k3;
|
|
13408
|
+
else if (k3 > r4.wbits) {
|
|
13409
|
+
e4.msg = "invalid window size", r4.mode = 30;
|
|
13410
|
+
break;
|
|
13411
|
+
}
|
|
13412
|
+
r4.dmax = 1 << k3, e4.adler = r4.check = 1, r4.mode = 512 & u4 ? 10 : 12, l3 = u4 = 0;
|
|
13413
|
+
break;
|
|
13414
|
+
case 2:
|
|
13415
|
+
for (; l3 < 16; ) {
|
|
13416
|
+
if (0 === o4) break e;
|
|
13417
|
+
o4--, u4 += n4[s4++] << l3, l3 += 8;
|
|
13418
|
+
}
|
|
13419
|
+
if (r4.flags = u4, 8 != (255 & r4.flags)) {
|
|
13420
|
+
e4.msg = "unknown compression method", r4.mode = 30;
|
|
13421
|
+
break;
|
|
13422
|
+
}
|
|
13423
|
+
if (57344 & r4.flags) {
|
|
13424
|
+
e4.msg = "unknown header flags set", r4.mode = 30;
|
|
13425
|
+
break;
|
|
13426
|
+
}
|
|
13427
|
+
r4.head && (r4.head.text = u4 >> 8 & 1), 512 & r4.flags && (E3[0] = 255 & u4, E3[1] = u4 >>> 8 & 255, r4.check = B3(r4.check, E3, 2, 0)), l3 = u4 = 0, r4.mode = 3;
|
|
13428
|
+
case 3:
|
|
13429
|
+
for (; l3 < 32; ) {
|
|
13430
|
+
if (0 === o4) break e;
|
|
13431
|
+
o4--, u4 += n4[s4++] << l3, l3 += 8;
|
|
13432
|
+
}
|
|
13433
|
+
r4.head && (r4.head.time = u4), 512 & r4.flags && (E3[0] = 255 & u4, E3[1] = u4 >>> 8 & 255, E3[2] = u4 >>> 16 & 255, E3[3] = u4 >>> 24 & 255, r4.check = B3(r4.check, E3, 4, 0)), l3 = u4 = 0, r4.mode = 4;
|
|
13434
|
+
case 4:
|
|
13435
|
+
for (; l3 < 16; ) {
|
|
13436
|
+
if (0 === o4) break e;
|
|
13437
|
+
o4--, u4 += n4[s4++] << l3, l3 += 8;
|
|
13438
|
+
}
|
|
13439
|
+
r4.head && (r4.head.xflags = 255 & u4, r4.head.os = u4 >> 8), 512 & r4.flags && (E3[0] = 255 & u4, E3[1] = u4 >>> 8 & 255, r4.check = B3(r4.check, E3, 2, 0)), l3 = u4 = 0, r4.mode = 5;
|
|
13440
|
+
case 5:
|
|
13441
|
+
if (1024 & r4.flags) {
|
|
13442
|
+
for (; l3 < 16; ) {
|
|
13443
|
+
if (0 === o4) break e;
|
|
13444
|
+
o4--, u4 += n4[s4++] << l3, l3 += 8;
|
|
13445
|
+
}
|
|
13446
|
+
r4.length = u4, r4.head && (r4.head.extra_len = u4), 512 & r4.flags && (E3[0] = 255 & u4, E3[1] = u4 >>> 8 & 255, r4.check = B3(r4.check, E3, 2, 0)), l3 = u4 = 0;
|
|
13447
|
+
} else r4.head && (r4.head.extra = null);
|
|
13448
|
+
r4.mode = 6;
|
|
13449
|
+
case 6:
|
|
13450
|
+
if (1024 & r4.flags && (o4 < (d = r4.length) && (d = o4), d && (r4.head && (k3 = r4.head.extra_len - r4.length, r4.head.extra || (r4.head.extra = new Array(r4.head.extra_len)), I3.arraySet(r4.head.extra, n4, s4, d, k3)), 512 & r4.flags && (r4.check = B3(r4.check, n4, d, s4)), o4 -= d, s4 += d, r4.length -= d), r4.length)) break e;
|
|
13451
|
+
r4.length = 0, r4.mode = 7;
|
|
13452
|
+
case 7:
|
|
13453
|
+
if (2048 & r4.flags) {
|
|
13454
|
+
if (0 === o4) break e;
|
|
13455
|
+
for (d = 0; k3 = n4[s4 + d++], r4.head && k3 && r4.length < 65536 && (r4.head.name += String.fromCharCode(k3)), k3 && d < o4; ) ;
|
|
13456
|
+
if (512 & r4.flags && (r4.check = B3(r4.check, n4, d, s4)), o4 -= d, s4 += d, k3) break e;
|
|
13457
|
+
} else r4.head && (r4.head.name = null);
|
|
13458
|
+
r4.length = 0, r4.mode = 8;
|
|
13459
|
+
case 8:
|
|
13460
|
+
if (4096 & r4.flags) {
|
|
13461
|
+
if (0 === o4) break e;
|
|
13462
|
+
for (d = 0; k3 = n4[s4 + d++], r4.head && k3 && r4.length < 65536 && (r4.head.comment += String.fromCharCode(k3)), k3 && d < o4; ) ;
|
|
13463
|
+
if (512 & r4.flags && (r4.check = B3(r4.check, n4, d, s4)), o4 -= d, s4 += d, k3) break e;
|
|
13464
|
+
} else r4.head && (r4.head.comment = null);
|
|
13465
|
+
r4.mode = 9;
|
|
13466
|
+
case 9:
|
|
13467
|
+
if (512 & r4.flags) {
|
|
13468
|
+
for (; l3 < 16; ) {
|
|
13469
|
+
if (0 === o4) break e;
|
|
13470
|
+
o4--, u4 += n4[s4++] << l3, l3 += 8;
|
|
13471
|
+
}
|
|
13472
|
+
if (u4 !== (65535 & r4.check)) {
|
|
13473
|
+
e4.msg = "header crc mismatch", r4.mode = 30;
|
|
13474
|
+
break;
|
|
13475
|
+
}
|
|
13476
|
+
l3 = u4 = 0;
|
|
13477
|
+
}
|
|
13478
|
+
r4.head && (r4.head.hcrc = r4.flags >> 9 & 1, r4.head.done = true), e4.adler = r4.check = 0, r4.mode = 12;
|
|
13479
|
+
break;
|
|
13480
|
+
case 10:
|
|
13481
|
+
for (; l3 < 32; ) {
|
|
13482
|
+
if (0 === o4) break e;
|
|
13483
|
+
o4--, u4 += n4[s4++] << l3, l3 += 8;
|
|
13484
|
+
}
|
|
13485
|
+
e4.adler = r4.check = L3(u4), l3 = u4 = 0, r4.mode = 11;
|
|
13486
|
+
case 11:
|
|
13487
|
+
if (0 === r4.havedict) return e4.next_out = a4, e4.avail_out = h3, e4.next_in = s4, e4.avail_in = o4, r4.hold = u4, r4.bits = l3, 2;
|
|
13488
|
+
e4.adler = r4.check = 1, r4.mode = 12;
|
|
13489
|
+
case 12:
|
|
13490
|
+
if (5 === t4 || 6 === t4) break e;
|
|
13491
|
+
case 13:
|
|
13492
|
+
if (r4.last) {
|
|
13493
|
+
u4 >>>= 7 & l3, l3 -= 7 & l3, r4.mode = 27;
|
|
13494
|
+
break;
|
|
13495
|
+
}
|
|
13496
|
+
for (; l3 < 3; ) {
|
|
13497
|
+
if (0 === o4) break e;
|
|
13498
|
+
o4--, u4 += n4[s4++] << l3, l3 += 8;
|
|
13499
|
+
}
|
|
13500
|
+
switch (r4.last = 1 & u4, l3 -= 1, 3 & (u4 >>>= 1)) {
|
|
13501
|
+
case 0:
|
|
13502
|
+
r4.mode = 14;
|
|
13503
|
+
break;
|
|
13504
|
+
case 1:
|
|
13505
|
+
if (j3(r4), r4.mode = 20, 6 !== t4) break;
|
|
13506
|
+
u4 >>>= 2, l3 -= 2;
|
|
13507
|
+
break e;
|
|
13508
|
+
case 2:
|
|
13509
|
+
r4.mode = 17;
|
|
13510
|
+
break;
|
|
13511
|
+
case 3:
|
|
13512
|
+
e4.msg = "invalid block type", r4.mode = 30;
|
|
13513
|
+
}
|
|
13514
|
+
u4 >>>= 2, l3 -= 2;
|
|
13515
|
+
break;
|
|
13516
|
+
case 14:
|
|
13517
|
+
for (u4 >>>= 7 & l3, l3 -= 7 & l3; l3 < 32; ) {
|
|
13518
|
+
if (0 === o4) break e;
|
|
13519
|
+
o4--, u4 += n4[s4++] << l3, l3 += 8;
|
|
13520
|
+
}
|
|
13521
|
+
if ((65535 & u4) != (u4 >>> 16 ^ 65535)) {
|
|
13522
|
+
e4.msg = "invalid stored block lengths", r4.mode = 30;
|
|
13523
|
+
break;
|
|
13524
|
+
}
|
|
13525
|
+
if (r4.length = 65535 & u4, l3 = u4 = 0, r4.mode = 15, 6 === t4) break e;
|
|
13526
|
+
case 15:
|
|
13527
|
+
r4.mode = 16;
|
|
13528
|
+
case 16:
|
|
13529
|
+
if (d = r4.length) {
|
|
13530
|
+
if (o4 < d && (d = o4), h3 < d && (d = h3), 0 === d) break e;
|
|
13531
|
+
I3.arraySet(i4, n4, s4, d, a4), o4 -= d, s4 += d, h3 -= d, a4 += d, r4.length -= d;
|
|
13532
|
+
break;
|
|
13533
|
+
}
|
|
13534
|
+
r4.mode = 12;
|
|
13535
|
+
break;
|
|
13536
|
+
case 17:
|
|
13537
|
+
for (; l3 < 14; ) {
|
|
13538
|
+
if (0 === o4) break e;
|
|
13539
|
+
o4--, u4 += n4[s4++] << l3, l3 += 8;
|
|
13540
|
+
}
|
|
13541
|
+
if (r4.nlen = 257 + (31 & u4), u4 >>>= 5, l3 -= 5, r4.ndist = 1 + (31 & u4), u4 >>>= 5, l3 -= 5, r4.ncode = 4 + (15 & u4), u4 >>>= 4, l3 -= 4, 286 < r4.nlen || 30 < r4.ndist) {
|
|
13542
|
+
e4.msg = "too many length or distance symbols", r4.mode = 30;
|
|
13543
|
+
break;
|
|
13544
|
+
}
|
|
13545
|
+
r4.have = 0, r4.mode = 18;
|
|
13546
|
+
case 18:
|
|
13547
|
+
for (; r4.have < r4.ncode; ) {
|
|
13548
|
+
for (; l3 < 3; ) {
|
|
13549
|
+
if (0 === o4) break e;
|
|
13550
|
+
o4--, u4 += n4[s4++] << l3, l3 += 8;
|
|
13551
|
+
}
|
|
13552
|
+
r4.lens[A3[r4.have++]] = 7 & u4, u4 >>>= 3, l3 -= 3;
|
|
13553
|
+
}
|
|
13554
|
+
for (; r4.have < 19; ) r4.lens[A3[r4.have++]] = 0;
|
|
13555
|
+
if (r4.lencode = r4.lendyn, r4.lenbits = 7, S3 = { bits: r4.lenbits }, x3 = T3(0, r4.lens, 0, 19, r4.lencode, 0, r4.work, S3), r4.lenbits = S3.bits, x3) {
|
|
13556
|
+
e4.msg = "invalid code lengths set", r4.mode = 30;
|
|
13557
|
+
break;
|
|
13558
|
+
}
|
|
13559
|
+
r4.have = 0, r4.mode = 19;
|
|
13560
|
+
case 19:
|
|
13561
|
+
for (; r4.have < r4.nlen + r4.ndist; ) {
|
|
13562
|
+
for (; g3 = (C3 = r4.lencode[u4 & (1 << r4.lenbits) - 1]) >>> 16 & 255, b3 = 65535 & C3, !((_3 = C3 >>> 24) <= l3); ) {
|
|
13563
|
+
if (0 === o4) break e;
|
|
13564
|
+
o4--, u4 += n4[s4++] << l3, l3 += 8;
|
|
13565
|
+
}
|
|
13566
|
+
if (b3 < 16) u4 >>>= _3, l3 -= _3, r4.lens[r4.have++] = b3;
|
|
13567
|
+
else {
|
|
13568
|
+
if (16 === b3) {
|
|
13569
|
+
for (z3 = _3 + 2; l3 < z3; ) {
|
|
13570
|
+
if (0 === o4) break e;
|
|
13571
|
+
o4--, u4 += n4[s4++] << l3, l3 += 8;
|
|
13572
|
+
}
|
|
13573
|
+
if (u4 >>>= _3, l3 -= _3, 0 === r4.have) {
|
|
13574
|
+
e4.msg = "invalid bit length repeat", r4.mode = 30;
|
|
13575
|
+
break;
|
|
13576
|
+
}
|
|
13577
|
+
k3 = r4.lens[r4.have - 1], d = 3 + (3 & u4), u4 >>>= 2, l3 -= 2;
|
|
13578
|
+
} else if (17 === b3) {
|
|
13579
|
+
for (z3 = _3 + 3; l3 < z3; ) {
|
|
13580
|
+
if (0 === o4) break e;
|
|
13581
|
+
o4--, u4 += n4[s4++] << l3, l3 += 8;
|
|
13582
|
+
}
|
|
13583
|
+
l3 -= _3, k3 = 0, d = 3 + (7 & (u4 >>>= _3)), u4 >>>= 3, l3 -= 3;
|
|
13584
|
+
} else {
|
|
13585
|
+
for (z3 = _3 + 7; l3 < z3; ) {
|
|
13586
|
+
if (0 === o4) break e;
|
|
13587
|
+
o4--, u4 += n4[s4++] << l3, l3 += 8;
|
|
13588
|
+
}
|
|
13589
|
+
l3 -= _3, k3 = 0, d = 11 + (127 & (u4 >>>= _3)), u4 >>>= 7, l3 -= 7;
|
|
13590
|
+
}
|
|
13591
|
+
if (r4.have + d > r4.nlen + r4.ndist) {
|
|
13592
|
+
e4.msg = "invalid bit length repeat", r4.mode = 30;
|
|
13593
|
+
break;
|
|
13594
|
+
}
|
|
13595
|
+
for (; d--; ) r4.lens[r4.have++] = k3;
|
|
13596
|
+
}
|
|
13597
|
+
}
|
|
13598
|
+
if (30 === r4.mode) break;
|
|
13599
|
+
if (0 === r4.lens[256]) {
|
|
13600
|
+
e4.msg = "invalid code -- missing end-of-block", r4.mode = 30;
|
|
13601
|
+
break;
|
|
13602
|
+
}
|
|
13603
|
+
if (r4.lenbits = 9, S3 = { bits: r4.lenbits }, x3 = T3(D3, r4.lens, 0, r4.nlen, r4.lencode, 0, r4.work, S3), r4.lenbits = S3.bits, x3) {
|
|
13604
|
+
e4.msg = "invalid literal/lengths set", r4.mode = 30;
|
|
13605
|
+
break;
|
|
13606
|
+
}
|
|
13607
|
+
if (r4.distbits = 6, r4.distcode = r4.distdyn, S3 = { bits: r4.distbits }, x3 = T3(F3, r4.lens, r4.nlen, r4.ndist, r4.distcode, 0, r4.work, S3), r4.distbits = S3.bits, x3) {
|
|
13608
|
+
e4.msg = "invalid distances set", r4.mode = 30;
|
|
13609
|
+
break;
|
|
13610
|
+
}
|
|
13611
|
+
if (r4.mode = 20, 6 === t4) break e;
|
|
13612
|
+
case 20:
|
|
13613
|
+
r4.mode = 21;
|
|
13614
|
+
case 21:
|
|
13615
|
+
if (6 <= o4 && 258 <= h3) {
|
|
13616
|
+
e4.next_out = a4, e4.avail_out = h3, e4.next_in = s4, e4.avail_in = o4, r4.hold = u4, r4.bits = l3, R3(e4, c4), a4 = e4.next_out, i4 = e4.output, h3 = e4.avail_out, s4 = e4.next_in, n4 = e4.input, o4 = e4.avail_in, u4 = r4.hold, l3 = r4.bits, 12 === r4.mode && (r4.back = -1);
|
|
13617
|
+
break;
|
|
13618
|
+
}
|
|
13619
|
+
for (r4.back = 0; g3 = (C3 = r4.lencode[u4 & (1 << r4.lenbits) - 1]) >>> 16 & 255, b3 = 65535 & C3, !((_3 = C3 >>> 24) <= l3); ) {
|
|
13620
|
+
if (0 === o4) break e;
|
|
13621
|
+
o4--, u4 += n4[s4++] << l3, l3 += 8;
|
|
13622
|
+
}
|
|
13623
|
+
if (g3 && 0 == (240 & g3)) {
|
|
13624
|
+
for (v3 = _3, y3 = g3, w3 = b3; g3 = (C3 = r4.lencode[w3 + ((u4 & (1 << v3 + y3) - 1) >> v3)]) >>> 16 & 255, b3 = 65535 & C3, !(v3 + (_3 = C3 >>> 24) <= l3); ) {
|
|
13625
|
+
if (0 === o4) break e;
|
|
13626
|
+
o4--, u4 += n4[s4++] << l3, l3 += 8;
|
|
13627
|
+
}
|
|
13628
|
+
u4 >>>= v3, l3 -= v3, r4.back += v3;
|
|
13629
|
+
}
|
|
13630
|
+
if (u4 >>>= _3, l3 -= _3, r4.back += _3, r4.length = b3, 0 === g3) {
|
|
13631
|
+
r4.mode = 26;
|
|
13632
|
+
break;
|
|
13633
|
+
}
|
|
13634
|
+
if (32 & g3) {
|
|
13635
|
+
r4.back = -1, r4.mode = 12;
|
|
13636
|
+
break;
|
|
13637
|
+
}
|
|
13638
|
+
if (64 & g3) {
|
|
13639
|
+
e4.msg = "invalid literal/length code", r4.mode = 30;
|
|
13640
|
+
break;
|
|
13641
|
+
}
|
|
13642
|
+
r4.extra = 15 & g3, r4.mode = 22;
|
|
13643
|
+
case 22:
|
|
13644
|
+
if (r4.extra) {
|
|
13645
|
+
for (z3 = r4.extra; l3 < z3; ) {
|
|
13646
|
+
if (0 === o4) break e;
|
|
13647
|
+
o4--, u4 += n4[s4++] << l3, l3 += 8;
|
|
13648
|
+
}
|
|
13649
|
+
r4.length += u4 & (1 << r4.extra) - 1, u4 >>>= r4.extra, l3 -= r4.extra, r4.back += r4.extra;
|
|
13650
|
+
}
|
|
13651
|
+
r4.was = r4.length, r4.mode = 23;
|
|
13652
|
+
case 23:
|
|
13653
|
+
for (; g3 = (C3 = r4.distcode[u4 & (1 << r4.distbits) - 1]) >>> 16 & 255, b3 = 65535 & C3, !((_3 = C3 >>> 24) <= l3); ) {
|
|
13654
|
+
if (0 === o4) break e;
|
|
13655
|
+
o4--, u4 += n4[s4++] << l3, l3 += 8;
|
|
13656
|
+
}
|
|
13657
|
+
if (0 == (240 & g3)) {
|
|
13658
|
+
for (v3 = _3, y3 = g3, w3 = b3; g3 = (C3 = r4.distcode[w3 + ((u4 & (1 << v3 + y3) - 1) >> v3)]) >>> 16 & 255, b3 = 65535 & C3, !(v3 + (_3 = C3 >>> 24) <= l3); ) {
|
|
13659
|
+
if (0 === o4) break e;
|
|
13660
|
+
o4--, u4 += n4[s4++] << l3, l3 += 8;
|
|
13661
|
+
}
|
|
13662
|
+
u4 >>>= v3, l3 -= v3, r4.back += v3;
|
|
13663
|
+
}
|
|
13664
|
+
if (u4 >>>= _3, l3 -= _3, r4.back += _3, 64 & g3) {
|
|
13665
|
+
e4.msg = "invalid distance code", r4.mode = 30;
|
|
13666
|
+
break;
|
|
13667
|
+
}
|
|
13668
|
+
r4.offset = b3, r4.extra = 15 & g3, r4.mode = 24;
|
|
13669
|
+
case 24:
|
|
13670
|
+
if (r4.extra) {
|
|
13671
|
+
for (z3 = r4.extra; l3 < z3; ) {
|
|
13672
|
+
if (0 === o4) break e;
|
|
13673
|
+
o4--, u4 += n4[s4++] << l3, l3 += 8;
|
|
13674
|
+
}
|
|
13675
|
+
r4.offset += u4 & (1 << r4.extra) - 1, u4 >>>= r4.extra, l3 -= r4.extra, r4.back += r4.extra;
|
|
13676
|
+
}
|
|
13677
|
+
if (r4.offset > r4.dmax) {
|
|
13678
|
+
e4.msg = "invalid distance too far back", r4.mode = 30;
|
|
13679
|
+
break;
|
|
13680
|
+
}
|
|
13681
|
+
r4.mode = 25;
|
|
13682
|
+
case 25:
|
|
13683
|
+
if (0 === h3) break e;
|
|
13684
|
+
if (d = c4 - h3, r4.offset > d) {
|
|
13685
|
+
if ((d = r4.offset - d) > r4.whave && r4.sane) {
|
|
13686
|
+
e4.msg = "invalid distance too far back", r4.mode = 30;
|
|
13687
|
+
break;
|
|
13688
|
+
}
|
|
13689
|
+
p3 = d > r4.wnext ? (d -= r4.wnext, r4.wsize - d) : r4.wnext - d, d > r4.length && (d = r4.length), m3 = r4.window;
|
|
13690
|
+
} else m3 = i4, p3 = a4 - r4.offset, d = r4.length;
|
|
13691
|
+
for (h3 < d && (d = h3), h3 -= d, r4.length -= d; i4[a4++] = m3[p3++], --d; ) ;
|
|
13692
|
+
0 === r4.length && (r4.mode = 21);
|
|
13693
|
+
break;
|
|
13694
|
+
case 26:
|
|
13695
|
+
if (0 === h3) break e;
|
|
13696
|
+
i4[a4++] = r4.length, h3--, r4.mode = 21;
|
|
13697
|
+
break;
|
|
13698
|
+
case 27:
|
|
13699
|
+
if (r4.wrap) {
|
|
13700
|
+
for (; l3 < 32; ) {
|
|
13701
|
+
if (0 === o4) break e;
|
|
13702
|
+
o4--, u4 |= n4[s4++] << l3, l3 += 8;
|
|
13703
|
+
}
|
|
13704
|
+
if (c4 -= h3, e4.total_out += c4, r4.total += c4, c4 && (e4.adler = r4.check = r4.flags ? B3(r4.check, i4, c4, a4 - c4) : O3(r4.check, i4, c4, a4 - c4)), c4 = h3, (r4.flags ? u4 : L3(u4)) !== r4.check) {
|
|
13705
|
+
e4.msg = "incorrect data check", r4.mode = 30;
|
|
13706
|
+
break;
|
|
13707
|
+
}
|
|
13708
|
+
l3 = u4 = 0;
|
|
13709
|
+
}
|
|
13710
|
+
r4.mode = 28;
|
|
13711
|
+
case 28:
|
|
13712
|
+
if (r4.wrap && r4.flags) {
|
|
13713
|
+
for (; l3 < 32; ) {
|
|
13714
|
+
if (0 === o4) break e;
|
|
13715
|
+
o4--, u4 += n4[s4++] << l3, l3 += 8;
|
|
13716
|
+
}
|
|
13717
|
+
if (u4 !== (4294967295 & r4.total)) {
|
|
13718
|
+
e4.msg = "incorrect length check", r4.mode = 30;
|
|
13719
|
+
break;
|
|
13720
|
+
}
|
|
13721
|
+
l3 = u4 = 0;
|
|
13722
|
+
}
|
|
13723
|
+
r4.mode = 29;
|
|
13724
|
+
case 29:
|
|
13725
|
+
x3 = 1;
|
|
13726
|
+
break e;
|
|
13727
|
+
case 30:
|
|
13728
|
+
x3 = -3;
|
|
13729
|
+
break e;
|
|
13730
|
+
case 31:
|
|
13731
|
+
return -4;
|
|
13732
|
+
case 32:
|
|
13733
|
+
default:
|
|
13734
|
+
return U3;
|
|
13735
|
+
}
|
|
13736
|
+
return e4.next_out = a4, e4.avail_out = h3, e4.next_in = s4, e4.avail_in = o4, r4.hold = u4, r4.bits = l3, (r4.wsize || c4 !== e4.avail_out && r4.mode < 30 && (r4.mode < 27 || 4 !== t4)) && Z3(e4, e4.output, e4.next_out, c4 - e4.avail_out) ? (r4.mode = 31, -4) : (f2 -= e4.avail_in, c4 -= e4.avail_out, e4.total_in += f2, e4.total_out += c4, r4.total += c4, r4.wrap && c4 && (e4.adler = r4.check = r4.flags ? B3(r4.check, i4, c4, e4.next_out - c4) : O3(r4.check, i4, c4, e4.next_out - c4)), e4.data_type = r4.bits + (r4.last ? 64 : 0) + (12 === r4.mode ? 128 : 0) + (20 === r4.mode || 15 === r4.mode ? 256 : 0), (0 == f2 && 0 === c4 || 4 === t4) && x3 === N3 && (x3 = -5), x3);
|
|
13737
|
+
}, r3.inflateEnd = function(e4) {
|
|
13738
|
+
if (!e4 || !e4.state) return U3;
|
|
13739
|
+
var t4 = e4.state;
|
|
13740
|
+
return t4.window && (t4.window = null), e4.state = null, N3;
|
|
13741
|
+
}, r3.inflateGetHeader = function(e4, t4) {
|
|
13742
|
+
var r4;
|
|
13743
|
+
return e4 && e4.state ? 0 == (2 & (r4 = e4.state).wrap) ? U3 : ((r4.head = t4).done = false, N3) : U3;
|
|
13744
|
+
}, r3.inflateSetDictionary = function(e4, t4) {
|
|
13745
|
+
var r4, n4 = t4.length;
|
|
13746
|
+
return e4 && e4.state ? 0 !== (r4 = e4.state).wrap && 11 !== r4.mode ? U3 : 11 === r4.mode && O3(1, t4, n4, 0) !== r4.check ? -3 : Z3(e4, t4, n4, n4) ? (r4.mode = 31, -4) : (r4.havedict = 1, N3) : U3;
|
|
13747
|
+
}, r3.inflateInfo = "pako inflate (from Nodeca project)";
|
|
13748
|
+
}, { "../utils/common": 41, "./adler32": 43, "./crc32": 45, "./inffast": 48, "./inftrees": 50 }], 50: [function(e3, t3, r3) {
|
|
13749
|
+
"use strict";
|
|
13750
|
+
var D3 = e3("../utils/common"), F3 = [3, 4, 5, 6, 7, 8, 9, 10, 11, 13, 15, 17, 19, 23, 27, 31, 35, 43, 51, 59, 67, 83, 99, 115, 131, 163, 195, 227, 258, 0, 0], N3 = [16, 16, 16, 16, 16, 16, 16, 16, 17, 17, 17, 17, 18, 18, 18, 18, 19, 19, 19, 19, 20, 20, 20, 20, 21, 21, 21, 21, 16, 72, 78], U3 = [1, 2, 3, 4, 5, 7, 9, 13, 17, 25, 33, 49, 65, 97, 129, 193, 257, 385, 513, 769, 1025, 1537, 2049, 3073, 4097, 6145, 8193, 12289, 16385, 24577, 0, 0], P3 = [16, 16, 16, 16, 17, 17, 18, 18, 19, 19, 20, 20, 21, 21, 22, 22, 23, 23, 24, 24, 25, 25, 26, 26, 27, 27, 28, 28, 29, 29, 64, 64];
|
|
13751
|
+
t3.exports = function(e4, t4, r4, n3, i3, s3, a3, o3) {
|
|
13752
|
+
var h2, u3, l2, f, c3, d, p3, m3, _3, g3 = o3.bits, b3 = 0, v3 = 0, y3 = 0, w3 = 0, k3 = 0, x3 = 0, S3 = 0, z3 = 0, C3 = 0, E3 = 0, A3 = null, I3 = 0, O3 = new D3.Buf16(16), B3 = new D3.Buf16(16), R3 = null, T3 = 0;
|
|
13753
|
+
for (b3 = 0; b3 <= 15; b3++) O3[b3] = 0;
|
|
13754
|
+
for (v3 = 0; v3 < n3; v3++) O3[t4[r4 + v3]]++;
|
|
13755
|
+
for (k3 = g3, w3 = 15; 1 <= w3 && 0 === O3[w3]; w3--) ;
|
|
13756
|
+
if (w3 < k3 && (k3 = w3), 0 === w3) return i3[s3++] = 20971520, i3[s3++] = 20971520, o3.bits = 1, 0;
|
|
13757
|
+
for (y3 = 1; y3 < w3 && 0 === O3[y3]; y3++) ;
|
|
13758
|
+
for (k3 < y3 && (k3 = y3), b3 = z3 = 1; b3 <= 15; b3++) if (z3 <<= 1, (z3 -= O3[b3]) < 0) return -1;
|
|
13759
|
+
if (0 < z3 && (0 === e4 || 1 !== w3)) return -1;
|
|
13760
|
+
for (B3[1] = 0, b3 = 1; b3 < 15; b3++) B3[b3 + 1] = B3[b3] + O3[b3];
|
|
13761
|
+
for (v3 = 0; v3 < n3; v3++) 0 !== t4[r4 + v3] && (a3[B3[t4[r4 + v3]]++] = v3);
|
|
13762
|
+
if (d = 0 === e4 ? (A3 = R3 = a3, 19) : 1 === e4 ? (A3 = F3, I3 -= 257, R3 = N3, T3 -= 257, 256) : (A3 = U3, R3 = P3, -1), b3 = y3, c3 = s3, S3 = v3 = E3 = 0, l2 = -1, f = (C3 = 1 << (x3 = k3)) - 1, 1 === e4 && 852 < C3 || 2 === e4 && 592 < C3) return 1;
|
|
13763
|
+
for (; ; ) {
|
|
13764
|
+
for (p3 = b3 - S3, _3 = a3[v3] < d ? (m3 = 0, a3[v3]) : a3[v3] > d ? (m3 = R3[T3 + a3[v3]], A3[I3 + a3[v3]]) : (m3 = 96, 0), h2 = 1 << b3 - S3, y3 = u3 = 1 << x3; i3[c3 + (E3 >> S3) + (u3 -= h2)] = p3 << 24 | m3 << 16 | _3 | 0, 0 !== u3; ) ;
|
|
13765
|
+
for (h2 = 1 << b3 - 1; E3 & h2; ) h2 >>= 1;
|
|
13766
|
+
if (0 !== h2 ? (E3 &= h2 - 1, E3 += h2) : E3 = 0, v3++, 0 == --O3[b3]) {
|
|
13767
|
+
if (b3 === w3) break;
|
|
13768
|
+
b3 = t4[r4 + a3[v3]];
|
|
13769
|
+
}
|
|
13770
|
+
if (k3 < b3 && (E3 & f) !== l2) {
|
|
13771
|
+
for (0 === S3 && (S3 = k3), c3 += y3, z3 = 1 << (x3 = b3 - S3); x3 + S3 < w3 && !((z3 -= O3[x3 + S3]) <= 0); ) x3++, z3 <<= 1;
|
|
13772
|
+
if (C3 += 1 << x3, 1 === e4 && 852 < C3 || 2 === e4 && 592 < C3) return 1;
|
|
13773
|
+
i3[l2 = E3 & f] = k3 << 24 | x3 << 16 | c3 - s3 | 0;
|
|
13774
|
+
}
|
|
13775
|
+
}
|
|
13776
|
+
return 0 !== E3 && (i3[c3 + E3] = b3 - S3 << 24 | 64 << 16 | 0), o3.bits = k3, 0;
|
|
13777
|
+
};
|
|
13778
|
+
}, { "../utils/common": 41 }], 51: [function(e3, t3, r3) {
|
|
13779
|
+
"use strict";
|
|
13780
|
+
t3.exports = { 2: "need dictionary", 1: "stream end", 0: "", "-1": "file error", "-2": "stream error", "-3": "data error", "-4": "insufficient memory", "-5": "buffer error", "-6": "incompatible version" };
|
|
13781
|
+
}, {}], 52: [function(e3, t3, r3) {
|
|
13782
|
+
"use strict";
|
|
13783
|
+
var i3 = e3("../utils/common"), o3 = 0, h2 = 1;
|
|
13784
|
+
function n3(e4) {
|
|
13785
|
+
for (var t4 = e4.length; 0 <= --t4; ) e4[t4] = 0;
|
|
13786
|
+
}
|
|
13787
|
+
var s3 = 0, a3 = 29, u3 = 256, l2 = u3 + 1 + a3, f = 30, c3 = 19, _3 = 2 * l2 + 1, g3 = 15, d = 16, p3 = 7, m3 = 256, b3 = 16, v3 = 17, y3 = 18, w3 = [0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 2, 2, 2, 2, 3, 3, 3, 3, 4, 4, 4, 4, 5, 5, 5, 5, 0], k3 = [0, 0, 0, 0, 1, 1, 2, 2, 3, 3, 4, 4, 5, 5, 6, 6, 7, 7, 8, 8, 9, 9, 10, 10, 11, 11, 12, 12, 13, 13], x3 = [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 2, 3, 7], S3 = [16, 17, 18, 0, 8, 7, 9, 6, 10, 5, 11, 4, 12, 3, 13, 2, 14, 1, 15], z3 = new Array(2 * (l2 + 2));
|
|
13788
|
+
n3(z3);
|
|
13789
|
+
var C3 = new Array(2 * f);
|
|
13790
|
+
n3(C3);
|
|
13791
|
+
var E3 = new Array(512);
|
|
13792
|
+
n3(E3);
|
|
13793
|
+
var A3 = new Array(256);
|
|
13794
|
+
n3(A3);
|
|
13795
|
+
var I3 = new Array(a3);
|
|
13796
|
+
n3(I3);
|
|
13797
|
+
var O3, B3, R3, T3 = new Array(f);
|
|
13798
|
+
function D3(e4, t4, r4, n4, i4) {
|
|
13799
|
+
this.static_tree = e4, this.extra_bits = t4, this.extra_base = r4, this.elems = n4, this.max_length = i4, this.has_stree = e4 && e4.length;
|
|
13800
|
+
}
|
|
13801
|
+
function F3(e4, t4) {
|
|
13802
|
+
this.dyn_tree = e4, this.max_code = 0, this.stat_desc = t4;
|
|
13803
|
+
}
|
|
13804
|
+
function N3(e4) {
|
|
13805
|
+
return e4 < 256 ? E3[e4] : E3[256 + (e4 >>> 7)];
|
|
13806
|
+
}
|
|
13807
|
+
function U3(e4, t4) {
|
|
13808
|
+
e4.pending_buf[e4.pending++] = 255 & t4, e4.pending_buf[e4.pending++] = t4 >>> 8 & 255;
|
|
13809
|
+
}
|
|
13810
|
+
function P3(e4, t4, r4) {
|
|
13811
|
+
e4.bi_valid > d - r4 ? (e4.bi_buf |= t4 << e4.bi_valid & 65535, U3(e4, e4.bi_buf), e4.bi_buf = t4 >> d - e4.bi_valid, e4.bi_valid += r4 - d) : (e4.bi_buf |= t4 << e4.bi_valid & 65535, e4.bi_valid += r4);
|
|
13812
|
+
}
|
|
13813
|
+
function L3(e4, t4, r4) {
|
|
13814
|
+
P3(e4, r4[2 * t4], r4[2 * t4 + 1]);
|
|
13815
|
+
}
|
|
13816
|
+
function j3(e4, t4) {
|
|
13817
|
+
for (var r4 = 0; r4 |= 1 & e4, e4 >>>= 1, r4 <<= 1, 0 < --t4; ) ;
|
|
13818
|
+
return r4 >>> 1;
|
|
13819
|
+
}
|
|
13820
|
+
function Z3(e4, t4, r4) {
|
|
13821
|
+
var n4, i4, s4 = new Array(g3 + 1), a4 = 0;
|
|
13822
|
+
for (n4 = 1; n4 <= g3; n4++) s4[n4] = a4 = a4 + r4[n4 - 1] << 1;
|
|
13823
|
+
for (i4 = 0; i4 <= t4; i4++) {
|
|
13824
|
+
var o4 = e4[2 * i4 + 1];
|
|
13825
|
+
0 !== o4 && (e4[2 * i4] = j3(s4[o4]++, o4));
|
|
13826
|
+
}
|
|
13827
|
+
}
|
|
13828
|
+
function W3(e4) {
|
|
13829
|
+
var t4;
|
|
13830
|
+
for (t4 = 0; t4 < l2; t4++) e4.dyn_ltree[2 * t4] = 0;
|
|
13831
|
+
for (t4 = 0; t4 < f; t4++) e4.dyn_dtree[2 * t4] = 0;
|
|
13832
|
+
for (t4 = 0; t4 < c3; t4++) e4.bl_tree[2 * t4] = 0;
|
|
13833
|
+
e4.dyn_ltree[2 * m3] = 1, e4.opt_len = e4.static_len = 0, e4.last_lit = e4.matches = 0;
|
|
13834
|
+
}
|
|
13835
|
+
function M3(e4) {
|
|
13836
|
+
8 < e4.bi_valid ? U3(e4, e4.bi_buf) : 0 < e4.bi_valid && (e4.pending_buf[e4.pending++] = e4.bi_buf), e4.bi_buf = 0, e4.bi_valid = 0;
|
|
13837
|
+
}
|
|
13838
|
+
function H3(e4, t4, r4, n4) {
|
|
13839
|
+
var i4 = 2 * t4, s4 = 2 * r4;
|
|
13840
|
+
return e4[i4] < e4[s4] || e4[i4] === e4[s4] && n4[t4] <= n4[r4];
|
|
13841
|
+
}
|
|
13842
|
+
function G3(e4, t4, r4) {
|
|
13843
|
+
for (var n4 = e4.heap[r4], i4 = r4 << 1; i4 <= e4.heap_len && (i4 < e4.heap_len && H3(t4, e4.heap[i4 + 1], e4.heap[i4], e4.depth) && i4++, !H3(t4, n4, e4.heap[i4], e4.depth)); ) e4.heap[r4] = e4.heap[i4], r4 = i4, i4 <<= 1;
|
|
13844
|
+
e4.heap[r4] = n4;
|
|
13845
|
+
}
|
|
13846
|
+
function K3(e4, t4, r4) {
|
|
13847
|
+
var n4, i4, s4, a4, o4 = 0;
|
|
13848
|
+
if (0 !== e4.last_lit) for (; n4 = e4.pending_buf[e4.d_buf + 2 * o4] << 8 | e4.pending_buf[e4.d_buf + 2 * o4 + 1], i4 = e4.pending_buf[e4.l_buf + o4], o4++, 0 === n4 ? L3(e4, i4, t4) : (L3(e4, (s4 = A3[i4]) + u3 + 1, t4), 0 !== (a4 = w3[s4]) && P3(e4, i4 -= I3[s4], a4), L3(e4, s4 = N3(--n4), r4), 0 !== (a4 = k3[s4]) && P3(e4, n4 -= T3[s4], a4)), o4 < e4.last_lit; ) ;
|
|
13849
|
+
L3(e4, m3, t4);
|
|
13850
|
+
}
|
|
13851
|
+
function Y3(e4, t4) {
|
|
13852
|
+
var r4, n4, i4, s4 = t4.dyn_tree, a4 = t4.stat_desc.static_tree, o4 = t4.stat_desc.has_stree, h3 = t4.stat_desc.elems, u4 = -1;
|
|
13853
|
+
for (e4.heap_len = 0, e4.heap_max = _3, r4 = 0; r4 < h3; r4++) 0 !== s4[2 * r4] ? (e4.heap[++e4.heap_len] = u4 = r4, e4.depth[r4] = 0) : s4[2 * r4 + 1] = 0;
|
|
13854
|
+
for (; e4.heap_len < 2; ) s4[2 * (i4 = e4.heap[++e4.heap_len] = u4 < 2 ? ++u4 : 0)] = 1, e4.depth[i4] = 0, e4.opt_len--, o4 && (e4.static_len -= a4[2 * i4 + 1]);
|
|
13855
|
+
for (t4.max_code = u4, r4 = e4.heap_len >> 1; 1 <= r4; r4--) G3(e4, s4, r4);
|
|
13856
|
+
for (i4 = h3; r4 = e4.heap[1], e4.heap[1] = e4.heap[e4.heap_len--], G3(e4, s4, 1), n4 = e4.heap[1], e4.heap[--e4.heap_max] = r4, e4.heap[--e4.heap_max] = n4, s4[2 * i4] = s4[2 * r4] + s4[2 * n4], e4.depth[i4] = (e4.depth[r4] >= e4.depth[n4] ? e4.depth[r4] : e4.depth[n4]) + 1, s4[2 * r4 + 1] = s4[2 * n4 + 1] = i4, e4.heap[1] = i4++, G3(e4, s4, 1), 2 <= e4.heap_len; ) ;
|
|
13857
|
+
e4.heap[--e4.heap_max] = e4.heap[1], (function(e5, t5) {
|
|
13858
|
+
var r5, n5, i5, s5, a5, o5, h4 = t5.dyn_tree, u5 = t5.max_code, l3 = t5.stat_desc.static_tree, f2 = t5.stat_desc.has_stree, c4 = t5.stat_desc.extra_bits, d2 = t5.stat_desc.extra_base, p4 = t5.stat_desc.max_length, m4 = 0;
|
|
13859
|
+
for (s5 = 0; s5 <= g3; s5++) e5.bl_count[s5] = 0;
|
|
13860
|
+
for (h4[2 * e5.heap[e5.heap_max] + 1] = 0, r5 = e5.heap_max + 1; r5 < _3; r5++) p4 < (s5 = h4[2 * h4[2 * (n5 = e5.heap[r5]) + 1] + 1] + 1) && (s5 = p4, m4++), h4[2 * n5 + 1] = s5, u5 < n5 || (e5.bl_count[s5]++, a5 = 0, d2 <= n5 && (a5 = c4[n5 - d2]), o5 = h4[2 * n5], e5.opt_len += o5 * (s5 + a5), f2 && (e5.static_len += o5 * (l3[2 * n5 + 1] + a5)));
|
|
13861
|
+
if (0 !== m4) {
|
|
13862
|
+
do {
|
|
13863
|
+
for (s5 = p4 - 1; 0 === e5.bl_count[s5]; ) s5--;
|
|
13864
|
+
e5.bl_count[s5]--, e5.bl_count[s5 + 1] += 2, e5.bl_count[p4]--, m4 -= 2;
|
|
13865
|
+
} while (0 < m4);
|
|
13866
|
+
for (s5 = p4; 0 !== s5; s5--) for (n5 = e5.bl_count[s5]; 0 !== n5; ) u5 < (i5 = e5.heap[--r5]) || (h4[2 * i5 + 1] !== s5 && (e5.opt_len += (s5 - h4[2 * i5 + 1]) * h4[2 * i5], h4[2 * i5 + 1] = s5), n5--);
|
|
13867
|
+
}
|
|
13868
|
+
})(e4, t4), Z3(s4, u4, e4.bl_count);
|
|
13869
|
+
}
|
|
13870
|
+
function X3(e4, t4, r4) {
|
|
13871
|
+
var n4, i4, s4 = -1, a4 = t4[1], o4 = 0, h3 = 7, u4 = 4;
|
|
13872
|
+
for (0 === a4 && (h3 = 138, u4 = 3), t4[2 * (r4 + 1) + 1] = 65535, n4 = 0; n4 <= r4; n4++) i4 = a4, a4 = t4[2 * (n4 + 1) + 1], ++o4 < h3 && i4 === a4 || (o4 < u4 ? e4.bl_tree[2 * i4] += o4 : 0 !== i4 ? (i4 !== s4 && e4.bl_tree[2 * i4]++, e4.bl_tree[2 * b3]++) : o4 <= 10 ? e4.bl_tree[2 * v3]++ : e4.bl_tree[2 * y3]++, s4 = i4, u4 = (o4 = 0) === a4 ? (h3 = 138, 3) : i4 === a4 ? (h3 = 6, 3) : (h3 = 7, 4));
|
|
13873
|
+
}
|
|
13874
|
+
function V3(e4, t4, r4) {
|
|
13875
|
+
var n4, i4, s4 = -1, a4 = t4[1], o4 = 0, h3 = 7, u4 = 4;
|
|
13876
|
+
for (0 === a4 && (h3 = 138, u4 = 3), n4 = 0; n4 <= r4; n4++) if (i4 = a4, a4 = t4[2 * (n4 + 1) + 1], !(++o4 < h3 && i4 === a4)) {
|
|
13877
|
+
if (o4 < u4) for (; L3(e4, i4, e4.bl_tree), 0 != --o4; ) ;
|
|
13878
|
+
else 0 !== i4 ? (i4 !== s4 && (L3(e4, i4, e4.bl_tree), o4--), L3(e4, b3, e4.bl_tree), P3(e4, o4 - 3, 2)) : o4 <= 10 ? (L3(e4, v3, e4.bl_tree), P3(e4, o4 - 3, 3)) : (L3(e4, y3, e4.bl_tree), P3(e4, o4 - 11, 7));
|
|
13879
|
+
s4 = i4, u4 = (o4 = 0) === a4 ? (h3 = 138, 3) : i4 === a4 ? (h3 = 6, 3) : (h3 = 7, 4);
|
|
13880
|
+
}
|
|
13881
|
+
}
|
|
13882
|
+
n3(T3);
|
|
13883
|
+
var q3 = false;
|
|
13884
|
+
function J3(e4, t4, r4, n4) {
|
|
13885
|
+
P3(e4, (s3 << 1) + (n4 ? 1 : 0), 3), (function(e5, t5, r5, n5) {
|
|
13886
|
+
M3(e5), n5 && (U3(e5, r5), U3(e5, ~r5)), i3.arraySet(e5.pending_buf, e5.window, t5, r5, e5.pending), e5.pending += r5;
|
|
13887
|
+
})(e4, t4, r4, true);
|
|
13888
|
+
}
|
|
13889
|
+
r3._tr_init = function(e4) {
|
|
13890
|
+
q3 || ((function() {
|
|
13891
|
+
var e5, t4, r4, n4, i4, s4 = new Array(g3 + 1);
|
|
13892
|
+
for (n4 = r4 = 0; n4 < a3 - 1; n4++) for (I3[n4] = r4, e5 = 0; e5 < 1 << w3[n4]; e5++) A3[r4++] = n4;
|
|
13893
|
+
for (A3[r4 - 1] = n4, n4 = i4 = 0; n4 < 16; n4++) for (T3[n4] = i4, e5 = 0; e5 < 1 << k3[n4]; e5++) E3[i4++] = n4;
|
|
13894
|
+
for (i4 >>= 7; n4 < f; n4++) for (T3[n4] = i4 << 7, e5 = 0; e5 < 1 << k3[n4] - 7; e5++) E3[256 + i4++] = n4;
|
|
13895
|
+
for (t4 = 0; t4 <= g3; t4++) s4[t4] = 0;
|
|
13896
|
+
for (e5 = 0; e5 <= 143; ) z3[2 * e5 + 1] = 8, e5++, s4[8]++;
|
|
13897
|
+
for (; e5 <= 255; ) z3[2 * e5 + 1] = 9, e5++, s4[9]++;
|
|
13898
|
+
for (; e5 <= 279; ) z3[2 * e5 + 1] = 7, e5++, s4[7]++;
|
|
13899
|
+
for (; e5 <= 287; ) z3[2 * e5 + 1] = 8, e5++, s4[8]++;
|
|
13900
|
+
for (Z3(z3, l2 + 1, s4), e5 = 0; e5 < f; e5++) C3[2 * e5 + 1] = 5, C3[2 * e5] = j3(e5, 5);
|
|
13901
|
+
O3 = new D3(z3, w3, u3 + 1, l2, g3), B3 = new D3(C3, k3, 0, f, g3), R3 = new D3(new Array(0), x3, 0, c3, p3);
|
|
13902
|
+
})(), q3 = true), e4.l_desc = new F3(e4.dyn_ltree, O3), e4.d_desc = new F3(e4.dyn_dtree, B3), e4.bl_desc = new F3(e4.bl_tree, R3), e4.bi_buf = 0, e4.bi_valid = 0, W3(e4);
|
|
13903
|
+
}, r3._tr_stored_block = J3, r3._tr_flush_block = function(e4, t4, r4, n4) {
|
|
13904
|
+
var i4, s4, a4 = 0;
|
|
13905
|
+
0 < e4.level ? (2 === e4.strm.data_type && (e4.strm.data_type = (function(e5) {
|
|
13906
|
+
var t5, r5 = 4093624447;
|
|
13907
|
+
for (t5 = 0; t5 <= 31; t5++, r5 >>>= 1) if (1 & r5 && 0 !== e5.dyn_ltree[2 * t5]) return o3;
|
|
13908
|
+
if (0 !== e5.dyn_ltree[18] || 0 !== e5.dyn_ltree[20] || 0 !== e5.dyn_ltree[26]) return h2;
|
|
13909
|
+
for (t5 = 32; t5 < u3; t5++) if (0 !== e5.dyn_ltree[2 * t5]) return h2;
|
|
13910
|
+
return o3;
|
|
13911
|
+
})(e4)), Y3(e4, e4.l_desc), Y3(e4, e4.d_desc), a4 = (function(e5) {
|
|
13912
|
+
var t5;
|
|
13913
|
+
for (X3(e5, e5.dyn_ltree, e5.l_desc.max_code), X3(e5, e5.dyn_dtree, e5.d_desc.max_code), Y3(e5, e5.bl_desc), t5 = c3 - 1; 3 <= t5 && 0 === e5.bl_tree[2 * S3[t5] + 1]; t5--) ;
|
|
13914
|
+
return e5.opt_len += 3 * (t5 + 1) + 5 + 5 + 4, t5;
|
|
13915
|
+
})(e4), i4 = e4.opt_len + 3 + 7 >>> 3, (s4 = e4.static_len + 3 + 7 >>> 3) <= i4 && (i4 = s4)) : i4 = s4 = r4 + 5, r4 + 4 <= i4 && -1 !== t4 ? J3(e4, t4, r4, n4) : 4 === e4.strategy || s4 === i4 ? (P3(e4, 2 + (n4 ? 1 : 0), 3), K3(e4, z3, C3)) : (P3(e4, 4 + (n4 ? 1 : 0), 3), (function(e5, t5, r5, n5) {
|
|
13916
|
+
var i5;
|
|
13917
|
+
for (P3(e5, t5 - 257, 5), P3(e5, r5 - 1, 5), P3(e5, n5 - 4, 4), i5 = 0; i5 < n5; i5++) P3(e5, e5.bl_tree[2 * S3[i5] + 1], 3);
|
|
13918
|
+
V3(e5, e5.dyn_ltree, t5 - 1), V3(e5, e5.dyn_dtree, r5 - 1);
|
|
13919
|
+
})(e4, e4.l_desc.max_code + 1, e4.d_desc.max_code + 1, a4 + 1), K3(e4, e4.dyn_ltree, e4.dyn_dtree)), W3(e4), n4 && M3(e4);
|
|
13920
|
+
}, r3._tr_tally = function(e4, t4, r4) {
|
|
13921
|
+
return e4.pending_buf[e4.d_buf + 2 * e4.last_lit] = t4 >>> 8 & 255, e4.pending_buf[e4.d_buf + 2 * e4.last_lit + 1] = 255 & t4, e4.pending_buf[e4.l_buf + e4.last_lit] = 255 & r4, e4.last_lit++, 0 === t4 ? e4.dyn_ltree[2 * r4]++ : (e4.matches++, t4--, e4.dyn_ltree[2 * (A3[r4] + u3 + 1)]++, e4.dyn_dtree[2 * N3(t4)]++), e4.last_lit === e4.lit_bufsize - 1;
|
|
13922
|
+
}, r3._tr_align = function(e4) {
|
|
13923
|
+
P3(e4, 2, 3), L3(e4, m3, z3), (function(e5) {
|
|
13924
|
+
16 === e5.bi_valid ? (U3(e5, e5.bi_buf), e5.bi_buf = 0, e5.bi_valid = 0) : 8 <= e5.bi_valid && (e5.pending_buf[e5.pending++] = 255 & e5.bi_buf, e5.bi_buf >>= 8, e5.bi_valid -= 8);
|
|
13925
|
+
})(e4);
|
|
13926
|
+
};
|
|
13927
|
+
}, { "../utils/common": 41 }], 53: [function(e3, t3, r3) {
|
|
13928
|
+
"use strict";
|
|
13929
|
+
t3.exports = function() {
|
|
13930
|
+
this.input = null, this.next_in = 0, this.avail_in = 0, this.total_in = 0, this.output = null, this.next_out = 0, this.avail_out = 0, this.total_out = 0, this.msg = "", this.state = null, this.data_type = 2, this.adler = 0;
|
|
13931
|
+
};
|
|
13932
|
+
}, {}], 54: [function(e3, t3, r3) {
|
|
13933
|
+
(function(e4) {
|
|
13934
|
+
!(function(r4, n3) {
|
|
13935
|
+
"use strict";
|
|
13936
|
+
if (!r4.setImmediate) {
|
|
13937
|
+
var i3, s3, t4, a3, o3 = 1, h2 = {}, u3 = false, l2 = r4.document, e5 = Object.getPrototypeOf && Object.getPrototypeOf(r4);
|
|
13938
|
+
e5 = e5 && e5.setTimeout ? e5 : r4, i3 = "[object process]" === {}.toString.call(r4.process) ? function(e6) {
|
|
13939
|
+
process.nextTick(function() {
|
|
13940
|
+
c3(e6);
|
|
13941
|
+
});
|
|
13942
|
+
} : (function() {
|
|
13943
|
+
if (r4.postMessage && !r4.importScripts) {
|
|
13944
|
+
var e6 = true, t5 = r4.onmessage;
|
|
13945
|
+
return r4.onmessage = function() {
|
|
13946
|
+
e6 = false;
|
|
13947
|
+
}, r4.postMessage("", "*"), r4.onmessage = t5, e6;
|
|
13948
|
+
}
|
|
13949
|
+
})() ? (a3 = "setImmediate$" + Math.random() + "$", r4.addEventListener ? r4.addEventListener("message", d, false) : r4.attachEvent("onmessage", d), function(e6) {
|
|
13950
|
+
r4.postMessage(a3 + e6, "*");
|
|
13951
|
+
}) : r4.MessageChannel ? ((t4 = new MessageChannel()).port1.onmessage = function(e6) {
|
|
13952
|
+
c3(e6.data);
|
|
13953
|
+
}, function(e6) {
|
|
13954
|
+
t4.port2.postMessage(e6);
|
|
13955
|
+
}) : l2 && "onreadystatechange" in l2.createElement("script") ? (s3 = l2.documentElement, function(e6) {
|
|
13956
|
+
var t5 = l2.createElement("script");
|
|
13957
|
+
t5.onreadystatechange = function() {
|
|
13958
|
+
c3(e6), t5.onreadystatechange = null, s3.removeChild(t5), t5 = null;
|
|
13959
|
+
}, s3.appendChild(t5);
|
|
13960
|
+
}) : function(e6) {
|
|
13961
|
+
setTimeout(c3, 0, e6);
|
|
13962
|
+
}, e5.setImmediate = function(e6) {
|
|
13963
|
+
"function" != typeof e6 && (e6 = new Function("" + e6));
|
|
13964
|
+
for (var t5 = new Array(arguments.length - 1), r5 = 0; r5 < t5.length; r5++) t5[r5] = arguments[r5 + 1];
|
|
13965
|
+
var n4 = { callback: e6, args: t5 };
|
|
13966
|
+
return h2[o3] = n4, i3(o3), o3++;
|
|
13967
|
+
}, e5.clearImmediate = f;
|
|
13968
|
+
}
|
|
13969
|
+
function f(e6) {
|
|
13970
|
+
delete h2[e6];
|
|
13971
|
+
}
|
|
13972
|
+
function c3(e6) {
|
|
13973
|
+
if (u3) setTimeout(c3, 0, e6);
|
|
13974
|
+
else {
|
|
13975
|
+
var t5 = h2[e6];
|
|
13976
|
+
if (t5) {
|
|
13977
|
+
u3 = true;
|
|
13978
|
+
try {
|
|
13979
|
+
!(function(e7) {
|
|
13980
|
+
var t6 = e7.callback, r5 = e7.args;
|
|
13981
|
+
switch (r5.length) {
|
|
13982
|
+
case 0:
|
|
13983
|
+
t6();
|
|
13984
|
+
break;
|
|
13985
|
+
case 1:
|
|
13986
|
+
t6(r5[0]);
|
|
13987
|
+
break;
|
|
13988
|
+
case 2:
|
|
13989
|
+
t6(r5[0], r5[1]);
|
|
13990
|
+
break;
|
|
13991
|
+
case 3:
|
|
13992
|
+
t6(r5[0], r5[1], r5[2]);
|
|
13993
|
+
break;
|
|
13994
|
+
default:
|
|
13995
|
+
t6.apply(n3, r5);
|
|
13996
|
+
}
|
|
13997
|
+
})(t5);
|
|
13998
|
+
} finally {
|
|
13999
|
+
f(e6), u3 = false;
|
|
14000
|
+
}
|
|
14001
|
+
}
|
|
14002
|
+
}
|
|
14003
|
+
}
|
|
14004
|
+
function d(e6) {
|
|
14005
|
+
e6.source === r4 && "string" == typeof e6.data && 0 === e6.data.indexOf(a3) && c3(+e6.data.slice(a3.length));
|
|
14006
|
+
}
|
|
14007
|
+
})("undefined" == typeof self ? void 0 === e4 ? this : e4 : self);
|
|
14008
|
+
}).call(this, "undefined" != typeof global ? global : "undefined" != typeof self ? self : "undefined" != typeof window ? window : {});
|
|
14009
|
+
}, {}] }, {}, [10])(10);
|
|
14010
|
+
});
|
|
14011
|
+
}
|
|
14012
|
+
});
|
|
14013
|
+
|
|
11648
14014
|
// node_modules/file-saver/dist/FileSaver.min.js
|
|
11649
14015
|
var require_FileSaver_min = __commonJS({
|
|
11650
14016
|
"node_modules/file-saver/dist/FileSaver.min.js"(exports2, module2) {
|
|
@@ -23563,7 +25929,6 @@ var BaseDetection = class {
|
|
|
23563
25929
|
this.modelAssetPath = modelAssetPath;
|
|
23564
25930
|
this.classVideo = classVideo;
|
|
23565
25931
|
this.classDiv = classDiv;
|
|
23566
|
-
this.startTime = new Date(Date.now());
|
|
23567
25932
|
paramsConfig && (this.paramsConfig = paramsConfig);
|
|
23568
25933
|
options && (this.options = options);
|
|
23569
25934
|
}
|
|
@@ -23613,6 +25978,7 @@ var BaseDetection = class {
|
|
|
23613
25978
|
}
|
|
23614
25979
|
cameraStream && !this.video.srcObject && (this.video.srcObject = cameraStream);
|
|
23615
25980
|
this.video.play();
|
|
25981
|
+
this.startTime = new Date(Date.now());
|
|
23616
25982
|
const that = this;
|
|
23617
25983
|
(_a2 = this.video) == null ? void 0 : _a2.addEventListener("loadeddata", () => that.predictWebcam());
|
|
23618
25984
|
const style = document.createElement("style");
|
|
@@ -23710,6 +26076,14 @@ var BaseDetection = class {
|
|
|
23710
26076
|
return "Face n\xE3o centralizada, mova-se para cima";
|
|
23711
26077
|
case "wrong_face_position_move_bottom_detected":
|
|
23712
26078
|
return "Face n\xE3o centralizada, mova-se para baixo";
|
|
26079
|
+
case "face_turned_left_detected":
|
|
26080
|
+
return "Face virada para a esquerda, centralize-a";
|
|
26081
|
+
case "face_turned_right_detected":
|
|
26082
|
+
return "Face virada para a direita, centralize-a";
|
|
26083
|
+
case "face_turned_up_detected":
|
|
26084
|
+
return "Face virada para cima, centralize-a";
|
|
26085
|
+
case "face_turned_down_detected":
|
|
26086
|
+
return "Face virada para baixo, centralize-a";
|
|
23713
26087
|
default:
|
|
23714
26088
|
return description;
|
|
23715
26089
|
}
|
|
@@ -23740,7 +26114,14 @@ function buildVideoPreview() {
|
|
|
23740
26114
|
// src/modules/faceDetection.ts
|
|
23741
26115
|
var FaceDetection = class extends BaseDetection {
|
|
23742
26116
|
constructor(options, paramsConfig, classVideo = "videoPreviewFrameDetection", classDiv = "liveViewFrameDetection") {
|
|
23743
|
-
super(
|
|
26117
|
+
super(
|
|
26118
|
+
"FaceDetector",
|
|
26119
|
+
`https://storage.googleapis.com/mediapipe-models/face_detector/blaze_face_short_range/float16/1/blaze_face_short_range.tflite`,
|
|
26120
|
+
options,
|
|
26121
|
+
paramsConfig,
|
|
26122
|
+
classVideo,
|
|
26123
|
+
classDiv
|
|
26124
|
+
);
|
|
23744
26125
|
this.emmitedPositionAlert = false;
|
|
23745
26126
|
this.emmitedFaceAlert = false;
|
|
23746
26127
|
}
|
|
@@ -23750,63 +26131,161 @@ var FaceDetection = class extends BaseDetection {
|
|
|
23750
26131
|
this.handleOk("face_ok", "face_detection_on_stream");
|
|
23751
26132
|
}
|
|
23752
26133
|
}
|
|
26134
|
+
// displayVideoDetections(result: { detections: any; }) {
|
|
26135
|
+
// // console.log(result);
|
|
26136
|
+
// // Remove any highlighting from previous frame.
|
|
26137
|
+
// for (const child of this.children) {
|
|
26138
|
+
// this.liveView!.removeChild(child);
|
|
26139
|
+
// }
|
|
26140
|
+
// this.children.splice(0);
|
|
26141
|
+
// // Iterate through predictions and draw them to the live view
|
|
26142
|
+
// for (const detection of result.detections) {
|
|
26143
|
+
// // Dimensões do monitor
|
|
26144
|
+
// const monitorWidth = window.innerWidth; // Obtém a largura do monitor
|
|
26145
|
+
// const monitorHeight = window.innerHeight; // Obtém a altura do monitor
|
|
26146
|
+
// // Dimensões do elemento this.video!
|
|
26147
|
+
// const desiredWidth = this.video!.offsetWidth;
|
|
26148
|
+
// const desiredHeight = this.video!.offsetHeight;
|
|
26149
|
+
// // Fatores de escala
|
|
26150
|
+
// const widthScaleFactor = desiredWidth / monitorWidth;
|
|
26151
|
+
// const heightScaleFactor = desiredHeight / monitorHeight;
|
|
26152
|
+
// // Ajuste dos valores proporcionais
|
|
26153
|
+
// const adjustedLeft = (desiredWidth - detection.boundingBox.width * widthScaleFactor - detection.boundingBox.originX * widthScaleFactor);
|
|
26154
|
+
// const adjustedTop = detection.boundingBox.originY * heightScaleFactor;
|
|
26155
|
+
// const adjustedWidth = (detection.boundingBox.width - 10) * widthScaleFactor;
|
|
26156
|
+
// const adjustedHeight = detection.boundingBox.height * heightScaleFactor;
|
|
26157
|
+
// const p = document.createElement("p");
|
|
26158
|
+
// p.innerText =
|
|
26159
|
+
// "Confidence: " +
|
|
26160
|
+
// Math.round(parseFloat(detection.categories[0].score) * 100) +
|
|
26161
|
+
// "% .";
|
|
26162
|
+
// p.style.right = adjustedLeft + "px";
|
|
26163
|
+
// p.style.top = adjustedTop - 50 + "px";
|
|
26164
|
+
// p.style.width = adjustedWidth +"px";
|
|
26165
|
+
// const commonStyle = {
|
|
26166
|
+
// zIndex: "2",
|
|
26167
|
+
// position: "absolute",
|
|
26168
|
+
// border: "1px dashed #fff",
|
|
26169
|
+
// transform: "scaleX(-1)",
|
|
26170
|
+
// };
|
|
26171
|
+
// Object.assign(p.style, {
|
|
26172
|
+
// ...commonStyle,
|
|
26173
|
+
// margin: "0",
|
|
26174
|
+
// fontSize: "9px",
|
|
26175
|
+
// paddingBottom: "5px",
|
|
26176
|
+
// paddingTop: "5px",
|
|
26177
|
+
// color: "#fff",
|
|
26178
|
+
// backgroundColor: "#007f8b",
|
|
26179
|
+
// });
|
|
26180
|
+
// const highlighter = document.createElement("div");
|
|
26181
|
+
// highlighter.setAttribute("class", "highlighter");
|
|
26182
|
+
// highlighter.style.right = adjustedLeft+ "px";
|
|
26183
|
+
// highlighter.style.top = adjustedTop + "px";
|
|
26184
|
+
// highlighter.style.width = adjustedWidth + "px";
|
|
26185
|
+
// highlighter.style.height = adjustedHeight - 10 + "px";
|
|
26186
|
+
// Object.assign(highlighter.style, {
|
|
26187
|
+
// ...commonStyle,
|
|
26188
|
+
// zIndex: "1",
|
|
26189
|
+
// background: "rgba(0, 255, 0, 0.25)",
|
|
26190
|
+
// });
|
|
26191
|
+
// // Mostrar Marcações na tela
|
|
26192
|
+
// this.liveView!.appendChild(highlighter);
|
|
26193
|
+
// this.liveView!.appendChild(p);
|
|
26194
|
+
// this.children.push(highlighter);
|
|
26195
|
+
// this.children.push(p);
|
|
26196
|
+
// // Mostrar Marcações no rosto
|
|
26197
|
+
// for (const keypoint of detection.keypoints) {
|
|
26198
|
+
// // for (const [index, keypoint] of detection.keypoints.entries()) {
|
|
26199
|
+
// const keypointEl = document.createElement("span");
|
|
26200
|
+
// // keypointEl.innerText = index;
|
|
26201
|
+
// keypointEl.className = "key-point";
|
|
26202
|
+
// keypointEl.style.top = `${keypoint.y * this.video!.offsetHeight - 3}px`;
|
|
26203
|
+
// keypointEl.style.right = `${
|
|
26204
|
+
// this.video!.offsetWidth - keypoint.x * this.video!.offsetWidth - 3
|
|
26205
|
+
// }px`;
|
|
26206
|
+
// this.liveView!.appendChild(keypointEl);
|
|
26207
|
+
// this.children.push(keypointEl);
|
|
26208
|
+
// }
|
|
26209
|
+
// }
|
|
26210
|
+
// }
|
|
23753
26211
|
displayVideoDetections(result) {
|
|
23754
26212
|
for (const child of this.children) {
|
|
23755
26213
|
this.liveView.removeChild(child);
|
|
23756
26214
|
}
|
|
23757
26215
|
this.children.splice(0);
|
|
26216
|
+
const videoElement = this.video;
|
|
26217
|
+
if (videoElement.videoWidth === 0 || videoElement.videoHeight === 0) return;
|
|
26218
|
+
const scaleX = videoElement.offsetWidth / videoElement.videoWidth;
|
|
26219
|
+
const scaleY = videoElement.offsetHeight / videoElement.videoHeight;
|
|
23758
26220
|
for (const detection of result.detections) {
|
|
23759
|
-
const
|
|
23760
|
-
const
|
|
23761
|
-
const
|
|
23762
|
-
const
|
|
23763
|
-
const
|
|
23764
|
-
const
|
|
23765
|
-
const
|
|
23766
|
-
|
|
23767
|
-
|
|
23768
|
-
|
|
26221
|
+
const box = detection.boundingBox;
|
|
26222
|
+
const mirroredX = videoElement.videoWidth - box.originX - box.width;
|
|
26223
|
+
const finalLeft = mirroredX * scaleX;
|
|
26224
|
+
const finalTop = box.originY * scaleY;
|
|
26225
|
+
const finalWidth = (box.width - 10) * scaleX;
|
|
26226
|
+
const finalHeight = box.height * scaleY;
|
|
26227
|
+
const highlighter = document.createElement("div");
|
|
26228
|
+
highlighter.setAttribute("class", "highlighter");
|
|
26229
|
+
Object.assign(highlighter.style, {
|
|
26230
|
+
right: `${finalLeft + 20}px`,
|
|
26231
|
+
// Usamos LEFT, é mais fácil calcular que RIGHT
|
|
26232
|
+
top: `${finalTop}px`,
|
|
26233
|
+
width: `${finalWidth}px`,
|
|
26234
|
+
height: `${finalHeight - 10}px`,
|
|
26235
|
+
zIndex: "1",
|
|
26236
|
+
position: "absolute",
|
|
26237
|
+
border: "1px dashed #fff",
|
|
26238
|
+
background: "rgba(0, 255, 0, 0.25)",
|
|
26239
|
+
transform: "scaleX(-1)"
|
|
26240
|
+
// Espelhamento horizontal para compensar o espelhamento da câmera
|
|
26241
|
+
});
|
|
23769
26242
|
const p3 = document.createElement("p");
|
|
23770
|
-
|
|
23771
|
-
p3.
|
|
23772
|
-
p3.style
|
|
23773
|
-
|
|
23774
|
-
|
|
26243
|
+
const score = detection.categories[0].score ? Math.round(parseFloat(detection.categories[0].score) * 100) : 0;
|
|
26244
|
+
p3.innerText = `Confidence: ${score}%`;
|
|
26245
|
+
Object.assign(p3.style, {
|
|
26246
|
+
right: `${finalLeft + 20}px`,
|
|
26247
|
+
top: `${finalTop - 50}px`,
|
|
26248
|
+
// Ajuste para ficar acima da caixa
|
|
26249
|
+
width: `${finalWidth}px`,
|
|
23775
26250
|
zIndex: "2",
|
|
23776
26251
|
position: "absolute",
|
|
23777
|
-
border: "1px dashed #fff"
|
|
23778
|
-
};
|
|
23779
|
-
Object.assign(p3.style, {
|
|
23780
|
-
...commonStyle,
|
|
23781
26252
|
margin: "0",
|
|
23782
|
-
fontSize: "
|
|
23783
|
-
|
|
23784
|
-
|
|
26253
|
+
fontSize: "12px",
|
|
26254
|
+
// Aumentei um pouco para leitura
|
|
26255
|
+
padding: "5px",
|
|
23785
26256
|
color: "#fff",
|
|
23786
|
-
backgroundColor: "#007f8b"
|
|
23787
|
-
|
|
23788
|
-
|
|
23789
|
-
|
|
23790
|
-
highlighter.style.right = adjustedLeft + "px";
|
|
23791
|
-
highlighter.style.top = adjustedTop + "px";
|
|
23792
|
-
highlighter.style.width = adjustedWidth + "px";
|
|
23793
|
-
highlighter.style.height = adjustedHeight - 10 + "px";
|
|
23794
|
-
Object.assign(highlighter.style, {
|
|
23795
|
-
...commonStyle,
|
|
23796
|
-
zIndex: "1",
|
|
23797
|
-
background: "rgba(0, 255, 0, 0.25)"
|
|
26257
|
+
backgroundColor: "#007f8b",
|
|
26258
|
+
textAlign: "center",
|
|
26259
|
+
// Centraliza o texto na caixa
|
|
26260
|
+
transform: "scaleX(-1)"
|
|
23798
26261
|
});
|
|
23799
26262
|
this.liveView.appendChild(highlighter);
|
|
23800
26263
|
this.liveView.appendChild(p3);
|
|
23801
26264
|
this.children.push(highlighter);
|
|
23802
26265
|
this.children.push(p3);
|
|
23803
|
-
|
|
23804
|
-
const
|
|
23805
|
-
|
|
23806
|
-
|
|
23807
|
-
|
|
23808
|
-
|
|
23809
|
-
|
|
26266
|
+
if (detection.keypoints) {
|
|
26267
|
+
for (const keypoint of detection.keypoints) {
|
|
26268
|
+
const keypointEl = document.createElement("span");
|
|
26269
|
+
keypointEl.className = "key-point";
|
|
26270
|
+
const kpX = keypoint.x < 2 ? keypoint.x * videoElement.videoWidth : keypoint.x;
|
|
26271
|
+
const kpY = keypoint.y < 2 ? keypoint.y * videoElement.videoHeight : keypoint.y;
|
|
26272
|
+
const mirroredKpX = videoElement.videoWidth - kpX;
|
|
26273
|
+
const screenX = mirroredKpX * scaleX;
|
|
26274
|
+
const screenY = kpY * scaleY;
|
|
26275
|
+
Object.assign(keypointEl.style, {
|
|
26276
|
+
right: `${screenX + 20}px`,
|
|
26277
|
+
// -3 para centralizar o ponto
|
|
26278
|
+
top: `${screenY - 3}px`,
|
|
26279
|
+
position: "absolute",
|
|
26280
|
+
width: "6px",
|
|
26281
|
+
height: "6px",
|
|
26282
|
+
borderRadius: "50%",
|
|
26283
|
+
backgroundColor: "red",
|
|
26284
|
+
zIndex: "3"
|
|
26285
|
+
});
|
|
26286
|
+
this.liveView.appendChild(keypointEl);
|
|
26287
|
+
this.children.push(keypointEl);
|
|
26288
|
+
}
|
|
23810
26289
|
}
|
|
23811
26290
|
}
|
|
23812
26291
|
}
|
|
@@ -23828,55 +26307,87 @@ var FaceDetection = class extends BaseDetection {
|
|
|
23828
26307
|
}
|
|
23829
26308
|
}
|
|
23830
26309
|
if (result.detections.length === 0) return;
|
|
23831
|
-
let
|
|
23832
|
-
|
|
26310
|
+
let failedFacePosition = false;
|
|
26311
|
+
const video = document.getElementById(this.classVideo);
|
|
23833
26312
|
const imageWidth = video.videoWidth;
|
|
23834
26313
|
const imageHeight = video.videoHeight;
|
|
23835
|
-
|
|
26314
|
+
const detection = result.detections[0];
|
|
26315
|
+
const face = detection.boundingBox;
|
|
26316
|
+
const keypoints = detection.keypoints;
|
|
26317
|
+
const rightEye = keypoints[0];
|
|
26318
|
+
const leftEye = keypoints[1];
|
|
26319
|
+
const mouth = keypoints[3];
|
|
26320
|
+
const rightEar = keypoints[4];
|
|
26321
|
+
const leftEar = keypoints[5];
|
|
26322
|
+
const nose = keypoints[2];
|
|
23836
26323
|
if (imageWidth > imageHeight) {
|
|
23837
26324
|
if (face.height / imageHeight > 0.7) {
|
|
23838
|
-
!this.emmitedPositionAlert && this.handleAlert(
|
|
26325
|
+
!this.emmitedPositionAlert && this.handleAlert(
|
|
26326
|
+
"wrong_face_size_detected",
|
|
26327
|
+
"position_detection_on_stream"
|
|
26328
|
+
);
|
|
23839
26329
|
failedFacePosition = true;
|
|
23840
26330
|
this.emmitedPositionAlert = true;
|
|
23841
26331
|
} else if (face.width / imageWidth > 0.7) {
|
|
23842
|
-
!this.emmitedPositionAlert && this.handleAlert(
|
|
26332
|
+
!this.emmitedPositionAlert && this.handleAlert(
|
|
26333
|
+
"wrong_face_size_detected",
|
|
26334
|
+
"position_detection_on_stream"
|
|
26335
|
+
);
|
|
23843
26336
|
this.emmitedPositionAlert = true;
|
|
23844
26337
|
failedFacePosition = true;
|
|
23845
26338
|
}
|
|
23846
26339
|
}
|
|
23847
|
-
|
|
23848
|
-
|
|
26340
|
+
const start = [face.originX, face.originY];
|
|
26341
|
+
const end = [face.originX + face.width, face.originY + face.height];
|
|
23849
26342
|
if (start[0] < 0.1 * face.width || start[1] < 0.2 * face.height || end[0] > imageWidth - 0.1 * face.width || end[1] > imageHeight - 5) {
|
|
23850
|
-
!this.emmitedPositionAlert && this.handleAlert(
|
|
26343
|
+
!this.emmitedPositionAlert && this.handleAlert(
|
|
26344
|
+
"wrong_face_position_edge_detected",
|
|
26345
|
+
"position_detection_on_stream"
|
|
26346
|
+
);
|
|
23851
26347
|
this.emmitedPositionAlert = true;
|
|
23852
26348
|
failedFacePosition = true;
|
|
23853
26349
|
}
|
|
23854
|
-
|
|
23855
|
-
|
|
23856
|
-
|
|
23857
|
-
|
|
26350
|
+
const leftGap = start[0];
|
|
26351
|
+
const rightGap = imageWidth - end[0];
|
|
26352
|
+
const topGap = start[1];
|
|
26353
|
+
const bottomGap = imageHeight - end[1];
|
|
23858
26354
|
if (leftGap > 2 * rightGap) {
|
|
23859
|
-
!this.emmitedPositionAlert && this.handleAlert(
|
|
26355
|
+
!this.emmitedPositionAlert && this.handleAlert(
|
|
26356
|
+
"wrong_face_position_move_right_detected",
|
|
26357
|
+
"position_detection_on_stream"
|
|
26358
|
+
);
|
|
23860
26359
|
this.emmitedPositionAlert = true;
|
|
23861
26360
|
failedFacePosition = true;
|
|
23862
26361
|
}
|
|
23863
26362
|
if (topGap > 4 * bottomGap) {
|
|
23864
|
-
!this.emmitedPositionAlert && this.handleAlert(
|
|
26363
|
+
!this.emmitedPositionAlert && this.handleAlert(
|
|
26364
|
+
"wrong_face_position_move_top_detected",
|
|
26365
|
+
"position_detection_on_stream"
|
|
26366
|
+
);
|
|
23865
26367
|
this.emmitedPositionAlert = true;
|
|
23866
26368
|
failedFacePosition = true;
|
|
23867
26369
|
}
|
|
23868
26370
|
if (rightGap > 2 * leftGap) {
|
|
23869
|
-
!this.emmitedPositionAlert && this.handleAlert(
|
|
26371
|
+
!this.emmitedPositionAlert && this.handleAlert(
|
|
26372
|
+
"wrong_face_position_move_left_detected",
|
|
26373
|
+
"position_detection_on_stream"
|
|
26374
|
+
);
|
|
23870
26375
|
this.emmitedPositionAlert = true;
|
|
23871
26376
|
failedFacePosition = true;
|
|
23872
26377
|
}
|
|
23873
26378
|
if (bottomGap > 3 * topGap) {
|
|
23874
|
-
!this.emmitedPositionAlert && this.handleAlert(
|
|
26379
|
+
!this.emmitedPositionAlert && this.handleAlert(
|
|
26380
|
+
"wrong_face_position_move_bottom_detected",
|
|
26381
|
+
"position_detection_on_stream"
|
|
26382
|
+
);
|
|
23875
26383
|
this.emmitedPositionAlert = true;
|
|
23876
26384
|
failedFacePosition = true;
|
|
23877
26385
|
}
|
|
23878
26386
|
if (failedFacePosition == false) {
|
|
23879
|
-
this.emmitedPositionAlert && this.handleOk(
|
|
26387
|
+
this.emmitedPositionAlert && this.handleOk(
|
|
26388
|
+
"ok_position_face_detected",
|
|
26389
|
+
"position_detection_on_stream"
|
|
26390
|
+
);
|
|
23880
26391
|
this.emmitedPositionAlert = false;
|
|
23881
26392
|
}
|
|
23882
26393
|
}
|
|
@@ -27405,12 +29916,12 @@ var BackendService = class {
|
|
|
27405
29916
|
});
|
|
27406
29917
|
return result.data;
|
|
27407
29918
|
}
|
|
27408
|
-
async verifyFace(proctoringId2, faceImage) {
|
|
29919
|
+
async verifyFace(proctoringId2, faceImage, retry) {
|
|
27409
29920
|
const result = await this.makeRequestAxios({
|
|
27410
29921
|
path: `/Realtime/verify-face`,
|
|
27411
29922
|
method: "POST",
|
|
27412
29923
|
jwt: this.token,
|
|
27413
|
-
body: { "proctoringId": proctoringId2, "base64": faceImage }
|
|
29924
|
+
body: { "proctoringId": proctoringId2, "base64": faceImage, "retry": retry }
|
|
27414
29925
|
});
|
|
27415
29926
|
return result.data;
|
|
27416
29927
|
}
|
|
@@ -27963,6 +30474,39 @@ var UploadService = class {
|
|
|
27963
30474
|
this.contImages = 0;
|
|
27964
30475
|
this.proctoringId = proctoringId2;
|
|
27965
30476
|
}
|
|
30477
|
+
async uploadPackage(data, token) {
|
|
30478
|
+
const { file, onProgress } = data;
|
|
30479
|
+
try {
|
|
30480
|
+
const progressCallback = (e3) => {
|
|
30481
|
+
const progress = e3.loadedBytes / file.size * 100;
|
|
30482
|
+
onProgress && onProgress(Math.round(progress));
|
|
30483
|
+
};
|
|
30484
|
+
const uploadUrl = await this.backend.getSignedUrl(token, file, this.proctoringId);
|
|
30485
|
+
const uploaded = await axios_default.request({
|
|
30486
|
+
url: uploadUrl,
|
|
30487
|
+
method: "PUT",
|
|
30488
|
+
headers: {
|
|
30489
|
+
"Content-Type": file.type,
|
|
30490
|
+
"x-ms-blob-type": "BlockBlob"
|
|
30491
|
+
},
|
|
30492
|
+
data: file,
|
|
30493
|
+
onUploadProgress: (p3) => {
|
|
30494
|
+
progressCallback({ loadedBytes: p3.loaded });
|
|
30495
|
+
}
|
|
30496
|
+
}).then(() => true).catch(() => false);
|
|
30497
|
+
return {
|
|
30498
|
+
storage: "upload" /* none */,
|
|
30499
|
+
url: uploadUrl,
|
|
30500
|
+
uploaded
|
|
30501
|
+
};
|
|
30502
|
+
} catch (err) {
|
|
30503
|
+
trackers.registerError(this.proctoringId, `Failed to upload to AWS
|
|
30504
|
+
File name: ${file.name}
|
|
30505
|
+
File type: ${file.type}
|
|
30506
|
+
File size: ${file.size}`);
|
|
30507
|
+
throw new Error("Failed to upload to AWS");
|
|
30508
|
+
}
|
|
30509
|
+
}
|
|
27966
30510
|
async uploadImages(data, token, packSize) {
|
|
27967
30511
|
const { file, onProgress } = data;
|
|
27968
30512
|
try {
|
|
@@ -28243,6 +30787,7 @@ var VolumeMeter = class {
|
|
|
28243
30787
|
};
|
|
28244
30788
|
|
|
28245
30789
|
// src/new-flow/recorders/CameraRecorder.ts
|
|
30790
|
+
var import_jszip_min = __toESM(require_jszip_min());
|
|
28246
30791
|
var CameraRecorder = class {
|
|
28247
30792
|
constructor(options, videoOptions, paramsConfig, backend, backendToken) {
|
|
28248
30793
|
this.blobs = [];
|
|
@@ -28252,7 +30797,6 @@ var CameraRecorder = class {
|
|
|
28252
30797
|
noiseLimit: 40
|
|
28253
30798
|
},
|
|
28254
30799
|
imageBehaviourParameters: {
|
|
28255
|
-
frames: 40,
|
|
28256
30800
|
useUploadImage: true,
|
|
28257
30801
|
uploadInterval: 20,
|
|
28258
30802
|
saveVideo: true
|
|
@@ -28264,7 +30808,6 @@ var CameraRecorder = class {
|
|
|
28264
30808
|
}
|
|
28265
30809
|
};
|
|
28266
30810
|
// private imageParams: ImageParameters = {
|
|
28267
|
-
// frames: 40,
|
|
28268
30811
|
// useUploadImage: true,
|
|
28269
30812
|
// uploadInterval: 20,
|
|
28270
30813
|
// saveVideo: true
|
|
@@ -28295,6 +30838,7 @@ var CameraRecorder = class {
|
|
|
28295
30838
|
this.hardwareStream = null;
|
|
28296
30839
|
this.internalClonedStream = null;
|
|
28297
30840
|
this.currentRetries = 0;
|
|
30841
|
+
this.packageCount = 0;
|
|
28298
30842
|
this.noiseWait = 20;
|
|
28299
30843
|
this.options = options;
|
|
28300
30844
|
this.videoOptions = videoOptions;
|
|
@@ -28355,7 +30899,7 @@ var CameraRecorder = class {
|
|
|
28355
30899
|
}
|
|
28356
30900
|
}
|
|
28357
30901
|
async startRecording(options) {
|
|
28358
|
-
var _a2, _b, _c2, _d, _e3, _f, _g, _h;
|
|
30902
|
+
var _a2, _b, _c2, _d, _e3, _f, _g, _h, _i3;
|
|
28359
30903
|
if ((((_a2 = this.paramsConfig.videoBehaviourParameters) == null ? void 0 : _a2.detectPerson) || ((_b = this.paramsConfig.videoBehaviourParameters) == null ? void 0 : _b.detectCellPhone) || ((_c2 = this.paramsConfig.videoBehaviourParameters) == null ? void 0 : _c2.detectFace)) && !(options == null ? void 0 : options.retry)) {
|
|
28360
30904
|
await this.initializeDetectors();
|
|
28361
30905
|
}
|
|
@@ -28433,6 +30977,11 @@ Setting: ${JSON.stringify(settings, null, 2)}`
|
|
|
28433
30977
|
await this.objectDetection.enableCam(this.cameraStream);
|
|
28434
30978
|
}
|
|
28435
30979
|
this.filesToUpload = [];
|
|
30980
|
+
if (this.options.proctoringType == "REALTIME") {
|
|
30981
|
+
this.captureFrame();
|
|
30982
|
+
this.sendFrameInterval = setInterval(() => this.captureFrame(), 1e3 * ((_i3 = this.paramsConfig.videoBehaviourParameters) == null ? void 0 : _i3.realtimeUploadInterval));
|
|
30983
|
+
}
|
|
30984
|
+
this.packageCount = 0;
|
|
28436
30985
|
}
|
|
28437
30986
|
async stopRecording() {
|
|
28438
30987
|
this.isCanvasLoopActive = false;
|
|
@@ -28461,28 +31010,7 @@ Setting: ${JSON.stringify(settings, null, 2)}`
|
|
|
28461
31010
|
clearInterval(this.imageInterval);
|
|
28462
31011
|
clearInterval(this.sendFrameInterval);
|
|
28463
31012
|
if (this.options.proctoringType == "REALTIME" && this.upload && this.backendToken) {
|
|
28464
|
-
|
|
28465
|
-
const packSize = this.paramsConfig.imageBehaviourParameters.uploadInterval;
|
|
28466
|
-
for (let i3 = 0; i3 < size; i3++) {
|
|
28467
|
-
if (i3 == size - 1 && this.filesToUpload[0]) {
|
|
28468
|
-
const imageName = this.filesToUpload[0].name.replace(
|
|
28469
|
-
".jpg",
|
|
28470
|
-
"_realtime.jpg"
|
|
28471
|
-
);
|
|
28472
|
-
const file = new File([this.filesToUpload[0]], imageName, {
|
|
28473
|
-
type: "image/jpeg"
|
|
28474
|
-
});
|
|
28475
|
-
this.filesToUpload[0] = file;
|
|
28476
|
-
}
|
|
28477
|
-
this.filesToUpload[0] && await this.upload.uploadImages(
|
|
28478
|
-
{
|
|
28479
|
-
file: this.filesToUpload[0]
|
|
28480
|
-
},
|
|
28481
|
-
this.backendToken,
|
|
28482
|
-
packSize
|
|
28483
|
-
);
|
|
28484
|
-
this.filesToUpload.shift();
|
|
28485
|
-
}
|
|
31013
|
+
await this.sendPackage();
|
|
28486
31014
|
}
|
|
28487
31015
|
this.volumeMeter && this.volumeMeter.stop();
|
|
28488
31016
|
this.intervalNoiseDetection && clearInterval(this.intervalNoiseDetection);
|
|
@@ -28552,23 +31080,25 @@ Setting: ${JSON.stringify(settings, null, 2)}`
|
|
|
28552
31080
|
this.canvas.getContext("2d").drawImage(this.video, 0, 0, this.canvas.width, this.canvas.height);
|
|
28553
31081
|
return this.canvas.toDataURL("image/jpeg");
|
|
28554
31082
|
}
|
|
28555
|
-
// De um em um segundo captura um frame
|
|
31083
|
+
// De um em um segundo captura um frame (é ligado de 30 em 30 segundos)
|
|
28556
31084
|
captureFrame() {
|
|
31085
|
+
var _a2;
|
|
28557
31086
|
let imageFile;
|
|
28558
31087
|
this.configImageCapture();
|
|
28559
|
-
const packSize = this.paramsConfig.
|
|
31088
|
+
const packSize = (_a2 = this.paramsConfig.videoBehaviourParameters) == null ? void 0 : _a2.realtimePackageSize;
|
|
28560
31089
|
let initSend = false;
|
|
31090
|
+
this.imageCount++;
|
|
28561
31091
|
this.imageInterval = setInterval(async () => {
|
|
28562
31092
|
this.canvas.getContext("2d").drawImage(this.video, 0, 0, this.canvas.width, this.canvas.height);
|
|
28563
31093
|
const image_data_url = this.canvas.toDataURL("image/jpeg");
|
|
28564
31094
|
if (this.proctoringId == void 0) return;
|
|
28565
|
-
if (initSend == false && packSize
|
|
31095
|
+
if (initSend == false && packSize == this.imageCount) {
|
|
28566
31096
|
initSend = true;
|
|
28567
|
-
this.
|
|
31097
|
+
this.imageCount = 0;
|
|
31098
|
+
clearInterval(this.imageInterval);
|
|
31099
|
+
this.sendPackage();
|
|
28568
31100
|
}
|
|
28569
31101
|
let imageName = `${this.proctoringId}_${this.imageCount + 1}.jpg`;
|
|
28570
|
-
if ((this.imageCount + 1) % packSize == 0)
|
|
28571
|
-
imageName = `${this.proctoringId}_${this.imageCount + 1}_realtime.jpg`;
|
|
28572
31102
|
imageFile = await this.getFile(image_data_url, imageName, "image/jpeg");
|
|
28573
31103
|
if (imageFile && imageFile.size > 10 && packSize > 0) {
|
|
28574
31104
|
this.filesToUpload.push(imageFile);
|
|
@@ -28576,47 +31106,50 @@ Setting: ${JSON.stringify(settings, null, 2)}`
|
|
|
28576
31106
|
}
|
|
28577
31107
|
}, 1e3);
|
|
28578
31108
|
}
|
|
28579
|
-
//
|
|
28580
|
-
|
|
28581
|
-
const packSize = this.paramsConfig.imageBehaviourParameters.uploadInterval;
|
|
31109
|
+
// envia pacote de imagens
|
|
31110
|
+
async sendPackage() {
|
|
28582
31111
|
let pending = false;
|
|
28583
31112
|
let undeliveredPackagesCount = 0;
|
|
28584
|
-
this.
|
|
28585
|
-
|
|
31113
|
+
if (this.upload && this.backendToken && !pending && this.filesToUpload.length > 0) {
|
|
31114
|
+
undeliveredPackagesCount = 0;
|
|
31115
|
+
pending = true;
|
|
31116
|
+
const zip = new import_jszip_min.default();
|
|
31117
|
+
const files = this.filesToUpload;
|
|
31118
|
+
for (const file of files) {
|
|
31119
|
+
zip.file(file.name, file);
|
|
31120
|
+
}
|
|
31121
|
+
const blob = await zip.generateAsync({ type: "blob" });
|
|
31122
|
+
let packageName = "realtime_package_" + 30 * this.packageCount + ".zip";
|
|
31123
|
+
const myPackage = new File(
|
|
31124
|
+
[blob],
|
|
31125
|
+
packageName,
|
|
31126
|
+
{ type: "application/zip" }
|
|
31127
|
+
);
|
|
31128
|
+
const uploadResult = await this.upload.uploadPackage(
|
|
31129
|
+
{
|
|
31130
|
+
file: myPackage
|
|
31131
|
+
},
|
|
31132
|
+
this.backendToken
|
|
31133
|
+
);
|
|
31134
|
+
if (uploadResult.uploaded == true) {
|
|
31135
|
+
await this.filesToUpload.splice(0, this.filesToUpload.length);
|
|
31136
|
+
this.packageCount++;
|
|
31137
|
+
} else {
|
|
31138
|
+
console.log("erro no upload do pacote");
|
|
31139
|
+
}
|
|
31140
|
+
pending = false;
|
|
31141
|
+
} else if (pending) {
|
|
31142
|
+
undeliveredPackagesCount++;
|
|
31143
|
+
if (undeliveredPackagesCount == 3) {
|
|
28586
31144
|
undeliveredPackagesCount = 0;
|
|
28587
|
-
let
|
|
28588
|
-
|
|
28589
|
-
|
|
28590
|
-
|
|
28591
|
-
|
|
28592
|
-
|
|
28593
|
-
{
|
|
28594
|
-
file: this.filesToUpload[0]
|
|
28595
|
-
},
|
|
28596
|
-
this.backendToken,
|
|
28597
|
-
packSize
|
|
28598
|
-
);
|
|
28599
|
-
if (uploadResult.uploaded == true) {
|
|
28600
|
-
await this.filesToUpload.shift();
|
|
28601
|
-
count++;
|
|
28602
|
-
} else {
|
|
28603
|
-
console.log("erro no upload: " + this.filesToUpload[0].name);
|
|
28604
|
-
}
|
|
28605
|
-
}
|
|
28606
|
-
pending = false;
|
|
28607
|
-
} else if (pending) {
|
|
28608
|
-
undeliveredPackagesCount++;
|
|
28609
|
-
if (undeliveredPackagesCount == 3) {
|
|
28610
|
-
undeliveredPackagesCount = 0;
|
|
28611
|
-
let newCanvasWidth = this.videoOptions.width / 2;
|
|
28612
|
-
let newCanvasHeight = this.videoOptions.height / 2;
|
|
28613
|
-
if (newCanvasWidth < 320) newCanvasWidth = 320;
|
|
28614
|
-
if (newCanvasHeight < 180) newCanvasHeight = 180;
|
|
28615
|
-
this.canvas.width = newCanvasWidth;
|
|
28616
|
-
this.canvas.height = newCanvasHeight;
|
|
28617
|
-
}
|
|
31145
|
+
let newCanvasWidth = this.videoOptions.width / 2;
|
|
31146
|
+
let newCanvasHeight = this.videoOptions.height / 2;
|
|
31147
|
+
if (newCanvasWidth < 320) newCanvasWidth = 320;
|
|
31148
|
+
if (newCanvasHeight < 180) newCanvasHeight = 180;
|
|
31149
|
+
this.canvas.width = newCanvasWidth;
|
|
31150
|
+
this.canvas.height = newCanvasHeight;
|
|
28618
31151
|
}
|
|
28619
|
-
}
|
|
31152
|
+
}
|
|
28620
31153
|
}
|
|
28621
31154
|
download(file) {
|
|
28622
31155
|
const url2 = URL.createObjectURL(file);
|
|
@@ -29183,8 +31716,20 @@ var DeviceCheckerUI = class {
|
|
|
29183
31716
|
);
|
|
29184
31717
|
checkmark_FacePosition.appendChild(checkmark_stem_FacePosition);
|
|
29185
31718
|
checkmark_FacePosition.appendChild(checkmark_kick_FacePosition);
|
|
31719
|
+
const info_FacePosition = document.createElement("span");
|
|
31720
|
+
const info_stem_FacePosition = document.createElement("div");
|
|
31721
|
+
const info_kick_FacePosition = document.createElement("div");
|
|
31722
|
+
info_FacePosition.style.marginLeft = "10px";
|
|
31723
|
+
info_FacePosition.setAttribute("class", "info");
|
|
31724
|
+
info_FacePosition.setAttribute("id", "info_FacePosition");
|
|
31725
|
+
info_FacePosition.style.display = "none";
|
|
31726
|
+
info_stem_FacePosition.setAttribute("class", "info_stem");
|
|
31727
|
+
info_kick_FacePosition.setAttribute("class", "info_kick");
|
|
31728
|
+
info_FacePosition.appendChild(info_stem_FacePosition);
|
|
31729
|
+
info_FacePosition.appendChild(info_kick_FacePosition);
|
|
29186
31730
|
alertDivFacePosition.appendChild(checkmark_FacePosition);
|
|
29187
31731
|
alertDivFacePosition.appendChild(facePositionAlert);
|
|
31732
|
+
alertDivFacePosition.appendChild(info_FacePosition);
|
|
29188
31733
|
const alertDivAmbientVerify = document.createElement("div");
|
|
29189
31734
|
alertDivAmbientVerify.setAttribute("class", "alert-div");
|
|
29190
31735
|
alertDivAmbientVerify.setAttribute("id", "alertDivAmbientVerify");
|
|
@@ -29515,6 +32060,8 @@ var DeviceCheckerUI = class {
|
|
|
29515
32060
|
realtimeAlertsUI(response) {
|
|
29516
32061
|
const facePositionAlert = document.getElementById("facePositionAlert");
|
|
29517
32062
|
const ambientVerifyAlert = document.getElementById("ambientVerifyAlert");
|
|
32063
|
+
const alertDivFacePosition = document.getElementById("alertDivFacePosition");
|
|
32064
|
+
const info_FacePosition = document.getElementById("info_FacePosition");
|
|
29518
32065
|
const checkmark_FacePosition = document.getElementById("checkmark_FacePosition");
|
|
29519
32066
|
const checkmark_stem_FacePosition = document.getElementById("checkmark_stem_FacePosition");
|
|
29520
32067
|
const checkmark_kick_FacePosition = document.getElementById("checkmark_kick_FacePosition");
|
|
@@ -29525,6 +32072,8 @@ var DeviceCheckerUI = class {
|
|
|
29525
32072
|
if (response.status === "OK") {
|
|
29526
32073
|
facePositionAlert && (facePositionAlert.style.color = "#16A34A");
|
|
29527
32074
|
ambientVerifyAlert && (ambientVerifyAlert.style.color = "#16A34A");
|
|
32075
|
+
alertDivFacePosition && alertDivFacePosition.setAttribute("title", ``);
|
|
32076
|
+
info_FacePosition && (info_FacePosition.style.display = "none");
|
|
29528
32077
|
alertDivAmbientVerify && alertDivAmbientVerify.setAttribute("title", ``);
|
|
29529
32078
|
if (checkmark_FacePosition) {
|
|
29530
32079
|
checkmark_FacePosition.setAttribute("class", "checkmark");
|
|
@@ -29539,6 +32088,8 @@ var DeviceCheckerUI = class {
|
|
|
29539
32088
|
} else {
|
|
29540
32089
|
if (checkmark_FacePosition && (response.type === "position_detection_on_stream" || response.type === "face_detection_on_stream")) {
|
|
29541
32090
|
facePositionAlert && (facePositionAlert.style.color = "#FF0000");
|
|
32091
|
+
info_FacePosition && (info_FacePosition.style.display = "block");
|
|
32092
|
+
alertDivFacePosition && alertDivFacePosition.setAttribute("title", response.description);
|
|
29542
32093
|
checkmark_FacePosition.setAttribute("class", "checkmark_error");
|
|
29543
32094
|
checkmark_stem_FacePosition.setAttribute("class", "checkmark_stem_error");
|
|
29544
32095
|
checkmark_kick_FacePosition.setAttribute("class", "checkmark_kick_error");
|
|
@@ -30649,54 +33200,186 @@ var ProctoringUploader = class {
|
|
|
30649
33200
|
var AlertRecorder = class {
|
|
30650
33201
|
constructor(options, optionsProctoring) {
|
|
30651
33202
|
this.alerts = [];
|
|
33203
|
+
// Variáveis para controle de inatividade
|
|
33204
|
+
this.lastActivityTime = Date.now();
|
|
33205
|
+
this.IDLE_THRESHOLD_MS = 3e4;
|
|
33206
|
+
// ==========================================
|
|
33207
|
+
// HANDLERS (Funções Arrow para preservar o 'this')
|
|
33208
|
+
// ==========================================
|
|
33209
|
+
// 1. LOST / RETURN FOCUS
|
|
33210
|
+
this.handleLostFocus = () => {
|
|
33211
|
+
if (this.getRelativeTime() > 1e4) {
|
|
33212
|
+
const alertPayload = {
|
|
33213
|
+
begin: this.getRelativeTime(),
|
|
33214
|
+
end: 0,
|
|
33215
|
+
alert: 25 /* FocusOff */,
|
|
33216
|
+
type: 3 /* Screen */
|
|
33217
|
+
};
|
|
33218
|
+
this.onLostFocusCallback(alertPayload);
|
|
33219
|
+
this.alerts.push(alertPayload);
|
|
33220
|
+
}
|
|
33221
|
+
};
|
|
33222
|
+
this.handleReturnFocus = () => {
|
|
33223
|
+
const lastAlert = this.alerts[this.alerts.length - 1];
|
|
33224
|
+
if (lastAlert) {
|
|
33225
|
+
this.onFocusCallback({
|
|
33226
|
+
begin: lastAlert.begin,
|
|
33227
|
+
end: this.getRelativeTime(),
|
|
33228
|
+
alert: 25 /* FocusOff */,
|
|
33229
|
+
type: 3 /* Screen */
|
|
33230
|
+
});
|
|
33231
|
+
lastAlert.end = this.getRelativeTime();
|
|
33232
|
+
}
|
|
33233
|
+
};
|
|
33234
|
+
// 2. SPLIT SCREEN DETECTION
|
|
33235
|
+
this.handleResize = () => {
|
|
33236
|
+
clearTimeout(this.resizeTimeout);
|
|
33237
|
+
this.resizeTimeout = setTimeout(() => {
|
|
33238
|
+
const screenWidth = window.screen.availWidth;
|
|
33239
|
+
const windowWidth = window.outerWidth;
|
|
33240
|
+
if (windowWidth < screenWidth * 0.85) {
|
|
33241
|
+
const msg = `Split Screen Detectado: Janela ocupa ${(windowWidth / screenWidth * 100).toFixed(0)}% da tela`;
|
|
33242
|
+
this.createAlert(200 /* System */, 3 /* Screen */, msg);
|
|
33243
|
+
this.onRealtimeAlertCallback && this.onRealtimeAlertCallback({
|
|
33244
|
+
status: "ALERT",
|
|
33245
|
+
description: msg,
|
|
33246
|
+
type: "split_screen"
|
|
33247
|
+
});
|
|
33248
|
+
}
|
|
33249
|
+
}, 1e3);
|
|
33250
|
+
};
|
|
33251
|
+
// 3. DETECÇÃO DE INATIVIDADE (NO INPUT)
|
|
33252
|
+
this.handleUserActivity = (e3) => {
|
|
33253
|
+
this.lastActivityTime = Date.now();
|
|
33254
|
+
console.log("\u{1F449} handleUserActivity", e3);
|
|
33255
|
+
};
|
|
33256
|
+
// 5. CLIPBOARD HANDLERS
|
|
33257
|
+
this.handleCopy = (e3) => {
|
|
33258
|
+
e3.preventDefault();
|
|
33259
|
+
const msg = "Tentativa de Copiar (Clipboard)";
|
|
33260
|
+
this.createAlert(100 /* ForbiddenAction */, 6 /* System */, msg);
|
|
33261
|
+
this.onRealtimeAlertCallback && this.onRealtimeAlertCallback({
|
|
33262
|
+
status: "ALERT",
|
|
33263
|
+
description: msg,
|
|
33264
|
+
type: "clipboard_copy"
|
|
33265
|
+
});
|
|
33266
|
+
};
|
|
33267
|
+
this.handleCut = (e3) => {
|
|
33268
|
+
e3.preventDefault();
|
|
33269
|
+
const msg = "Tentativa de Recortar (Clipboard)";
|
|
33270
|
+
this.createAlert(100 /* ForbiddenAction */, 6 /* System */, msg);
|
|
33271
|
+
this.onRealtimeAlertCallback && this.onRealtimeAlertCallback({
|
|
33272
|
+
status: "ALERT",
|
|
33273
|
+
description: msg,
|
|
33274
|
+
type: "clipboard_cut"
|
|
33275
|
+
});
|
|
33276
|
+
};
|
|
33277
|
+
this.handlePaste = (e3) => {
|
|
33278
|
+
e3.preventDefault();
|
|
33279
|
+
const msg = "Tentativa de Colar (Clipboard)";
|
|
33280
|
+
this.createAlert(100 /* ForbiddenAction */, 6 /* System */, msg);
|
|
33281
|
+
this.onRealtimeAlertCallback && this.onRealtimeAlertCallback({
|
|
33282
|
+
status: "ALERT",
|
|
33283
|
+
description: msg,
|
|
33284
|
+
type: "clipboard_paste"
|
|
33285
|
+
});
|
|
33286
|
+
};
|
|
30652
33287
|
this.onLostFocusCallback = options.onLostFocusCallback;
|
|
30653
33288
|
this.onFocusCallback = options.onFocusCallback;
|
|
33289
|
+
this.onRealtimeAlertCallback = options.onRealtimeAlertCallback;
|
|
30654
33290
|
this.optionsProctoring = optionsProctoring;
|
|
30655
33291
|
}
|
|
30656
33292
|
async startRecording() {
|
|
30657
33293
|
this.startTime = new Date(Date.now());
|
|
30658
|
-
|
|
30659
|
-
|
|
30660
|
-
window.addEventListener("focus", () => this.onReturnFocus());
|
|
30661
|
-
}
|
|
33294
|
+
this.alerts = [];
|
|
33295
|
+
this.attachListeners();
|
|
30662
33296
|
}
|
|
30663
33297
|
async pauseRecording() {
|
|
30664
|
-
|
|
30665
|
-
window.removeEventListener("focus", () => this.onReturnFocus());
|
|
33298
|
+
this.detachListeners();
|
|
30666
33299
|
}
|
|
30667
33300
|
async resumeRecording() {
|
|
30668
|
-
|
|
30669
|
-
window.addEventListener("blur", () => this.onLostFocus());
|
|
30670
|
-
window.addEventListener("focus", () => this.onReturnFocus());
|
|
30671
|
-
}
|
|
33301
|
+
this.attachListeners();
|
|
30672
33302
|
}
|
|
30673
33303
|
async stopRecording() {
|
|
30674
|
-
|
|
30675
|
-
window.removeEventListener("focus", () => this.onReturnFocus());
|
|
33304
|
+
this.detachListeners();
|
|
30676
33305
|
}
|
|
30677
33306
|
async saveOnSession(session) {
|
|
30678
33307
|
this.alerts.forEach((alert) => {
|
|
30679
33308
|
session.addAlert(alert);
|
|
30680
33309
|
});
|
|
30681
33310
|
}
|
|
30682
|
-
|
|
30683
|
-
|
|
30684
|
-
|
|
30685
|
-
|
|
30686
|
-
|
|
30687
|
-
|
|
30688
|
-
|
|
30689
|
-
|
|
30690
|
-
|
|
30691
|
-
|
|
30692
|
-
|
|
33311
|
+
// ==========================================
|
|
33312
|
+
// GERENCIAMENTO DE LISTENERS
|
|
33313
|
+
// ==========================================
|
|
33314
|
+
attachListeners() {
|
|
33315
|
+
if (this.optionsProctoring.captureScreen) {
|
|
33316
|
+
window.addEventListener("blur", this.handleLostFocus);
|
|
33317
|
+
window.addEventListener("focus", this.handleReturnFocus);
|
|
33318
|
+
window.addEventListener("resize", this.handleResize);
|
|
33319
|
+
window.document.addEventListener("copy", this.handleCopy);
|
|
33320
|
+
window.document.addEventListener("cut", this.handleCut);
|
|
33321
|
+
window.document.addEventListener("paste", this.handlePaste);
|
|
33322
|
+
}
|
|
33323
|
+
}
|
|
33324
|
+
detachListeners() {
|
|
33325
|
+
window.removeEventListener("blur", this.handleLostFocus);
|
|
33326
|
+
window.removeEventListener("focus", this.handleReturnFocus);
|
|
33327
|
+
window.removeEventListener("resize", this.handleResize);
|
|
33328
|
+
window.document.removeEventListener("copy", this.handleCopy);
|
|
33329
|
+
window.document.removeEventListener("cut", this.handleCut);
|
|
33330
|
+
window.document.removeEventListener("paste", this.handlePaste);
|
|
33331
|
+
}
|
|
33332
|
+
// private startIdleChecker() {
|
|
33333
|
+
// this.stopIdleChecker(); // Garante que não tenha duplicação
|
|
33334
|
+
// this.idleCheckInterval = setInterval(() => {
|
|
33335
|
+
// const idleTime = Date.now() - this.lastActivityTime;
|
|
33336
|
+
// if (idleTime > this.IDLE_THRESHOLD_MS) {
|
|
33337
|
+
// // Verifica se já não mandamos esse alerta recentemente para não floodar
|
|
33338
|
+
// const lastAlert = this.alerts[this.alerts.length - 1];
|
|
33339
|
+
// // Se o último alerta não foi de inatividade ou foi há muito tempo, cria novo
|
|
33340
|
+
// if (!lastAlert || lastAlert.alert !== AlertCategory.ForbiddenAction || (this.getRelativeTime() - lastAlert.begin > 5000)) {
|
|
33341
|
+
// const msg = "Usuário inativo por muito tempo";
|
|
33342
|
+
// // Assumindo ForbiddenAction ou outra categoria adequada
|
|
33343
|
+
// this.createAlert(AlertCategory.ForbiddenAction, AlertType.System, msg);
|
|
33344
|
+
// this.onRealtimeAlertCallback && this.onRealtimeAlertCallback({
|
|
33345
|
+
// status: 'ALERT',
|
|
33346
|
+
// description: msg,
|
|
33347
|
+
// type: 'user_idle'
|
|
33348
|
+
// });
|
|
33349
|
+
// }
|
|
33350
|
+
// }
|
|
33351
|
+
// }, 5000); // Checa a cada 5 segundos
|
|
33352
|
+
// }
|
|
33353
|
+
// private stopIdleChecker() {
|
|
33354
|
+
// if (this.idleCheckInterval) {
|
|
33355
|
+
// clearInterval(this.idleCheckInterval);
|
|
33356
|
+
// this.idleCheckInterval = null;
|
|
33357
|
+
// }
|
|
33358
|
+
// }
|
|
33359
|
+
// 4. BACKGROUND EVENTS (Eventos disparados manualmente)
|
|
33360
|
+
addBackgroundEvent(description, category = 200 /* System */) {
|
|
33361
|
+
this.createAlert(category, 6 /* System */, description);
|
|
33362
|
+
this.onRealtimeAlertCallback && this.onRealtimeAlertCallback({
|
|
33363
|
+
status: "ALERT",
|
|
33364
|
+
description,
|
|
33365
|
+
type: "background_event"
|
|
33366
|
+
});
|
|
30693
33367
|
}
|
|
30694
|
-
|
|
30695
|
-
|
|
30696
|
-
|
|
30697
|
-
|
|
30698
|
-
|
|
30699
|
-
|
|
33368
|
+
// ==========================================
|
|
33369
|
+
// HELPERS
|
|
33370
|
+
// ==========================================
|
|
33371
|
+
getRelativeTime() {
|
|
33372
|
+
return Date.now() - this.startTime.getTime();
|
|
33373
|
+
}
|
|
33374
|
+
createAlert(category, type, description) {
|
|
33375
|
+
this.alerts.push({
|
|
33376
|
+
begin: this.getRelativeTime(),
|
|
33377
|
+
end: this.getRelativeTime(),
|
|
33378
|
+
// Eventos pontuais começam e terminam no mesmo ms (exceto focus)
|
|
33379
|
+
alert: category,
|
|
33380
|
+
type
|
|
33381
|
+
// description: description // Se sua interface Alert suportar descrição, descomente
|
|
33382
|
+
});
|
|
30700
33383
|
}
|
|
30701
33384
|
addAlert({ alert, type }) {
|
|
30702
33385
|
this.alerts.push({
|
|
@@ -32958,6 +35641,38 @@ Yi2.forVisionTasks = function(t3) {
|
|
|
32958
35641
|
};
|
|
32959
35642
|
|
|
32960
35643
|
// src/new-flow/recorders/NoiseRecorder.ts
|
|
35644
|
+
function encodeToWav(samples, sampleRate) {
|
|
35645
|
+
const bufferLength = samples.reduce((acc, chunk) => acc + chunk.length, 0);
|
|
35646
|
+
const buffer = new ArrayBuffer(44 + bufferLength * 2);
|
|
35647
|
+
const view = new DataView(buffer);
|
|
35648
|
+
const writeString = (view2, offset2, string) => {
|
|
35649
|
+
for (let i3 = 0; i3 < string.length; i3++) {
|
|
35650
|
+
view2.setUint8(offset2 + i3, string.charCodeAt(i3));
|
|
35651
|
+
}
|
|
35652
|
+
};
|
|
35653
|
+
writeString(view, 0, "RIFF");
|
|
35654
|
+
view.setUint32(4, 36 + bufferLength * 2, true);
|
|
35655
|
+
writeString(view, 8, "WAVE");
|
|
35656
|
+
writeString(view, 12, "fmt ");
|
|
35657
|
+
view.setUint32(16, 16, true);
|
|
35658
|
+
view.setUint16(20, 1, true);
|
|
35659
|
+
view.setUint16(22, 1, true);
|
|
35660
|
+
view.setUint32(24, sampleRate, true);
|
|
35661
|
+
view.setUint32(28, sampleRate * 2, true);
|
|
35662
|
+
view.setUint16(32, 2, true);
|
|
35663
|
+
view.setUint16(34, 16, true);
|
|
35664
|
+
writeString(view, 36, "data");
|
|
35665
|
+
view.setUint32(40, bufferLength * 2, true);
|
|
35666
|
+
let offset = 44;
|
|
35667
|
+
for (const chunk of samples) {
|
|
35668
|
+
for (let i3 = 0; i3 < chunk.length; i3++) {
|
|
35669
|
+
const s3 = Math.max(-1, Math.min(1, chunk[i3]));
|
|
35670
|
+
view.setInt16(offset, s3 < 0 ? s3 * 32768 : s3 * 32767, true);
|
|
35671
|
+
offset += 2;
|
|
35672
|
+
}
|
|
35673
|
+
}
|
|
35674
|
+
return new Blob([view], { type: "audio/wav" });
|
|
35675
|
+
}
|
|
32961
35676
|
var NoiseRecorder = class {
|
|
32962
35677
|
constructor(optionsProctoring, proctoringSession, paramsConfig, cameraRecorder, onRealtimeAlertsCallback, backend, backendToken) {
|
|
32963
35678
|
this.recordingInProgress = false;
|
|
@@ -32967,6 +35682,16 @@ var NoiseRecorder = class {
|
|
|
32967
35682
|
this.recordingStartTime = 0;
|
|
32968
35683
|
this.recordingEndTime = 0;
|
|
32969
35684
|
this.isSpeech = false;
|
|
35685
|
+
this.preRollBuffer = [];
|
|
35686
|
+
this.recordingChunks = [];
|
|
35687
|
+
this.PRE_ROLL_SECONDS = 2;
|
|
35688
|
+
this.SAMPLE_RATE = 16e3;
|
|
35689
|
+
// Deve bater com o AudioContext
|
|
35690
|
+
// O Worklet envia chunks de 16384 samples (aprox 1s).
|
|
35691
|
+
// Se quiser 2 segundos, guardamos os últimos 2 ou 3 chunks.
|
|
35692
|
+
this.MAX_PRE_ROLL_CHUNKS = 4;
|
|
35693
|
+
this.lastNoiseTime = 0;
|
|
35694
|
+
this.SILENCE_THRESHOLD = 3e3;
|
|
32970
35695
|
this.optionsProctoring = optionsProctoring;
|
|
32971
35696
|
this.proctoringSession = proctoringSession;
|
|
32972
35697
|
this.paramsConfig = paramsConfig;
|
|
@@ -33017,14 +35742,23 @@ var NoiseRecorder = class {
|
|
|
33017
35742
|
const currentVolume = ((_b = this.volumeMeter) == null ? void 0 : _b.getVolume()) || 0;
|
|
33018
35743
|
this.isSpeech = this.isSpeech || this.hasDesiredResult(this.audioClassificationResult);
|
|
33019
35744
|
if (!this.isSpeech && !this.recordingInProgress)
|
|
33020
|
-
noiseLimit = noiseLimit
|
|
33021
|
-
|
|
35745
|
+
noiseLimit = noiseLimit * 1.25;
|
|
35746
|
+
const isLoud = currentVolume >= noiseLimit;
|
|
35747
|
+
if (isLoud) {
|
|
35748
|
+
this.lastNoiseTime = Date.now();
|
|
35749
|
+
}
|
|
35750
|
+
if (isLoud && !this.recordingInProgress) {
|
|
33022
35751
|
this.recordingInProgress = true;
|
|
33023
|
-
this.
|
|
33024
|
-
|
|
33025
|
-
|
|
33026
|
-
const
|
|
33027
|
-
|
|
35752
|
+
this.recordingChunks = [...this.preRollBuffer];
|
|
35753
|
+
const totalSamplesInBuffer = this.preRollBuffer.reduce((acc, chunk) => acc + chunk.length, 0);
|
|
35754
|
+
const bufferDurationMs = totalSamplesInBuffer / this.SAMPLE_RATE * 1e3;
|
|
35755
|
+
const triggerTime = Date.now() - this.examStartTime;
|
|
35756
|
+
this.recordingStartTime = triggerTime - bufferDurationMs;
|
|
35757
|
+
if (this.recordingStartTime < 0) this.recordingStartTime = 0;
|
|
35758
|
+
} else if (this.recordingInProgress) {
|
|
35759
|
+
const silenceDuration = Date.now() - this.lastNoiseTime;
|
|
35760
|
+
const currentRecordDuration = Date.now() - this.recordingStartTime;
|
|
35761
|
+
if (silenceDuration >= this.SILENCE_THRESHOLD && currentRecordDuration >= 3e3 && this.countLoopTimes > 4) {
|
|
33028
35762
|
await this.stopSoundRecord();
|
|
33029
35763
|
if (((_c2 = this.paramsConfig.videoBehaviourParameters) == null ? void 0 : _c2.detectNoise) && !this.isSpeech) {
|
|
33030
35764
|
this.onRealtimeAlertsCallback({
|
|
@@ -33049,19 +35783,22 @@ var NoiseRecorder = class {
|
|
|
33049
35783
|
}
|
|
33050
35784
|
}
|
|
33051
35785
|
async stopSoundRecord() {
|
|
33052
|
-
if (!this.
|
|
33053
|
-
this.audioRecorder.stopRecording && await this.audioRecorder.stopRecording();
|
|
35786
|
+
if (!this.recordingInProgress && this.recordingChunks.length === 0) return;
|
|
33054
35787
|
this.recordingEndTime = Date.now() - this.examStartTime;
|
|
33055
35788
|
if (this.optionsProctoring.proctoringType !== "REALTIME") return;
|
|
35789
|
+
const wavBlob = encodeToWav(this.recordingChunks, this.SAMPLE_RATE);
|
|
33056
35790
|
const file = new File(
|
|
33057
|
-
|
|
33058
|
-
|
|
35791
|
+
[wavBlob],
|
|
35792
|
+
// Usamos nosso blob gerado
|
|
35793
|
+
`EP_${this.proctoringSession.id}_${this.recordingStartTime}_${this.recordingEndTime}_${this.isSpeech ? "speech" : "noise"}.wav`,
|
|
35794
|
+
// Alterado para .wav
|
|
33059
35795
|
{
|
|
33060
|
-
type: "audio/
|
|
35796
|
+
type: "audio/wav"
|
|
33061
35797
|
}
|
|
33062
35798
|
);
|
|
33063
35799
|
this.uploadRecord(file);
|
|
33064
|
-
this.
|
|
35800
|
+
this.recordingChunks = [];
|
|
35801
|
+
this.recordingInProgress = false;
|
|
33065
35802
|
}
|
|
33066
35803
|
download(file) {
|
|
33067
35804
|
const url2 = URL.createObjectURL(file);
|
|
@@ -33112,7 +35849,7 @@ var NoiseRecorder = class {
|
|
|
33112
35849
|
});
|
|
33113
35850
|
}
|
|
33114
35851
|
async streamingAudioClassification() {
|
|
33115
|
-
this.context = new AudioContext({ sampleRate:
|
|
35852
|
+
this.context = new AudioContext({ sampleRate: this.SAMPLE_RATE });
|
|
33116
35853
|
try {
|
|
33117
35854
|
await this.context.audioWorklet.addModule(URL.createObjectURL(new Blob([audioProcessorContent], { type: "text/javascript" })));
|
|
33118
35855
|
} catch (error) {
|
|
@@ -33127,6 +35864,13 @@ var NoiseRecorder = class {
|
|
|
33127
35864
|
);
|
|
33128
35865
|
this.audioWorkletNode.port.onmessage = (event) => {
|
|
33129
35866
|
const inputData = event.data;
|
|
35867
|
+
this.preRollBuffer.push(inputData);
|
|
35868
|
+
if (this.preRollBuffer.length > this.MAX_PRE_ROLL_CHUNKS) {
|
|
35869
|
+
this.preRollBuffer.shift();
|
|
35870
|
+
}
|
|
35871
|
+
if (this.recordingInProgress) {
|
|
35872
|
+
this.recordingChunks.push(inputData);
|
|
35873
|
+
}
|
|
33130
35874
|
const result = this.audioClassifier.classify(inputData);
|
|
33131
35875
|
const categories = result[0].classifications[0].categories;
|
|
33132
35876
|
if (categories.length > 0) {
|
|
@@ -34210,7 +36954,6 @@ var Proctoring = class {
|
|
|
34210
36954
|
noiseLimit: 40
|
|
34211
36955
|
},
|
|
34212
36956
|
imageBehaviourParameters: {
|
|
34213
|
-
frames: 40,
|
|
34214
36957
|
useUploadImage: true,
|
|
34215
36958
|
uploadInterval: 20,
|
|
34216
36959
|
saveVideo: true
|
|
@@ -34220,7 +36963,9 @@ var Proctoring = class {
|
|
|
34220
36963
|
detectPerson: false,
|
|
34221
36964
|
detectCellPhone: false,
|
|
34222
36965
|
detectNoise: false,
|
|
34223
|
-
detectSpeech: false
|
|
36966
|
+
detectSpeech: false,
|
|
36967
|
+
realtimePackageSize: 20,
|
|
36968
|
+
realtimeUploadInterval: 30
|
|
34224
36969
|
}
|
|
34225
36970
|
};
|
|
34226
36971
|
this.proctoringId = "";
|
|
@@ -34231,8 +36976,12 @@ var Proctoring = class {
|
|
|
34231
36976
|
};
|
|
34232
36977
|
this.onLostFocusCallback = () => {
|
|
34233
36978
|
};
|
|
36979
|
+
this.onLostFocusAlertRecorderCallback = (response) => {
|
|
36980
|
+
};
|
|
34234
36981
|
this.onFocusCallback = () => {
|
|
34235
36982
|
};
|
|
36983
|
+
this.onFocusAlertRecorderCallback = (response) => {
|
|
36984
|
+
};
|
|
34236
36985
|
this.onChangeDevicesCallback = (devices) => {
|
|
34237
36986
|
return;
|
|
34238
36987
|
};
|
|
@@ -34270,11 +37019,45 @@ var Proctoring = class {
|
|
|
34270
37019
|
cb();
|
|
34271
37020
|
};
|
|
34272
37021
|
}
|
|
34273
|
-
|
|
34274
|
-
this.
|
|
37022
|
+
setOnLostFocusAlertRecorderCallback() {
|
|
37023
|
+
this.onLostFocusAlertRecorderCallback = async (response) => {
|
|
37024
|
+
this.onLostFocusCallback && this.onLostFocusCallback();
|
|
37025
|
+
if (this.sessionOptions.proctoringType === "REALTIME") {
|
|
37026
|
+
await this.onRealtimeAlertsCallback({
|
|
37027
|
+
type: "lost_focus",
|
|
37028
|
+
category: "lost_focus",
|
|
37029
|
+
description: "Perda de foco no exame",
|
|
37030
|
+
begin: response.begin,
|
|
37031
|
+
end: response.end,
|
|
37032
|
+
alert: 25 /* FocusOff */,
|
|
37033
|
+
status: "ALERT"
|
|
37034
|
+
});
|
|
37035
|
+
}
|
|
37036
|
+
};
|
|
37037
|
+
}
|
|
37038
|
+
setOnFocusAlertRecorderCallback() {
|
|
37039
|
+
this.onFocusAlertRecorderCallback = async (response) => {
|
|
37040
|
+
this.onFocusCallback && this.onFocusCallback();
|
|
37041
|
+
if (this.sessionOptions.proctoringType === "REALTIME") {
|
|
37042
|
+
await this.onRealtimeAlertsCallback({
|
|
37043
|
+
type: "focus",
|
|
37044
|
+
category: "focus",
|
|
37045
|
+
description: "Retorno de foco no exame",
|
|
37046
|
+
begin: response.begin,
|
|
37047
|
+
end: response.end,
|
|
37048
|
+
alert: 25 /* FocusOff */,
|
|
37049
|
+
status: "OK"
|
|
37050
|
+
});
|
|
37051
|
+
}
|
|
37052
|
+
};
|
|
37053
|
+
}
|
|
37054
|
+
async setOnLostFocusCallback(cb) {
|
|
37055
|
+
this.onLostFocusCallback = async () => await cb();
|
|
37056
|
+
this.setOnLostFocusAlertRecorderCallback();
|
|
34275
37057
|
}
|
|
34276
|
-
setOnFocusCallback(cb) {
|
|
34277
|
-
this.onFocusCallback = () => cb();
|
|
37058
|
+
async setOnFocusCallback(cb) {
|
|
37059
|
+
this.onFocusCallback = async () => await cb();
|
|
37060
|
+
this.setOnFocusAlertRecorderCallback();
|
|
34278
37061
|
}
|
|
34279
37062
|
async onChangeDevices(options = {}) {
|
|
34280
37063
|
const onChange = new onChangeDevices(
|
|
@@ -34296,6 +37079,10 @@ var Proctoring = class {
|
|
|
34296
37079
|
return 28 /* EnvironmentMultiplePeople */;
|
|
34297
37080
|
case "no_person_detected":
|
|
34298
37081
|
return 29 /* EnvironmentNoPeople */;
|
|
37082
|
+
case "lost_focus":
|
|
37083
|
+
return 25 /* FocusOff */;
|
|
37084
|
+
case "focus":
|
|
37085
|
+
return 25 /* FocusOff */;
|
|
34299
37086
|
default:
|
|
34300
37087
|
return null;
|
|
34301
37088
|
}
|
|
@@ -34306,14 +37093,20 @@ var Proctoring = class {
|
|
|
34306
37093
|
return 0 /* Face */;
|
|
34307
37094
|
case "person_detection_on_stream":
|
|
34308
37095
|
return 1 /* People */;
|
|
37096
|
+
case "lost_focus":
|
|
37097
|
+
return 2 /* LostFocus */;
|
|
37098
|
+
case "focus":
|
|
37099
|
+
return 2 /* LostFocus */;
|
|
34309
37100
|
default:
|
|
34310
37101
|
return null;
|
|
34311
37102
|
}
|
|
34312
37103
|
}
|
|
34313
37104
|
async onRealtimeAlerts(options = {}) {
|
|
37105
|
+
this.setOnLostFocusAlertRecorderCallback();
|
|
37106
|
+
this.setOnFocusAlertRecorderCallback();
|
|
34314
37107
|
this.onRealtimeAlertsCallback = async (response) => {
|
|
34315
37108
|
options.data && options.data(response);
|
|
34316
|
-
if (this.sessionOptions.proctoringType === "REALTIME" && (response.type === "face_detection_on_stream" || response.type === "person_detection_on_stream")) {
|
|
37109
|
+
if (this.sessionOptions.proctoringType === "REALTIME" && (response.type === "face_detection_on_stream" || response.type === "person_detection_on_stream" || response.type === "lost_focus" || response.type === "focus")) {
|
|
34317
37110
|
if (response.status === "ALERT") {
|
|
34318
37111
|
await this.backend.startRealtimeAlert({
|
|
34319
37112
|
proctoringId: this.proctoringId,
|
|
@@ -34377,8 +37170,9 @@ var Proctoring = class {
|
|
|
34377
37170
|
}) : void 0;
|
|
34378
37171
|
const alertRecorder = new AlertRecorder(
|
|
34379
37172
|
{
|
|
34380
|
-
onFocusCallback: () => this.
|
|
34381
|
-
onLostFocusCallback: () => this.
|
|
37173
|
+
onFocusCallback: (response) => this.onFocusAlertRecorderCallback(response),
|
|
37174
|
+
onLostFocusCallback: (response) => this.onLostFocusAlertRecorderCallback(response),
|
|
37175
|
+
onRealtimeAlertCallback: (response) => this.onRealtimeAlertsCallback(response)
|
|
34382
37176
|
},
|
|
34383
37177
|
options
|
|
34384
37178
|
);
|
|
@@ -34486,11 +37280,23 @@ Navigator: ${JSON.stringify(_navigator2)}`
|
|
|
34486
37280
|
startResponse.screenStream = this.allRecorders.screenRecorder.screenStream;
|
|
34487
37281
|
}
|
|
34488
37282
|
this.state = "Recording" /* Recording */;
|
|
34489
|
-
|
|
37283
|
+
let verifyFirstFaceIntervalCount = 0;
|
|
37284
|
+
let verifyingFace = false;
|
|
37285
|
+
this.verifyFirstFaceInterval = setInterval(async () => {
|
|
34490
37286
|
if (this.sessionOptions.proctoringType === "REALTIME") {
|
|
34491
|
-
|
|
37287
|
+
if (verifyingFace) return;
|
|
37288
|
+
verifyingFace = true;
|
|
37289
|
+
verifyFirstFaceIntervalCount++;
|
|
37290
|
+
try {
|
|
37291
|
+
var response = await this.backend.verifyFace(this.proctoringId, await this.allRecorders.cameraRecorder.getCurrentImageBase64(), verifyFirstFaceIntervalCount > 5 ? false : true);
|
|
37292
|
+
verifyingFace = false;
|
|
37293
|
+
clearInterval(this.verifyFirstFaceInterval);
|
|
37294
|
+
} catch (error) {
|
|
37295
|
+
verifyingFace = false;
|
|
37296
|
+
return;
|
|
37297
|
+
}
|
|
34492
37298
|
}
|
|
34493
|
-
},
|
|
37299
|
+
}, 1500);
|
|
34494
37300
|
return startResponse;
|
|
34495
37301
|
} catch (error) {
|
|
34496
37302
|
console.log(error);
|
|
@@ -34613,7 +37419,7 @@ Upload Services: ${uploaderServices}`,
|
|
|
34613
37419
|
var _a2, _b, _c2, _d;
|
|
34614
37420
|
trackers.registerFinish(this.proctoringSession.id, true, "");
|
|
34615
37421
|
console.log("finishResponse: ", finishResponse);
|
|
34616
|
-
options.
|
|
37422
|
+
options.onResultAvailable && options.onResultAvailable((_a2 = finishResponse == null ? void 0 : finishResponse.score) != null ? _a2 : 100, (_b = finishResponse == null ? void 0 : finishResponse.scoreThreshold) != null ? _b : 70, (_c2 = finishResponse == null ? void 0 : finishResponse.approved) != null ? _c2 : true, (_d = finishResponse == null ? void 0 : finishResponse.justification) != null ? _d : "");
|
|
34617
37423
|
}).catch((error) => {
|
|
34618
37424
|
trackers.registerFinish(
|
|
34619
37425
|
this.proctoringSession.id,
|
|
@@ -34627,6 +37433,9 @@ Upload Services: ${uploaderServices}`,
|
|
|
34627
37433
|
await this.backend.externalCameraFinish(externalSessionId);
|
|
34628
37434
|
}
|
|
34629
37435
|
}
|
|
37436
|
+
if (this.verifyFirstFaceInterval) {
|
|
37437
|
+
clearInterval(this.verifyFirstFaceInterval);
|
|
37438
|
+
}
|
|
34630
37439
|
this.state = "Stop" /* Stop */;
|
|
34631
37440
|
} catch (error) {
|
|
34632
37441
|
await this.cancel();
|
|
@@ -34961,12 +37770,12 @@ function useProctoring(proctoringOptions, enviromentConfig = "prod") {
|
|
|
34961
37770
|
const photo = new CapturePhoto();
|
|
34962
37771
|
const login = proctoring.login.bind(proctoring);
|
|
34963
37772
|
const originalStart = proctoring.start.bind(proctoring);
|
|
34964
|
-
const start = async (parameters2) => {
|
|
37773
|
+
const start = async (parameters2, videoOptions) => {
|
|
34965
37774
|
const deviceResult = checker.getDeviceCheckResult();
|
|
34966
37775
|
if (deviceResult) {
|
|
34967
37776
|
proctoring.setDeviceCheckData(deviceResult);
|
|
34968
37777
|
}
|
|
34969
|
-
return originalStart(parameters2);
|
|
37778
|
+
return originalStart(parameters2, videoOptions);
|
|
34970
37779
|
};
|
|
34971
37780
|
const finish = proctoring.finish.bind(proctoring);
|
|
34972
37781
|
const pause = proctoring.pause.bind(proctoring);
|
|
@@ -35041,4 +37850,17 @@ mime-types/index.js:
|
|
|
35041
37850
|
* Copyright(c) 2015 Douglas Christopher Wilson
|
|
35042
37851
|
* MIT Licensed
|
|
35043
37852
|
*)
|
|
37853
|
+
|
|
37854
|
+
jszip/dist/jszip.min.js:
|
|
37855
|
+
(*!
|
|
37856
|
+
|
|
37857
|
+
JSZip v3.10.1 - A JavaScript class for generating and reading zip files
|
|
37858
|
+
<http://stuartk.com/jszip>
|
|
37859
|
+
|
|
37860
|
+
(c) 2009-2016 Stuart Knightley <stuart [at] stuartk.com>
|
|
37861
|
+
Dual licenced under the MIT license or GPLv3. See https://raw.github.com/Stuk/jszip/main/LICENSE.markdown.
|
|
37862
|
+
|
|
37863
|
+
JSZip uses the library pako released under the MIT license :
|
|
37864
|
+
https://github.com/nodeca/pako/blob/main/LICENSE
|
|
37865
|
+
*)
|
|
35044
37866
|
*/
|