bok-reader 0.1.1

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/dist/bok.es.js ADDED
@@ -0,0 +1,3432 @@
1
+ import { jsxs as pt, Fragment as Lt, jsx as et } from "react/jsx-runtime";
2
+ import * as wt from "react";
3
+ import Ht, { useState as ft, useRef as yt, useCallback as Tt, useEffect as ut, useMemo as Gt } from "react";
4
+ import Ut, { createGlobalStyle as $t } from "styled-components";
5
+ var At = typeof globalThis < "u" ? globalThis : typeof window < "u" ? window : typeof global < "u" ? global : typeof self < "u" ? self : {};
6
+ function Yt(Z) {
7
+ return Z && Z.__esModule && Object.prototype.hasOwnProperty.call(Z, "default") ? Z.default : Z;
8
+ }
9
+ function Ot(Z) {
10
+ throw new Error('Could not dynamically require "' + Z + '". Please configure the dynamicRequireTargets or/and ignoreDynamicRequires option of @rollup/plugin-commonjs appropriately for this require call to work.');
11
+ }
12
+ var jt = { exports: {} };
13
+ /*!
14
+
15
+ JSZip v3.10.1 - A JavaScript class for generating and reading zip files
16
+ <http://stuartk.com/jszip>
17
+
18
+ (c) 2009-2016 Stuart Knightley <stuart [at] stuartk.com>
19
+ Dual licenced under the MIT license or GPLv3. See https://raw.github.com/Stuk/jszip/main/LICENSE.markdown.
20
+
21
+ JSZip uses the library pako released under the MIT license :
22
+ https://github.com/nodeca/pako/blob/main/LICENSE
23
+ */
24
+ (function(Z, K) {
25
+ (function(p) {
26
+ Z.exports = p();
27
+ })(function() {
28
+ return function p(A, v, a) {
29
+ function o(g, y) {
30
+ if (!v[g]) {
31
+ if (!A[g]) {
32
+ var _ = typeof Ot == "function" && Ot;
33
+ if (!y && _) return _(g, !0);
34
+ if (r) return r(g, !0);
35
+ var b = new Error("Cannot find module '" + g + "'");
36
+ throw b.code = "MODULE_NOT_FOUND", b;
37
+ }
38
+ var i = v[g] = { exports: {} };
39
+ A[g][0].call(i.exports, function(d) {
40
+ var n = A[g][1][d];
41
+ return o(n || d);
42
+ }, i, i.exports, p, A, v, a);
43
+ }
44
+ return v[g].exports;
45
+ }
46
+ for (var r = typeof Ot == "function" && Ot, l = 0; l < a.length; l++) o(a[l]);
47
+ return o;
48
+ }({ 1: [function(p, A, v) {
49
+ var a = p("./utils"), o = p("./support"), r = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=";
50
+ v.encode = function(l) {
51
+ for (var g, y, _, b, i, d, n, c = [], s = 0, m = l.length, w = m, x = a.getTypeOf(l) !== "string"; s < l.length; ) w = m - s, _ = x ? (g = l[s++], y = s < m ? l[s++] : 0, s < m ? l[s++] : 0) : (g = l.charCodeAt(s++), y = s < m ? l.charCodeAt(s++) : 0, s < m ? l.charCodeAt(s++) : 0), b = g >> 2, i = (3 & g) << 4 | y >> 4, d = 1 < w ? (15 & y) << 2 | _ >> 6 : 64, n = 2 < w ? 63 & _ : 64, c.push(r.charAt(b) + r.charAt(i) + r.charAt(d) + r.charAt(n));
52
+ return c.join("");
53
+ }, v.decode = function(l) {
54
+ var g, y, _, b, i, d, n = 0, c = 0, s = "data:";
55
+ if (l.substr(0, s.length) === s) throw new Error("Invalid base64 input, it looks like a data url.");
56
+ var m, w = 3 * (l = l.replace(/[^A-Za-z0-9+/=]/g, "")).length / 4;
57
+ if (l.charAt(l.length - 1) === r.charAt(64) && w--, l.charAt(l.length - 2) === r.charAt(64) && w--, w % 1 != 0) throw new Error("Invalid base64 input, bad content length.");
58
+ for (m = o.uint8array ? new Uint8Array(0 | w) : new Array(0 | w); n < l.length; ) g = r.indexOf(l.charAt(n++)) << 2 | (b = r.indexOf(l.charAt(n++))) >> 4, y = (15 & b) << 4 | (i = r.indexOf(l.charAt(n++))) >> 2, _ = (3 & i) << 6 | (d = r.indexOf(l.charAt(n++))), m[c++] = g, i !== 64 && (m[c++] = y), d !== 64 && (m[c++] = _);
59
+ return m;
60
+ };
61
+ }, { "./support": 30, "./utils": 32 }], 2: [function(p, A, v) {
62
+ var a = p("./external"), o = p("./stream/DataWorker"), r = p("./stream/Crc32Probe"), l = p("./stream/DataLengthProbe");
63
+ function g(y, _, b, i, d) {
64
+ this.compressedSize = y, this.uncompressedSize = _, this.crc32 = b, this.compression = i, this.compressedContent = d;
65
+ }
66
+ g.prototype = { getContentWorker: function() {
67
+ var y = new o(a.Promise.resolve(this.compressedContent)).pipe(this.compression.uncompressWorker()).pipe(new l("data_length")), _ = this;
68
+ return y.on("end", function() {
69
+ if (this.streamInfo.data_length !== _.uncompressedSize) throw new Error("Bug : uncompressed data size mismatch");
70
+ }), y;
71
+ }, getCompressedWorker: function() {
72
+ return new o(a.Promise.resolve(this.compressedContent)).withStreamInfo("compressedSize", this.compressedSize).withStreamInfo("uncompressedSize", this.uncompressedSize).withStreamInfo("crc32", this.crc32).withStreamInfo("compression", this.compression);
73
+ } }, g.createWorkerFrom = function(y, _, b) {
74
+ return y.pipe(new r()).pipe(new l("uncompressedSize")).pipe(_.compressWorker(b)).pipe(new l("compressedSize")).withStreamInfo("compression", _);
75
+ }, A.exports = g;
76
+ }, { "./external": 6, "./stream/Crc32Probe": 25, "./stream/DataLengthProbe": 26, "./stream/DataWorker": 27 }], 3: [function(p, A, v) {
77
+ var a = p("./stream/GenericWorker");
78
+ v.STORE = { magic: "\0\0", compressWorker: function() {
79
+ return new a("STORE compression");
80
+ }, uncompressWorker: function() {
81
+ return new a("STORE decompression");
82
+ } }, v.DEFLATE = p("./flate");
83
+ }, { "./flate": 7, "./stream/GenericWorker": 28 }], 4: [function(p, A, v) {
84
+ var a = p("./utils"), o = function() {
85
+ for (var r, l = [], g = 0; g < 256; g++) {
86
+ r = g;
87
+ for (var y = 0; y < 8; y++) r = 1 & r ? 3988292384 ^ r >>> 1 : r >>> 1;
88
+ l[g] = r;
89
+ }
90
+ return l;
91
+ }();
92
+ A.exports = function(r, l) {
93
+ return r !== void 0 && r.length ? a.getTypeOf(r) !== "string" ? function(g, y, _, b) {
94
+ var i = o, d = b + _;
95
+ g ^= -1;
96
+ for (var n = b; n < d; n++) g = g >>> 8 ^ i[255 & (g ^ y[n])];
97
+ return -1 ^ g;
98
+ }(0 | l, r, r.length, 0) : function(g, y, _, b) {
99
+ var i = o, d = b + _;
100
+ g ^= -1;
101
+ for (var n = b; n < d; n++) g = g >>> 8 ^ i[255 & (g ^ y.charCodeAt(n))];
102
+ return -1 ^ g;
103
+ }(0 | l, r, r.length, 0) : 0;
104
+ };
105
+ }, { "./utils": 32 }], 5: [function(p, A, v) {
106
+ v.base64 = !1, v.binary = !1, v.dir = !1, v.createFolders = !0, v.date = null, v.compression = null, v.compressionOptions = null, v.comment = null, v.unixPermissions = null, v.dosPermissions = null;
107
+ }, {}], 6: [function(p, A, v) {
108
+ var a = null;
109
+ a = typeof Promise < "u" ? Promise : p("lie"), A.exports = { Promise: a };
110
+ }, { lie: 37 }], 7: [function(p, A, v) {
111
+ var a = typeof Uint8Array < "u" && typeof Uint16Array < "u" && typeof Uint32Array < "u", o = p("pako"), r = p("./utils"), l = p("./stream/GenericWorker"), g = a ? "uint8array" : "array";
112
+ function y(_, b) {
113
+ l.call(this, "FlateWorker/" + _), this._pako = null, this._pakoAction = _, this._pakoOptions = b, this.meta = {};
114
+ }
115
+ v.magic = "\b\0", r.inherits(y, l), y.prototype.processChunk = function(_) {
116
+ this.meta = _.meta, this._pako === null && this._createPako(), this._pako.push(r.transformTo(g, _.data), !1);
117
+ }, y.prototype.flush = function() {
118
+ l.prototype.flush.call(this), this._pako === null && this._createPako(), this._pako.push([], !0);
119
+ }, y.prototype.cleanUp = function() {
120
+ l.prototype.cleanUp.call(this), this._pako = null;
121
+ }, y.prototype._createPako = function() {
122
+ this._pako = new o[this._pakoAction]({ raw: !0, level: this._pakoOptions.level || -1 });
123
+ var _ = this;
124
+ this._pako.onData = function(b) {
125
+ _.push({ data: b, meta: _.meta });
126
+ };
127
+ }, v.compressWorker = function(_) {
128
+ return new y("Deflate", _);
129
+ }, v.uncompressWorker = function() {
130
+ return new y("Inflate", {});
131
+ };
132
+ }, { "./stream/GenericWorker": 28, "./utils": 32, pako: 38 }], 8: [function(p, A, v) {
133
+ function a(i, d) {
134
+ var n, c = "";
135
+ for (n = 0; n < d; n++) c += String.fromCharCode(255 & i), i >>>= 8;
136
+ return c;
137
+ }
138
+ function o(i, d, n, c, s, m) {
139
+ var w, x, S = i.file, F = i.compression, E = m !== g.utf8encode, D = r.transformTo("string", m(S.name)), C = r.transformTo("string", g.utf8encode(S.name)), z = S.comment, X = r.transformTo("string", m(z)), h = r.transformTo("string", g.utf8encode(z)), T = C.length !== S.name.length, e = h.length !== z.length, P = "", V = "", L = "", Q = S.dir, W = S.date, tt = { crc32: 0, compressedSize: 0, uncompressedSize: 0 };
140
+ d && !n || (tt.crc32 = i.crc32, tt.compressedSize = i.compressedSize, tt.uncompressedSize = i.uncompressedSize);
141
+ var B = 0;
142
+ d && (B |= 8), E || !T && !e || (B |= 2048);
143
+ var I = 0, J = 0;
144
+ Q && (I |= 16), s === "UNIX" ? (J = 798, I |= function(G, st) {
145
+ var ht = G;
146
+ return G || (ht = st ? 16893 : 33204), (65535 & ht) << 16;
147
+ }(S.unixPermissions, Q)) : (J = 20, I |= function(G) {
148
+ return 63 & (G || 0);
149
+ }(S.dosPermissions)), w = W.getUTCHours(), w <<= 6, w |= W.getUTCMinutes(), w <<= 5, w |= W.getUTCSeconds() / 2, x = W.getUTCFullYear() - 1980, x <<= 4, x |= W.getUTCMonth() + 1, x <<= 5, x |= W.getUTCDate(), T && (V = a(1, 1) + a(y(D), 4) + C, P += "up" + a(V.length, 2) + V), e && (L = a(1, 1) + a(y(X), 4) + h, P += "uc" + a(L.length, 2) + L);
150
+ var $ = "";
151
+ return $ += `
152
+ \0`, $ += a(B, 2), $ += F.magic, $ += a(w, 2), $ += a(x, 2), $ += a(tt.crc32, 4), $ += a(tt.compressedSize, 4), $ += a(tt.uncompressedSize, 4), $ += a(D.length, 2), $ += a(P.length, 2), { fileRecord: _.LOCAL_FILE_HEADER + $ + D + P, dirRecord: _.CENTRAL_FILE_HEADER + a(J, 2) + $ + a(X.length, 2) + "\0\0\0\0" + a(I, 4) + a(c, 4) + D + P + X };
153
+ }
154
+ var r = p("../utils"), l = p("../stream/GenericWorker"), g = p("../utf8"), y = p("../crc32"), _ = p("../signature");
155
+ function b(i, d, n, c) {
156
+ l.call(this, "ZipFileWorker"), this.bytesWritten = 0, this.zipComment = d, this.zipPlatform = n, this.encodeFileName = c, this.streamFiles = i, this.accumulate = !1, this.contentBuffer = [], this.dirRecords = [], this.currentSourceOffset = 0, this.entriesCount = 0, this.currentFile = null, this._sources = [];
157
+ }
158
+ r.inherits(b, l), b.prototype.push = function(i) {
159
+ var d = i.meta.percent || 0, n = this.entriesCount, c = this._sources.length;
160
+ this.accumulate ? this.contentBuffer.push(i) : (this.bytesWritten += i.data.length, l.prototype.push.call(this, { data: i.data, meta: { currentFile: this.currentFile, percent: n ? (d + 100 * (n - c - 1)) / n : 100 } }));
161
+ }, b.prototype.openedSource = function(i) {
162
+ this.currentSourceOffset = this.bytesWritten, this.currentFile = i.file.name;
163
+ var d = this.streamFiles && !i.file.dir;
164
+ if (d) {
165
+ var n = o(i, d, !1, this.currentSourceOffset, this.zipPlatform, this.encodeFileName);
166
+ this.push({ data: n.fileRecord, meta: { percent: 0 } });
167
+ } else this.accumulate = !0;
168
+ }, b.prototype.closedSource = function(i) {
169
+ this.accumulate = !1;
170
+ var d = this.streamFiles && !i.file.dir, n = o(i, d, !0, this.currentSourceOffset, this.zipPlatform, this.encodeFileName);
171
+ if (this.dirRecords.push(n.dirRecord), d) this.push({ data: function(c) {
172
+ return _.DATA_DESCRIPTOR + a(c.crc32, 4) + a(c.compressedSize, 4) + a(c.uncompressedSize, 4);
173
+ }(i), meta: { percent: 100 } });
174
+ else for (this.push({ data: n.fileRecord, meta: { percent: 0 } }); this.contentBuffer.length; ) this.push(this.contentBuffer.shift());
175
+ this.currentFile = null;
176
+ }, b.prototype.flush = function() {
177
+ for (var i = this.bytesWritten, d = 0; d < this.dirRecords.length; d++) this.push({ data: this.dirRecords[d], meta: { percent: 100 } });
178
+ var n = this.bytesWritten - i, c = function(s, m, w, x, S) {
179
+ var F = r.transformTo("string", S(x));
180
+ return _.CENTRAL_DIRECTORY_END + "\0\0\0\0" + a(s, 2) + a(s, 2) + a(m, 4) + a(w, 4) + a(F.length, 2) + F;
181
+ }(this.dirRecords.length, n, i, this.zipComment, this.encodeFileName);
182
+ this.push({ data: c, meta: { percent: 100 } });
183
+ }, b.prototype.prepareNextSource = function() {
184
+ this.previous = this._sources.shift(), this.openedSource(this.previous.streamInfo), this.isPaused ? this.previous.pause() : this.previous.resume();
185
+ }, b.prototype.registerPrevious = function(i) {
186
+ this._sources.push(i);
187
+ var d = this;
188
+ return i.on("data", function(n) {
189
+ d.processChunk(n);
190
+ }), i.on("end", function() {
191
+ d.closedSource(d.previous.streamInfo), d._sources.length ? d.prepareNextSource() : d.end();
192
+ }), i.on("error", function(n) {
193
+ d.error(n);
194
+ }), this;
195
+ }, b.prototype.resume = function() {
196
+ return !!l.prototype.resume.call(this) && (!this.previous && this._sources.length ? (this.prepareNextSource(), !0) : this.previous || this._sources.length || this.generatedError ? void 0 : (this.end(), !0));
197
+ }, b.prototype.error = function(i) {
198
+ var d = this._sources;
199
+ if (!l.prototype.error.call(this, i)) return !1;
200
+ for (var n = 0; n < d.length; n++) try {
201
+ d[n].error(i);
202
+ } catch {
203
+ }
204
+ return !0;
205
+ }, b.prototype.lock = function() {
206
+ l.prototype.lock.call(this);
207
+ for (var i = this._sources, d = 0; d < i.length; d++) i[d].lock();
208
+ }, A.exports = b;
209
+ }, { "../crc32": 4, "../signature": 23, "../stream/GenericWorker": 28, "../utf8": 31, "../utils": 32 }], 9: [function(p, A, v) {
210
+ var a = p("../compressions"), o = p("./ZipFileWorker");
211
+ v.generateWorker = function(r, l, g) {
212
+ var y = new o(l.streamFiles, g, l.platform, l.encodeFileName), _ = 0;
213
+ try {
214
+ r.forEach(function(b, i) {
215
+ _++;
216
+ var d = function(m, w) {
217
+ var x = m || w, S = a[x];
218
+ if (!S) throw new Error(x + " is not a valid compression method !");
219
+ return S;
220
+ }(i.options.compression, l.compression), n = i.options.compressionOptions || l.compressionOptions || {}, c = i.dir, s = i.date;
221
+ i._compressWorker(d, n).withStreamInfo("file", { name: b, dir: c, date: s, comment: i.comment || "", unixPermissions: i.unixPermissions, dosPermissions: i.dosPermissions }).pipe(y);
222
+ }), y.entriesCount = _;
223
+ } catch (b) {
224
+ y.error(b);
225
+ }
226
+ return y;
227
+ };
228
+ }, { "../compressions": 3, "./ZipFileWorker": 8 }], 10: [function(p, A, v) {
229
+ function a() {
230
+ if (!(this instanceof a)) return new a();
231
+ if (arguments.length) throw new Error("The constructor with parameters has been removed in JSZip 3.0, please check the upgrade guide.");
232
+ this.files = /* @__PURE__ */ Object.create(null), this.comment = null, this.root = "", this.clone = function() {
233
+ var o = new a();
234
+ for (var r in this) typeof this[r] != "function" && (o[r] = this[r]);
235
+ return o;
236
+ };
237
+ }
238
+ (a.prototype = p("./object")).loadAsync = p("./load"), a.support = p("./support"), a.defaults = p("./defaults"), a.version = "3.10.1", a.loadAsync = function(o, r) {
239
+ return new a().loadAsync(o, r);
240
+ }, a.external = p("./external"), A.exports = a;
241
+ }, { "./defaults": 5, "./external": 6, "./load": 11, "./object": 15, "./support": 30 }], 11: [function(p, A, v) {
242
+ var a = p("./utils"), o = p("./external"), r = p("./utf8"), l = p("./zipEntries"), g = p("./stream/Crc32Probe"), y = p("./nodejsUtils");
243
+ function _(b) {
244
+ return new o.Promise(function(i, d) {
245
+ var n = b.decompressed.getContentWorker().pipe(new g());
246
+ n.on("error", function(c) {
247
+ d(c);
248
+ }).on("end", function() {
249
+ n.streamInfo.crc32 !== b.decompressed.crc32 ? d(new Error("Corrupted zip : CRC32 mismatch")) : i();
250
+ }).resume();
251
+ });
252
+ }
253
+ A.exports = function(b, i) {
254
+ var d = this;
255
+ return i = a.extend(i || {}, { base64: !1, checkCRC32: !1, optimizedBinaryString: !1, createFolders: !1, decodeFileName: r.utf8decode }), y.isNode && y.isStream(b) ? o.Promise.reject(new Error("JSZip can't accept a stream when loading a zip file.")) : a.prepareContent("the loaded zip file", b, !0, i.optimizedBinaryString, i.base64).then(function(n) {
256
+ var c = new l(i);
257
+ return c.load(n), c;
258
+ }).then(function(n) {
259
+ var c = [o.Promise.resolve(n)], s = n.files;
260
+ if (i.checkCRC32) for (var m = 0; m < s.length; m++) c.push(_(s[m]));
261
+ return o.Promise.all(c);
262
+ }).then(function(n) {
263
+ for (var c = n.shift(), s = c.files, m = 0; m < s.length; m++) {
264
+ var w = s[m], x = w.fileNameStr, S = a.resolve(w.fileNameStr);
265
+ d.file(S, w.decompressed, { binary: !0, optimizedBinaryString: !0, date: w.date, dir: w.dir, comment: w.fileCommentStr.length ? w.fileCommentStr : null, unixPermissions: w.unixPermissions, dosPermissions: w.dosPermissions, createFolders: i.createFolders }), w.dir || (d.file(S).unsafeOriginalName = x);
266
+ }
267
+ return c.zipComment.length && (d.comment = c.zipComment), d;
268
+ });
269
+ };
270
+ }, { "./external": 6, "./nodejsUtils": 14, "./stream/Crc32Probe": 25, "./utf8": 31, "./utils": 32, "./zipEntries": 33 }], 12: [function(p, A, v) {
271
+ var a = p("../utils"), o = p("../stream/GenericWorker");
272
+ function r(l, g) {
273
+ o.call(this, "Nodejs stream input adapter for " + l), this._upstreamEnded = !1, this._bindStream(g);
274
+ }
275
+ a.inherits(r, o), r.prototype._bindStream = function(l) {
276
+ var g = this;
277
+ (this._stream = l).pause(), l.on("data", function(y) {
278
+ g.push({ data: y, meta: { percent: 0 } });
279
+ }).on("error", function(y) {
280
+ g.isPaused ? this.generatedError = y : g.error(y);
281
+ }).on("end", function() {
282
+ g.isPaused ? g._upstreamEnded = !0 : g.end();
283
+ });
284
+ }, r.prototype.pause = function() {
285
+ return !!o.prototype.pause.call(this) && (this._stream.pause(), !0);
286
+ }, r.prototype.resume = function() {
287
+ return !!o.prototype.resume.call(this) && (this._upstreamEnded ? this.end() : this._stream.resume(), !0);
288
+ }, A.exports = r;
289
+ }, { "../stream/GenericWorker": 28, "../utils": 32 }], 13: [function(p, A, v) {
290
+ var a = p("readable-stream").Readable;
291
+ function o(r, l, g) {
292
+ a.call(this, l), this._helper = r;
293
+ var y = this;
294
+ r.on("data", function(_, b) {
295
+ y.push(_) || y._helper.pause(), g && g(b);
296
+ }).on("error", function(_) {
297
+ y.emit("error", _);
298
+ }).on("end", function() {
299
+ y.push(null);
300
+ });
301
+ }
302
+ p("../utils").inherits(o, a), o.prototype._read = function() {
303
+ this._helper.resume();
304
+ }, A.exports = o;
305
+ }, { "../utils": 32, "readable-stream": 16 }], 14: [function(p, A, v) {
306
+ A.exports = { isNode: typeof Buffer < "u", newBufferFrom: function(a, o) {
307
+ if (Buffer.from && Buffer.from !== Uint8Array.from) return Buffer.from(a, o);
308
+ if (typeof a == "number") throw new Error('The "data" argument must not be a number');
309
+ return new Buffer(a, o);
310
+ }, allocBuffer: function(a) {
311
+ if (Buffer.alloc) return Buffer.alloc(a);
312
+ var o = new Buffer(a);
313
+ return o.fill(0), o;
314
+ }, isBuffer: function(a) {
315
+ return Buffer.isBuffer(a);
316
+ }, isStream: function(a) {
317
+ return a && typeof a.on == "function" && typeof a.pause == "function" && typeof a.resume == "function";
318
+ } };
319
+ }, {}], 15: [function(p, A, v) {
320
+ function a(S, F, E) {
321
+ var D, C = r.getTypeOf(F), z = r.extend(E || {}, y);
322
+ z.date = z.date || /* @__PURE__ */ new Date(), z.compression !== null && (z.compression = z.compression.toUpperCase()), typeof z.unixPermissions == "string" && (z.unixPermissions = parseInt(z.unixPermissions, 8)), z.unixPermissions && 16384 & z.unixPermissions && (z.dir = !0), z.dosPermissions && 16 & z.dosPermissions && (z.dir = !0), z.dir && (S = s(S)), z.createFolders && (D = c(S)) && m.call(this, D, !0);
323
+ var X = C === "string" && z.binary === !1 && z.base64 === !1;
324
+ E && E.binary !== void 0 || (z.binary = !X), (F instanceof _ && F.uncompressedSize === 0 || z.dir || !F || F.length === 0) && (z.base64 = !1, z.binary = !0, F = "", z.compression = "STORE", C = "string");
325
+ var h = null;
326
+ h = F instanceof _ || F instanceof l ? F : d.isNode && d.isStream(F) ? new n(S, F) : r.prepareContent(S, F, z.binary, z.optimizedBinaryString, z.base64);
327
+ var T = new b(S, h, z);
328
+ this.files[S] = T;
329
+ }
330
+ var o = p("./utf8"), r = p("./utils"), l = p("./stream/GenericWorker"), g = p("./stream/StreamHelper"), y = p("./defaults"), _ = p("./compressedObject"), b = p("./zipObject"), i = p("./generate"), d = p("./nodejsUtils"), n = p("./nodejs/NodejsStreamInputAdapter"), c = function(S) {
331
+ S.slice(-1) === "/" && (S = S.substring(0, S.length - 1));
332
+ var F = S.lastIndexOf("/");
333
+ return 0 < F ? S.substring(0, F) : "";
334
+ }, s = function(S) {
335
+ return S.slice(-1) !== "/" && (S += "/"), S;
336
+ }, m = function(S, F) {
337
+ return F = F !== void 0 ? F : y.createFolders, S = s(S), this.files[S] || a.call(this, S, null, { dir: !0, createFolders: F }), this.files[S];
338
+ };
339
+ function w(S) {
340
+ return Object.prototype.toString.call(S) === "[object RegExp]";
341
+ }
342
+ var x = { load: function() {
343
+ throw new Error("This method has been removed in JSZip 3.0, please check the upgrade guide.");
344
+ }, forEach: function(S) {
345
+ var F, E, D;
346
+ for (F in this.files) D = this.files[F], (E = F.slice(this.root.length, F.length)) && F.slice(0, this.root.length) === this.root && S(E, D);
347
+ }, filter: function(S) {
348
+ var F = [];
349
+ return this.forEach(function(E, D) {
350
+ S(E, D) && F.push(D);
351
+ }), F;
352
+ }, file: function(S, F, E) {
353
+ if (arguments.length !== 1) return S = this.root + S, a.call(this, S, F, E), this;
354
+ if (w(S)) {
355
+ var D = S;
356
+ return this.filter(function(z, X) {
357
+ return !X.dir && D.test(z);
358
+ });
359
+ }
360
+ var C = this.files[this.root + S];
361
+ return C && !C.dir ? C : null;
362
+ }, folder: function(S) {
363
+ if (!S) return this;
364
+ if (w(S)) return this.filter(function(C, z) {
365
+ return z.dir && S.test(C);
366
+ });
367
+ var F = this.root + S, E = m.call(this, F), D = this.clone();
368
+ return D.root = E.name, D;
369
+ }, remove: function(S) {
370
+ S = this.root + S;
371
+ var F = this.files[S];
372
+ if (F || (S.slice(-1) !== "/" && (S += "/"), F = this.files[S]), F && !F.dir) delete this.files[S];
373
+ else for (var E = this.filter(function(C, z) {
374
+ return z.name.slice(0, S.length) === S;
375
+ }), D = 0; D < E.length; D++) delete this.files[E[D].name];
376
+ return this;
377
+ }, generate: function() {
378
+ throw new Error("This method has been removed in JSZip 3.0, please check the upgrade guide.");
379
+ }, generateInternalStream: function(S) {
380
+ var F, E = {};
381
+ try {
382
+ if ((E = r.extend(S || {}, { streamFiles: !1, compression: "STORE", compressionOptions: null, type: "", platform: "DOS", comment: null, mimeType: "application/zip", encodeFileName: o.utf8encode })).type = E.type.toLowerCase(), E.compression = E.compression.toUpperCase(), E.type === "binarystring" && (E.type = "string"), !E.type) throw new Error("No output type specified.");
383
+ r.checkSupport(E.type), E.platform !== "darwin" && E.platform !== "freebsd" && E.platform !== "linux" && E.platform !== "sunos" || (E.platform = "UNIX"), E.platform === "win32" && (E.platform = "DOS");
384
+ var D = E.comment || this.comment || "";
385
+ F = i.generateWorker(this, E, D);
386
+ } catch (C) {
387
+ (F = new l("error")).error(C);
388
+ }
389
+ return new g(F, E.type || "string", E.mimeType);
390
+ }, generateAsync: function(S, F) {
391
+ return this.generateInternalStream(S).accumulate(F);
392
+ }, generateNodeStream: function(S, F) {
393
+ return (S = S || {}).type || (S.type = "nodebuffer"), this.generateInternalStream(S).toNodejsStream(F);
394
+ } };
395
+ A.exports = x;
396
+ }, { "./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(p, A, v) {
397
+ A.exports = p("stream");
398
+ }, { stream: void 0 }], 17: [function(p, A, v) {
399
+ var a = p("./DataReader");
400
+ function o(r) {
401
+ a.call(this, r);
402
+ for (var l = 0; l < this.data.length; l++) r[l] = 255 & r[l];
403
+ }
404
+ p("../utils").inherits(o, a), o.prototype.byteAt = function(r) {
405
+ return this.data[this.zero + r];
406
+ }, o.prototype.lastIndexOfSignature = function(r) {
407
+ for (var l = r.charCodeAt(0), g = r.charCodeAt(1), y = r.charCodeAt(2), _ = r.charCodeAt(3), b = this.length - 4; 0 <= b; --b) if (this.data[b] === l && this.data[b + 1] === g && this.data[b + 2] === y && this.data[b + 3] === _) return b - this.zero;
408
+ return -1;
409
+ }, o.prototype.readAndCheckSignature = function(r) {
410
+ var l = r.charCodeAt(0), g = r.charCodeAt(1), y = r.charCodeAt(2), _ = r.charCodeAt(3), b = this.readData(4);
411
+ return l === b[0] && g === b[1] && y === b[2] && _ === b[3];
412
+ }, o.prototype.readData = function(r) {
413
+ if (this.checkOffset(r), r === 0) return [];
414
+ var l = this.data.slice(this.zero + this.index, this.zero + this.index + r);
415
+ return this.index += r, l;
416
+ }, A.exports = o;
417
+ }, { "../utils": 32, "./DataReader": 18 }], 18: [function(p, A, v) {
418
+ var a = p("../utils");
419
+ function o(r) {
420
+ this.data = r, this.length = r.length, this.index = 0, this.zero = 0;
421
+ }
422
+ o.prototype = { checkOffset: function(r) {
423
+ this.checkIndex(this.index + r);
424
+ }, checkIndex: function(r) {
425
+ if (this.length < this.zero + r || r < 0) throw new Error("End of data reached (data length = " + this.length + ", asked index = " + r + "). Corrupted zip ?");
426
+ }, setIndex: function(r) {
427
+ this.checkIndex(r), this.index = r;
428
+ }, skip: function(r) {
429
+ this.setIndex(this.index + r);
430
+ }, byteAt: function() {
431
+ }, readInt: function(r) {
432
+ var l, g = 0;
433
+ for (this.checkOffset(r), l = this.index + r - 1; l >= this.index; l--) g = (g << 8) + this.byteAt(l);
434
+ return this.index += r, g;
435
+ }, readString: function(r) {
436
+ return a.transformTo("string", this.readData(r));
437
+ }, readData: function() {
438
+ }, lastIndexOfSignature: function() {
439
+ }, readAndCheckSignature: function() {
440
+ }, readDate: function() {
441
+ var r = this.readInt(4);
442
+ return new Date(Date.UTC(1980 + (r >> 25 & 127), (r >> 21 & 15) - 1, r >> 16 & 31, r >> 11 & 31, r >> 5 & 63, (31 & r) << 1));
443
+ } }, A.exports = o;
444
+ }, { "../utils": 32 }], 19: [function(p, A, v) {
445
+ var a = p("./Uint8ArrayReader");
446
+ function o(r) {
447
+ a.call(this, r);
448
+ }
449
+ p("../utils").inherits(o, a), o.prototype.readData = function(r) {
450
+ this.checkOffset(r);
451
+ var l = this.data.slice(this.zero + this.index, this.zero + this.index + r);
452
+ return this.index += r, l;
453
+ }, A.exports = o;
454
+ }, { "../utils": 32, "./Uint8ArrayReader": 21 }], 20: [function(p, A, v) {
455
+ var a = p("./DataReader");
456
+ function o(r) {
457
+ a.call(this, r);
458
+ }
459
+ p("../utils").inherits(o, a), o.prototype.byteAt = function(r) {
460
+ return this.data.charCodeAt(this.zero + r);
461
+ }, o.prototype.lastIndexOfSignature = function(r) {
462
+ return this.data.lastIndexOf(r) - this.zero;
463
+ }, o.prototype.readAndCheckSignature = function(r) {
464
+ return r === this.readData(4);
465
+ }, o.prototype.readData = function(r) {
466
+ this.checkOffset(r);
467
+ var l = this.data.slice(this.zero + this.index, this.zero + this.index + r);
468
+ return this.index += r, l;
469
+ }, A.exports = o;
470
+ }, { "../utils": 32, "./DataReader": 18 }], 21: [function(p, A, v) {
471
+ var a = p("./ArrayReader");
472
+ function o(r) {
473
+ a.call(this, r);
474
+ }
475
+ p("../utils").inherits(o, a), o.prototype.readData = function(r) {
476
+ if (this.checkOffset(r), r === 0) return new Uint8Array(0);
477
+ var l = this.data.subarray(this.zero + this.index, this.zero + this.index + r);
478
+ return this.index += r, l;
479
+ }, A.exports = o;
480
+ }, { "../utils": 32, "./ArrayReader": 17 }], 22: [function(p, A, v) {
481
+ var a = p("../utils"), o = p("../support"), r = p("./ArrayReader"), l = p("./StringReader"), g = p("./NodeBufferReader"), y = p("./Uint8ArrayReader");
482
+ A.exports = function(_) {
483
+ var b = a.getTypeOf(_);
484
+ return a.checkSupport(b), b !== "string" || o.uint8array ? b === "nodebuffer" ? new g(_) : o.uint8array ? new y(a.transformTo("uint8array", _)) : new r(a.transformTo("array", _)) : new l(_);
485
+ };
486
+ }, { "../support": 30, "../utils": 32, "./ArrayReader": 17, "./NodeBufferReader": 19, "./StringReader": 20, "./Uint8ArrayReader": 21 }], 23: [function(p, A, v) {
487
+ v.LOCAL_FILE_HEADER = "PK", v.CENTRAL_FILE_HEADER = "PK", v.CENTRAL_DIRECTORY_END = "PK", v.ZIP64_CENTRAL_DIRECTORY_LOCATOR = "PK\x07", v.ZIP64_CENTRAL_DIRECTORY_END = "PK", v.DATA_DESCRIPTOR = "PK\x07\b";
488
+ }, {}], 24: [function(p, A, v) {
489
+ var a = p("./GenericWorker"), o = p("../utils");
490
+ function r(l) {
491
+ a.call(this, "ConvertWorker to " + l), this.destType = l;
492
+ }
493
+ o.inherits(r, a), r.prototype.processChunk = function(l) {
494
+ this.push({ data: o.transformTo(this.destType, l.data), meta: l.meta });
495
+ }, A.exports = r;
496
+ }, { "../utils": 32, "./GenericWorker": 28 }], 25: [function(p, A, v) {
497
+ var a = p("./GenericWorker"), o = p("../crc32");
498
+ function r() {
499
+ a.call(this, "Crc32Probe"), this.withStreamInfo("crc32", 0);
500
+ }
501
+ p("../utils").inherits(r, a), r.prototype.processChunk = function(l) {
502
+ this.streamInfo.crc32 = o(l.data, this.streamInfo.crc32 || 0), this.push(l);
503
+ }, A.exports = r;
504
+ }, { "../crc32": 4, "../utils": 32, "./GenericWorker": 28 }], 26: [function(p, A, v) {
505
+ var a = p("../utils"), o = p("./GenericWorker");
506
+ function r(l) {
507
+ o.call(this, "DataLengthProbe for " + l), this.propName = l, this.withStreamInfo(l, 0);
508
+ }
509
+ a.inherits(r, o), r.prototype.processChunk = function(l) {
510
+ if (l) {
511
+ var g = this.streamInfo[this.propName] || 0;
512
+ this.streamInfo[this.propName] = g + l.data.length;
513
+ }
514
+ o.prototype.processChunk.call(this, l);
515
+ }, A.exports = r;
516
+ }, { "../utils": 32, "./GenericWorker": 28 }], 27: [function(p, A, v) {
517
+ var a = p("../utils"), o = p("./GenericWorker");
518
+ function r(l) {
519
+ o.call(this, "DataWorker");
520
+ var g = this;
521
+ this.dataIsReady = !1, this.index = 0, this.max = 0, this.data = null, this.type = "", this._tickScheduled = !1, l.then(function(y) {
522
+ g.dataIsReady = !0, g.data = y, g.max = y && y.length || 0, g.type = a.getTypeOf(y), g.isPaused || g._tickAndRepeat();
523
+ }, function(y) {
524
+ g.error(y);
525
+ });
526
+ }
527
+ a.inherits(r, o), r.prototype.cleanUp = function() {
528
+ o.prototype.cleanUp.call(this), this.data = null;
529
+ }, r.prototype.resume = function() {
530
+ return !!o.prototype.resume.call(this) && (!this._tickScheduled && this.dataIsReady && (this._tickScheduled = !0, a.delay(this._tickAndRepeat, [], this)), !0);
531
+ }, r.prototype._tickAndRepeat = function() {
532
+ this._tickScheduled = !1, this.isPaused || this.isFinished || (this._tick(), this.isFinished || (a.delay(this._tickAndRepeat, [], this), this._tickScheduled = !0));
533
+ }, r.prototype._tick = function() {
534
+ if (this.isPaused || this.isFinished) return !1;
535
+ var l = null, g = Math.min(this.max, this.index + 16384);
536
+ if (this.index >= this.max) return this.end();
537
+ switch (this.type) {
538
+ case "string":
539
+ l = this.data.substring(this.index, g);
540
+ break;
541
+ case "uint8array":
542
+ l = this.data.subarray(this.index, g);
543
+ break;
544
+ case "array":
545
+ case "nodebuffer":
546
+ l = this.data.slice(this.index, g);
547
+ }
548
+ return this.index = g, this.push({ data: l, meta: { percent: this.max ? this.index / this.max * 100 : 0 } });
549
+ }, A.exports = r;
550
+ }, { "../utils": 32, "./GenericWorker": 28 }], 28: [function(p, A, v) {
551
+ function a(o) {
552
+ this.name = o || "default", this.streamInfo = {}, this.generatedError = null, this.extraStreamInfo = {}, this.isPaused = !0, this.isFinished = !1, this.isLocked = !1, this._listeners = { data: [], end: [], error: [] }, this.previous = null;
553
+ }
554
+ a.prototype = { push: function(o) {
555
+ this.emit("data", o);
556
+ }, end: function() {
557
+ if (this.isFinished) return !1;
558
+ this.flush();
559
+ try {
560
+ this.emit("end"), this.cleanUp(), this.isFinished = !0;
561
+ } catch (o) {
562
+ this.emit("error", o);
563
+ }
564
+ return !0;
565
+ }, error: function(o) {
566
+ return !this.isFinished && (this.isPaused ? this.generatedError = o : (this.isFinished = !0, this.emit("error", o), this.previous && this.previous.error(o), this.cleanUp()), !0);
567
+ }, on: function(o, r) {
568
+ return this._listeners[o].push(r), this;
569
+ }, cleanUp: function() {
570
+ this.streamInfo = this.generatedError = this.extraStreamInfo = null, this._listeners = [];
571
+ }, emit: function(o, r) {
572
+ if (this._listeners[o]) for (var l = 0; l < this._listeners[o].length; l++) this._listeners[o][l].call(this, r);
573
+ }, pipe: function(o) {
574
+ return o.registerPrevious(this);
575
+ }, registerPrevious: function(o) {
576
+ if (this.isLocked) throw new Error("The stream '" + this + "' has already been used.");
577
+ this.streamInfo = o.streamInfo, this.mergeStreamInfo(), this.previous = o;
578
+ var r = this;
579
+ return o.on("data", function(l) {
580
+ r.processChunk(l);
581
+ }), o.on("end", function() {
582
+ r.end();
583
+ }), o.on("error", function(l) {
584
+ r.error(l);
585
+ }), this;
586
+ }, pause: function() {
587
+ return !this.isPaused && !this.isFinished && (this.isPaused = !0, this.previous && this.previous.pause(), !0);
588
+ }, resume: function() {
589
+ if (!this.isPaused || this.isFinished) return !1;
590
+ var o = this.isPaused = !1;
591
+ return this.generatedError && (this.error(this.generatedError), o = !0), this.previous && this.previous.resume(), !o;
592
+ }, flush: function() {
593
+ }, processChunk: function(o) {
594
+ this.push(o);
595
+ }, withStreamInfo: function(o, r) {
596
+ return this.extraStreamInfo[o] = r, this.mergeStreamInfo(), this;
597
+ }, mergeStreamInfo: function() {
598
+ for (var o in this.extraStreamInfo) Object.prototype.hasOwnProperty.call(this.extraStreamInfo, o) && (this.streamInfo[o] = this.extraStreamInfo[o]);
599
+ }, lock: function() {
600
+ if (this.isLocked) throw new Error("The stream '" + this + "' has already been used.");
601
+ this.isLocked = !0, this.previous && this.previous.lock();
602
+ }, toString: function() {
603
+ var o = "Worker " + this.name;
604
+ return this.previous ? this.previous + " -> " + o : o;
605
+ } }, A.exports = a;
606
+ }, {}], 29: [function(p, A, v) {
607
+ var a = p("../utils"), o = p("./ConvertWorker"), r = p("./GenericWorker"), l = p("../base64"), g = p("../support"), y = p("../external"), _ = null;
608
+ if (g.nodestream) try {
609
+ _ = p("../nodejs/NodejsStreamOutputAdapter");
610
+ } catch {
611
+ }
612
+ function b(d, n) {
613
+ return new y.Promise(function(c, s) {
614
+ var m = [], w = d._internalType, x = d._outputType, S = d._mimeType;
615
+ d.on("data", function(F, E) {
616
+ m.push(F), n && n(E);
617
+ }).on("error", function(F) {
618
+ m = [], s(F);
619
+ }).on("end", function() {
620
+ try {
621
+ var F = function(E, D, C) {
622
+ switch (E) {
623
+ case "blob":
624
+ return a.newBlob(a.transformTo("arraybuffer", D), C);
625
+ case "base64":
626
+ return l.encode(D);
627
+ default:
628
+ return a.transformTo(E, D);
629
+ }
630
+ }(x, function(E, D) {
631
+ var C, z = 0, X = null, h = 0;
632
+ for (C = 0; C < D.length; C++) h += D[C].length;
633
+ switch (E) {
634
+ case "string":
635
+ return D.join("");
636
+ case "array":
637
+ return Array.prototype.concat.apply([], D);
638
+ case "uint8array":
639
+ for (X = new Uint8Array(h), C = 0; C < D.length; C++) X.set(D[C], z), z += D[C].length;
640
+ return X;
641
+ case "nodebuffer":
642
+ return Buffer.concat(D);
643
+ default:
644
+ throw new Error("concat : unsupported type '" + E + "'");
645
+ }
646
+ }(w, m), S);
647
+ c(F);
648
+ } catch (E) {
649
+ s(E);
650
+ }
651
+ m = [];
652
+ }).resume();
653
+ });
654
+ }
655
+ function i(d, n, c) {
656
+ var s = n;
657
+ switch (n) {
658
+ case "blob":
659
+ case "arraybuffer":
660
+ s = "uint8array";
661
+ break;
662
+ case "base64":
663
+ s = "string";
664
+ }
665
+ try {
666
+ this._internalType = s, this._outputType = n, this._mimeType = c, a.checkSupport(s), this._worker = d.pipe(new o(s)), d.lock();
667
+ } catch (m) {
668
+ this._worker = new r("error"), this._worker.error(m);
669
+ }
670
+ }
671
+ i.prototype = { accumulate: function(d) {
672
+ return b(this, d);
673
+ }, on: function(d, n) {
674
+ var c = this;
675
+ return d === "data" ? this._worker.on(d, function(s) {
676
+ n.call(c, s.data, s.meta);
677
+ }) : this._worker.on(d, function() {
678
+ a.delay(n, arguments, c);
679
+ }), this;
680
+ }, resume: function() {
681
+ return a.delay(this._worker.resume, [], this._worker), this;
682
+ }, pause: function() {
683
+ return this._worker.pause(), this;
684
+ }, toNodejsStream: function(d) {
685
+ if (a.checkSupport("nodestream"), this._outputType !== "nodebuffer") throw new Error(this._outputType + " is not supported by this method");
686
+ return new _(this, { objectMode: this._outputType !== "nodebuffer" }, d);
687
+ } }, A.exports = i;
688
+ }, { "../base64": 1, "../external": 6, "../nodejs/NodejsStreamOutputAdapter": 13, "../support": 30, "../utils": 32, "./ConvertWorker": 24, "./GenericWorker": 28 }], 30: [function(p, A, v) {
689
+ if (v.base64 = !0, v.array = !0, v.string = !0, v.arraybuffer = typeof ArrayBuffer < "u" && typeof Uint8Array < "u", v.nodebuffer = typeof Buffer < "u", v.uint8array = typeof Uint8Array < "u", typeof ArrayBuffer > "u") v.blob = !1;
690
+ else {
691
+ var a = new ArrayBuffer(0);
692
+ try {
693
+ v.blob = new Blob([a], { type: "application/zip" }).size === 0;
694
+ } catch {
695
+ try {
696
+ var o = new (self.BlobBuilder || self.WebKitBlobBuilder || self.MozBlobBuilder || self.MSBlobBuilder)();
697
+ o.append(a), v.blob = o.getBlob("application/zip").size === 0;
698
+ } catch {
699
+ v.blob = !1;
700
+ }
701
+ }
702
+ }
703
+ try {
704
+ v.nodestream = !!p("readable-stream").Readable;
705
+ } catch {
706
+ v.nodestream = !1;
707
+ }
708
+ }, { "readable-stream": 16 }], 31: [function(p, A, v) {
709
+ for (var a = p("./utils"), o = p("./support"), r = p("./nodejsUtils"), l = p("./stream/GenericWorker"), g = new Array(256), y = 0; y < 256; y++) g[y] = 252 <= y ? 6 : 248 <= y ? 5 : 240 <= y ? 4 : 224 <= y ? 3 : 192 <= y ? 2 : 1;
710
+ g[254] = g[254] = 1;
711
+ function _() {
712
+ l.call(this, "utf-8 decode"), this.leftOver = null;
713
+ }
714
+ function b() {
715
+ l.call(this, "utf-8 encode");
716
+ }
717
+ v.utf8encode = function(i) {
718
+ return o.nodebuffer ? r.newBufferFrom(i, "utf-8") : function(d) {
719
+ var n, c, s, m, w, x = d.length, S = 0;
720
+ for (m = 0; m < x; m++) (64512 & (c = d.charCodeAt(m))) == 55296 && m + 1 < x && (64512 & (s = d.charCodeAt(m + 1))) == 56320 && (c = 65536 + (c - 55296 << 10) + (s - 56320), m++), S += c < 128 ? 1 : c < 2048 ? 2 : c < 65536 ? 3 : 4;
721
+ for (n = o.uint8array ? new Uint8Array(S) : new Array(S), m = w = 0; w < S; m++) (64512 & (c = d.charCodeAt(m))) == 55296 && m + 1 < x && (64512 & (s = d.charCodeAt(m + 1))) == 56320 && (c = 65536 + (c - 55296 << 10) + (s - 56320), m++), c < 128 ? n[w++] = c : (c < 2048 ? n[w++] = 192 | c >>> 6 : (c < 65536 ? n[w++] = 224 | c >>> 12 : (n[w++] = 240 | c >>> 18, n[w++] = 128 | c >>> 12 & 63), n[w++] = 128 | c >>> 6 & 63), n[w++] = 128 | 63 & c);
722
+ return n;
723
+ }(i);
724
+ }, v.utf8decode = function(i) {
725
+ return o.nodebuffer ? a.transformTo("nodebuffer", i).toString("utf-8") : function(d) {
726
+ var n, c, s, m, w = d.length, x = new Array(2 * w);
727
+ for (n = c = 0; n < w; ) if ((s = d[n++]) < 128) x[c++] = s;
728
+ else if (4 < (m = g[s])) x[c++] = 65533, n += m - 1;
729
+ else {
730
+ for (s &= m === 2 ? 31 : m === 3 ? 15 : 7; 1 < m && n < w; ) s = s << 6 | 63 & d[n++], m--;
731
+ 1 < m ? x[c++] = 65533 : s < 65536 ? x[c++] = s : (s -= 65536, x[c++] = 55296 | s >> 10 & 1023, x[c++] = 56320 | 1023 & s);
732
+ }
733
+ return x.length !== c && (x.subarray ? x = x.subarray(0, c) : x.length = c), a.applyFromCharCode(x);
734
+ }(i = a.transformTo(o.uint8array ? "uint8array" : "array", i));
735
+ }, a.inherits(_, l), _.prototype.processChunk = function(i) {
736
+ var d = a.transformTo(o.uint8array ? "uint8array" : "array", i.data);
737
+ if (this.leftOver && this.leftOver.length) {
738
+ if (o.uint8array) {
739
+ var n = d;
740
+ (d = new Uint8Array(n.length + this.leftOver.length)).set(this.leftOver, 0), d.set(n, this.leftOver.length);
741
+ } else d = this.leftOver.concat(d);
742
+ this.leftOver = null;
743
+ }
744
+ var c = function(m, w) {
745
+ var x;
746
+ for ((w = w || m.length) > m.length && (w = m.length), x = w - 1; 0 <= x && (192 & m[x]) == 128; ) x--;
747
+ return x < 0 || x === 0 ? w : x + g[m[x]] > w ? x : w;
748
+ }(d), s = d;
749
+ c !== d.length && (o.uint8array ? (s = d.subarray(0, c), this.leftOver = d.subarray(c, d.length)) : (s = d.slice(0, c), this.leftOver = d.slice(c, d.length))), this.push({ data: v.utf8decode(s), meta: i.meta });
750
+ }, _.prototype.flush = function() {
751
+ this.leftOver && this.leftOver.length && (this.push({ data: v.utf8decode(this.leftOver), meta: {} }), this.leftOver = null);
752
+ }, v.Utf8DecodeWorker = _, a.inherits(b, l), b.prototype.processChunk = function(i) {
753
+ this.push({ data: v.utf8encode(i.data), meta: i.meta });
754
+ }, v.Utf8EncodeWorker = b;
755
+ }, { "./nodejsUtils": 14, "./stream/GenericWorker": 28, "./support": 30, "./utils": 32 }], 32: [function(p, A, v) {
756
+ var a = p("./support"), o = p("./base64"), r = p("./nodejsUtils"), l = p("./external");
757
+ function g(n) {
758
+ return n;
759
+ }
760
+ function y(n, c) {
761
+ for (var s = 0; s < n.length; ++s) c[s] = 255 & n.charCodeAt(s);
762
+ return c;
763
+ }
764
+ p("setimmediate"), v.newBlob = function(n, c) {
765
+ v.checkSupport("blob");
766
+ try {
767
+ return new Blob([n], { type: c });
768
+ } catch {
769
+ try {
770
+ var s = new (self.BlobBuilder || self.WebKitBlobBuilder || self.MozBlobBuilder || self.MSBlobBuilder)();
771
+ return s.append(n), s.getBlob(c);
772
+ } catch {
773
+ throw new Error("Bug : can't construct the Blob.");
774
+ }
775
+ }
776
+ };
777
+ var _ = { stringifyByChunk: function(n, c, s) {
778
+ var m = [], w = 0, x = n.length;
779
+ if (x <= s) return String.fromCharCode.apply(null, n);
780
+ for (; w < x; ) c === "array" || c === "nodebuffer" ? m.push(String.fromCharCode.apply(null, n.slice(w, Math.min(w + s, x)))) : m.push(String.fromCharCode.apply(null, n.subarray(w, Math.min(w + s, x)))), w += s;
781
+ return m.join("");
782
+ }, stringifyByChar: function(n) {
783
+ for (var c = "", s = 0; s < n.length; s++) c += String.fromCharCode(n[s]);
784
+ return c;
785
+ }, applyCanBeUsed: { uint8array: function() {
786
+ try {
787
+ return a.uint8array && String.fromCharCode.apply(null, new Uint8Array(1)).length === 1;
788
+ } catch {
789
+ return !1;
790
+ }
791
+ }(), nodebuffer: function() {
792
+ try {
793
+ return a.nodebuffer && String.fromCharCode.apply(null, r.allocBuffer(1)).length === 1;
794
+ } catch {
795
+ return !1;
796
+ }
797
+ }() } };
798
+ function b(n) {
799
+ var c = 65536, s = v.getTypeOf(n), m = !0;
800
+ if (s === "uint8array" ? m = _.applyCanBeUsed.uint8array : s === "nodebuffer" && (m = _.applyCanBeUsed.nodebuffer), m) for (; 1 < c; ) try {
801
+ return _.stringifyByChunk(n, s, c);
802
+ } catch {
803
+ c = Math.floor(c / 2);
804
+ }
805
+ return _.stringifyByChar(n);
806
+ }
807
+ function i(n, c) {
808
+ for (var s = 0; s < n.length; s++) c[s] = n[s];
809
+ return c;
810
+ }
811
+ v.applyFromCharCode = b;
812
+ var d = {};
813
+ d.string = { string: g, array: function(n) {
814
+ return y(n, new Array(n.length));
815
+ }, arraybuffer: function(n) {
816
+ return d.string.uint8array(n).buffer;
817
+ }, uint8array: function(n) {
818
+ return y(n, new Uint8Array(n.length));
819
+ }, nodebuffer: function(n) {
820
+ return y(n, r.allocBuffer(n.length));
821
+ } }, d.array = { string: b, array: g, arraybuffer: function(n) {
822
+ return new Uint8Array(n).buffer;
823
+ }, uint8array: function(n) {
824
+ return new Uint8Array(n);
825
+ }, nodebuffer: function(n) {
826
+ return r.newBufferFrom(n);
827
+ } }, d.arraybuffer = { string: function(n) {
828
+ return b(new Uint8Array(n));
829
+ }, array: function(n) {
830
+ return i(new Uint8Array(n), new Array(n.byteLength));
831
+ }, arraybuffer: g, uint8array: function(n) {
832
+ return new Uint8Array(n);
833
+ }, nodebuffer: function(n) {
834
+ return r.newBufferFrom(new Uint8Array(n));
835
+ } }, d.uint8array = { string: b, array: function(n) {
836
+ return i(n, new Array(n.length));
837
+ }, arraybuffer: function(n) {
838
+ return n.buffer;
839
+ }, uint8array: g, nodebuffer: function(n) {
840
+ return r.newBufferFrom(n);
841
+ } }, d.nodebuffer = { string: b, array: function(n) {
842
+ return i(n, new Array(n.length));
843
+ }, arraybuffer: function(n) {
844
+ return d.nodebuffer.uint8array(n).buffer;
845
+ }, uint8array: function(n) {
846
+ return i(n, new Uint8Array(n.length));
847
+ }, nodebuffer: g }, v.transformTo = function(n, c) {
848
+ if (c = c || "", !n) return c;
849
+ v.checkSupport(n);
850
+ var s = v.getTypeOf(c);
851
+ return d[s][n](c);
852
+ }, v.resolve = function(n) {
853
+ for (var c = n.split("/"), s = [], m = 0; m < c.length; m++) {
854
+ var w = c[m];
855
+ w === "." || w === "" && m !== 0 && m !== c.length - 1 || (w === ".." ? s.pop() : s.push(w));
856
+ }
857
+ return s.join("/");
858
+ }, v.getTypeOf = function(n) {
859
+ return typeof n == "string" ? "string" : Object.prototype.toString.call(n) === "[object Array]" ? "array" : a.nodebuffer && r.isBuffer(n) ? "nodebuffer" : a.uint8array && n instanceof Uint8Array ? "uint8array" : a.arraybuffer && n instanceof ArrayBuffer ? "arraybuffer" : void 0;
860
+ }, v.checkSupport = function(n) {
861
+ if (!a[n.toLowerCase()]) throw new Error(n + " is not supported by this platform");
862
+ }, v.MAX_VALUE_16BITS = 65535, v.MAX_VALUE_32BITS = -1, v.pretty = function(n) {
863
+ var c, s, m = "";
864
+ for (s = 0; s < (n || "").length; s++) m += "\\x" + ((c = n.charCodeAt(s)) < 16 ? "0" : "") + c.toString(16).toUpperCase();
865
+ return m;
866
+ }, v.delay = function(n, c, s) {
867
+ setImmediate(function() {
868
+ n.apply(s || null, c || []);
869
+ });
870
+ }, v.inherits = function(n, c) {
871
+ function s() {
872
+ }
873
+ s.prototype = c.prototype, n.prototype = new s();
874
+ }, v.extend = function() {
875
+ var n, c, s = {};
876
+ for (n = 0; n < arguments.length; n++) for (c in arguments[n]) Object.prototype.hasOwnProperty.call(arguments[n], c) && s[c] === void 0 && (s[c] = arguments[n][c]);
877
+ return s;
878
+ }, v.prepareContent = function(n, c, s, m, w) {
879
+ return l.Promise.resolve(c).then(function(x) {
880
+ return a.blob && (x instanceof Blob || ["[object File]", "[object Blob]"].indexOf(Object.prototype.toString.call(x)) !== -1) && typeof FileReader < "u" ? new l.Promise(function(S, F) {
881
+ var E = new FileReader();
882
+ E.onload = function(D) {
883
+ S(D.target.result);
884
+ }, E.onerror = function(D) {
885
+ F(D.target.error);
886
+ }, E.readAsArrayBuffer(x);
887
+ }) : x;
888
+ }).then(function(x) {
889
+ var S = v.getTypeOf(x);
890
+ return S ? (S === "arraybuffer" ? x = v.transformTo("uint8array", x) : S === "string" && (w ? x = o.decode(x) : s && m !== !0 && (x = function(F) {
891
+ return y(F, a.uint8array ? new Uint8Array(F.length) : new Array(F.length));
892
+ }(x))), x) : l.Promise.reject(new Error("Can't read the data of '" + n + "'. Is it in a supported JavaScript type (String, Blob, ArrayBuffer, etc) ?"));
893
+ });
894
+ };
895
+ }, { "./base64": 1, "./external": 6, "./nodejsUtils": 14, "./support": 30, setimmediate: 54 }], 33: [function(p, A, v) {
896
+ var a = p("./reader/readerFor"), o = p("./utils"), r = p("./signature"), l = p("./zipEntry"), g = p("./support");
897
+ function y(_) {
898
+ this.files = [], this.loadOptions = _;
899
+ }
900
+ y.prototype = { checkSignature: function(_) {
901
+ if (!this.reader.readAndCheckSignature(_)) {
902
+ this.reader.index -= 4;
903
+ var b = this.reader.readString(4);
904
+ throw new Error("Corrupted zip or bug: unexpected signature (" + o.pretty(b) + ", expected " + o.pretty(_) + ")");
905
+ }
906
+ }, isSignature: function(_, b) {
907
+ var i = this.reader.index;
908
+ this.reader.setIndex(_);
909
+ var d = this.reader.readString(4) === b;
910
+ return this.reader.setIndex(i), d;
911
+ }, readBlockEndOfCentral: function() {
912
+ 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);
913
+ var _ = this.reader.readData(this.zipCommentLength), b = g.uint8array ? "uint8array" : "array", i = o.transformTo(b, _);
914
+ this.zipComment = this.loadOptions.decodeFileName(i);
915
+ }, readBlockZip64EndOfCentral: function() {
916
+ 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 = {};
917
+ for (var _, b, i, d = this.zip64EndOfCentralSize - 44; 0 < d; ) _ = this.reader.readInt(2), b = this.reader.readInt(4), i = this.reader.readData(b), this.zip64ExtensibleData[_] = { id: _, length: b, value: i };
918
+ }, readBlockZip64EndOfCentralLocator: function() {
919
+ 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");
920
+ }, readLocalFiles: function() {
921
+ var _, b;
922
+ for (_ = 0; _ < this.files.length; _++) b = this.files[_], this.reader.setIndex(b.localHeaderOffset), this.checkSignature(r.LOCAL_FILE_HEADER), b.readLocalPart(this.reader), b.handleUTF8(), b.processAttributes();
923
+ }, readCentralDir: function() {
924
+ var _;
925
+ for (this.reader.setIndex(this.centralDirOffset); this.reader.readAndCheckSignature(r.CENTRAL_FILE_HEADER); ) (_ = new l({ zip64: this.zip64 }, this.loadOptions)).readCentralPart(this.reader), this.files.push(_);
926
+ if (this.centralDirRecords !== this.files.length && this.centralDirRecords !== 0 && this.files.length === 0) throw new Error("Corrupted zip or bug: expected " + this.centralDirRecords + " records in central dir, got " + this.files.length);
927
+ }, readEndOfCentral: function() {
928
+ var _ = this.reader.lastIndexOfSignature(r.CENTRAL_DIRECTORY_END);
929
+ if (_ < 0) throw this.isSignature(0, r.LOCAL_FILE_HEADER) ? new Error("Corrupted zip: can't find end of central directory") : 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");
930
+ this.reader.setIndex(_);
931
+ var b = _;
932
+ if (this.checkSignature(r.CENTRAL_DIRECTORY_END), this.readBlockEndOfCentral(), this.diskNumber === o.MAX_VALUE_16BITS || this.diskWithCentralDirStart === o.MAX_VALUE_16BITS || this.centralDirRecordsOnThisDisk === o.MAX_VALUE_16BITS || this.centralDirRecords === o.MAX_VALUE_16BITS || this.centralDirSize === o.MAX_VALUE_32BITS || this.centralDirOffset === o.MAX_VALUE_32BITS) {
933
+ if (this.zip64 = !0, (_ = this.reader.lastIndexOfSignature(r.ZIP64_CENTRAL_DIRECTORY_LOCATOR)) < 0) throw new Error("Corrupted zip: can't find the ZIP64 end of central directory locator");
934
+ if (this.reader.setIndex(_), this.checkSignature(r.ZIP64_CENTRAL_DIRECTORY_LOCATOR), this.readBlockZip64EndOfCentralLocator(), !this.isSignature(this.relativeOffsetEndOfZip64CentralDir, r.ZIP64_CENTRAL_DIRECTORY_END) && (this.relativeOffsetEndOfZip64CentralDir = this.reader.lastIndexOfSignature(r.ZIP64_CENTRAL_DIRECTORY_END), this.relativeOffsetEndOfZip64CentralDir < 0)) throw new Error("Corrupted zip: can't find the ZIP64 end of central directory");
935
+ this.reader.setIndex(this.relativeOffsetEndOfZip64CentralDir), this.checkSignature(r.ZIP64_CENTRAL_DIRECTORY_END), this.readBlockZip64EndOfCentral();
936
+ }
937
+ var i = this.centralDirOffset + this.centralDirSize;
938
+ this.zip64 && (i += 20, i += 12 + this.zip64EndOfCentralSize);
939
+ var d = b - i;
940
+ if (0 < d) this.isSignature(b, r.CENTRAL_FILE_HEADER) || (this.reader.zero = d);
941
+ else if (d < 0) throw new Error("Corrupted zip: missing " + Math.abs(d) + " bytes.");
942
+ }, prepareReader: function(_) {
943
+ this.reader = a(_);
944
+ }, load: function(_) {
945
+ this.prepareReader(_), this.readEndOfCentral(), this.readCentralDir(), this.readLocalFiles();
946
+ } }, A.exports = y;
947
+ }, { "./reader/readerFor": 22, "./signature": 23, "./support": 30, "./utils": 32, "./zipEntry": 34 }], 34: [function(p, A, v) {
948
+ var a = p("./reader/readerFor"), o = p("./utils"), r = p("./compressedObject"), l = p("./crc32"), g = p("./utf8"), y = p("./compressions"), _ = p("./support");
949
+ function b(i, d) {
950
+ this.options = i, this.loadOptions = d;
951
+ }
952
+ b.prototype = { isEncrypted: function() {
953
+ return (1 & this.bitFlag) == 1;
954
+ }, useUTF8: function() {
955
+ return (2048 & this.bitFlag) == 2048;
956
+ }, readLocalPart: function(i) {
957
+ var d, n;
958
+ if (i.skip(22), this.fileNameLength = i.readInt(2), n = i.readInt(2), this.fileName = i.readData(this.fileNameLength), i.skip(n), this.compressedSize === -1 || this.uncompressedSize === -1) throw new Error("Bug or corrupted zip : didn't get enough information from the central directory (compressedSize === -1 || uncompressedSize === -1)");
959
+ if ((d = function(c) {
960
+ for (var s in y) if (Object.prototype.hasOwnProperty.call(y, s) && y[s].magic === c) return y[s];
961
+ return null;
962
+ }(this.compressionMethod)) === null) throw new Error("Corrupted zip : compression " + o.pretty(this.compressionMethod) + " unknown (inner file : " + o.transformTo("string", this.fileName) + ")");
963
+ this.decompressed = new r(this.compressedSize, this.uncompressedSize, this.crc32, d, i.readData(this.compressedSize));
964
+ }, readCentralPart: function(i) {
965
+ this.versionMadeBy = i.readInt(2), i.skip(2), this.bitFlag = i.readInt(2), this.compressionMethod = i.readString(2), this.date = i.readDate(), this.crc32 = i.readInt(4), this.compressedSize = i.readInt(4), this.uncompressedSize = i.readInt(4);
966
+ var d = i.readInt(2);
967
+ if (this.extraFieldsLength = i.readInt(2), this.fileCommentLength = i.readInt(2), this.diskNumberStart = i.readInt(2), this.internalFileAttributes = i.readInt(2), this.externalFileAttributes = i.readInt(4), this.localHeaderOffset = i.readInt(4), this.isEncrypted()) throw new Error("Encrypted zip are not supported");
968
+ i.skip(d), this.readExtraFields(i), this.parseZIP64ExtraField(i), this.fileComment = i.readData(this.fileCommentLength);
969
+ }, processAttributes: function() {
970
+ this.unixPermissions = null, this.dosPermissions = null;
971
+ var i = this.versionMadeBy >> 8;
972
+ this.dir = !!(16 & this.externalFileAttributes), i == 0 && (this.dosPermissions = 63 & this.externalFileAttributes), i == 3 && (this.unixPermissions = this.externalFileAttributes >> 16 & 65535), this.dir || this.fileNameStr.slice(-1) !== "/" || (this.dir = !0);
973
+ }, parseZIP64ExtraField: function() {
974
+ if (this.extraFields[1]) {
975
+ var i = a(this.extraFields[1].value);
976
+ this.uncompressedSize === o.MAX_VALUE_32BITS && (this.uncompressedSize = i.readInt(8)), this.compressedSize === o.MAX_VALUE_32BITS && (this.compressedSize = i.readInt(8)), this.localHeaderOffset === o.MAX_VALUE_32BITS && (this.localHeaderOffset = i.readInt(8)), this.diskNumberStart === o.MAX_VALUE_32BITS && (this.diskNumberStart = i.readInt(4));
977
+ }
978
+ }, readExtraFields: function(i) {
979
+ var d, n, c, s = i.index + this.extraFieldsLength;
980
+ for (this.extraFields || (this.extraFields = {}); i.index + 4 < s; ) d = i.readInt(2), n = i.readInt(2), c = i.readData(n), this.extraFields[d] = { id: d, length: n, value: c };
981
+ i.setIndex(s);
982
+ }, handleUTF8: function() {
983
+ var i = _.uint8array ? "uint8array" : "array";
984
+ if (this.useUTF8()) this.fileNameStr = g.utf8decode(this.fileName), this.fileCommentStr = g.utf8decode(this.fileComment);
985
+ else {
986
+ var d = this.findExtraFieldUnicodePath();
987
+ if (d !== null) this.fileNameStr = d;
988
+ else {
989
+ var n = o.transformTo(i, this.fileName);
990
+ this.fileNameStr = this.loadOptions.decodeFileName(n);
991
+ }
992
+ var c = this.findExtraFieldUnicodeComment();
993
+ if (c !== null) this.fileCommentStr = c;
994
+ else {
995
+ var s = o.transformTo(i, this.fileComment);
996
+ this.fileCommentStr = this.loadOptions.decodeFileName(s);
997
+ }
998
+ }
999
+ }, findExtraFieldUnicodePath: function() {
1000
+ var i = this.extraFields[28789];
1001
+ if (i) {
1002
+ var d = a(i.value);
1003
+ return d.readInt(1) !== 1 || l(this.fileName) !== d.readInt(4) ? null : g.utf8decode(d.readData(i.length - 5));
1004
+ }
1005
+ return null;
1006
+ }, findExtraFieldUnicodeComment: function() {
1007
+ var i = this.extraFields[25461];
1008
+ if (i) {
1009
+ var d = a(i.value);
1010
+ return d.readInt(1) !== 1 || l(this.fileComment) !== d.readInt(4) ? null : g.utf8decode(d.readData(i.length - 5));
1011
+ }
1012
+ return null;
1013
+ } }, A.exports = b;
1014
+ }, { "./compressedObject": 2, "./compressions": 3, "./crc32": 4, "./reader/readerFor": 22, "./support": 30, "./utf8": 31, "./utils": 32 }], 35: [function(p, A, v) {
1015
+ function a(d, n, c) {
1016
+ this.name = d, this.dir = c.dir, this.date = c.date, this.comment = c.comment, this.unixPermissions = c.unixPermissions, this.dosPermissions = c.dosPermissions, this._data = n, this._dataBinary = c.binary, this.options = { compression: c.compression, compressionOptions: c.compressionOptions };
1017
+ }
1018
+ var o = p("./stream/StreamHelper"), r = p("./stream/DataWorker"), l = p("./utf8"), g = p("./compressedObject"), y = p("./stream/GenericWorker");
1019
+ a.prototype = { internalStream: function(d) {
1020
+ var n = null, c = "string";
1021
+ try {
1022
+ if (!d) throw new Error("No output type specified.");
1023
+ var s = (c = d.toLowerCase()) === "string" || c === "text";
1024
+ c !== "binarystring" && c !== "text" || (c = "string"), n = this._decompressWorker();
1025
+ var m = !this._dataBinary;
1026
+ m && !s && (n = n.pipe(new l.Utf8EncodeWorker())), !m && s && (n = n.pipe(new l.Utf8DecodeWorker()));
1027
+ } catch (w) {
1028
+ (n = new y("error")).error(w);
1029
+ }
1030
+ return new o(n, c, "");
1031
+ }, async: function(d, n) {
1032
+ return this.internalStream(d).accumulate(n);
1033
+ }, nodeStream: function(d, n) {
1034
+ return this.internalStream(d || "nodebuffer").toNodejsStream(n);
1035
+ }, _compressWorker: function(d, n) {
1036
+ if (this._data instanceof g && this._data.compression.magic === d.magic) return this._data.getCompressedWorker();
1037
+ var c = this._decompressWorker();
1038
+ return this._dataBinary || (c = c.pipe(new l.Utf8EncodeWorker())), g.createWorkerFrom(c, d, n);
1039
+ }, _decompressWorker: function() {
1040
+ return this._data instanceof g ? this._data.getContentWorker() : this._data instanceof y ? this._data : new r(this._data);
1041
+ } };
1042
+ for (var _ = ["asText", "asBinary", "asNodeBuffer", "asUint8Array", "asArrayBuffer"], b = function() {
1043
+ throw new Error("This method has been removed in JSZip 3.0, please check the upgrade guide.");
1044
+ }, i = 0; i < _.length; i++) a.prototype[_[i]] = b;
1045
+ A.exports = a;
1046
+ }, { "./compressedObject": 2, "./stream/DataWorker": 27, "./stream/GenericWorker": 28, "./stream/StreamHelper": 29, "./utf8": 31 }], 36: [function(p, A, v) {
1047
+ (function(a) {
1048
+ var o, r, l = a.MutationObserver || a.WebKitMutationObserver;
1049
+ if (l) {
1050
+ var g = 0, y = new l(d), _ = a.document.createTextNode("");
1051
+ y.observe(_, { characterData: !0 }), o = function() {
1052
+ _.data = g = ++g % 2;
1053
+ };
1054
+ } else if (a.setImmediate || a.MessageChannel === void 0) o = "document" in a && "onreadystatechange" in a.document.createElement("script") ? function() {
1055
+ var n = a.document.createElement("script");
1056
+ n.onreadystatechange = function() {
1057
+ d(), n.onreadystatechange = null, n.parentNode.removeChild(n), n = null;
1058
+ }, a.document.documentElement.appendChild(n);
1059
+ } : function() {
1060
+ setTimeout(d, 0);
1061
+ };
1062
+ else {
1063
+ var b = new a.MessageChannel();
1064
+ b.port1.onmessage = d, o = function() {
1065
+ b.port2.postMessage(0);
1066
+ };
1067
+ }
1068
+ var i = [];
1069
+ function d() {
1070
+ var n, c;
1071
+ r = !0;
1072
+ for (var s = i.length; s; ) {
1073
+ for (c = i, i = [], n = -1; ++n < s; ) c[n]();
1074
+ s = i.length;
1075
+ }
1076
+ r = !1;
1077
+ }
1078
+ A.exports = function(n) {
1079
+ i.push(n) !== 1 || r || o();
1080
+ };
1081
+ }).call(this, typeof At < "u" ? At : typeof self < "u" ? self : typeof window < "u" ? window : {});
1082
+ }, {}], 37: [function(p, A, v) {
1083
+ var a = p("immediate");
1084
+ function o() {
1085
+ }
1086
+ var r = {}, l = ["REJECTED"], g = ["FULFILLED"], y = ["PENDING"];
1087
+ function _(s) {
1088
+ if (typeof s != "function") throw new TypeError("resolver must be a function");
1089
+ this.state = y, this.queue = [], this.outcome = void 0, s !== o && n(this, s);
1090
+ }
1091
+ function b(s, m, w) {
1092
+ this.promise = s, typeof m == "function" && (this.onFulfilled = m, this.callFulfilled = this.otherCallFulfilled), typeof w == "function" && (this.onRejected = w, this.callRejected = this.otherCallRejected);
1093
+ }
1094
+ function i(s, m, w) {
1095
+ a(function() {
1096
+ var x;
1097
+ try {
1098
+ x = m(w);
1099
+ } catch (S) {
1100
+ return r.reject(s, S);
1101
+ }
1102
+ x === s ? r.reject(s, new TypeError("Cannot resolve promise with itself")) : r.resolve(s, x);
1103
+ });
1104
+ }
1105
+ function d(s) {
1106
+ var m = s && s.then;
1107
+ if (s && (typeof s == "object" || typeof s == "function") && typeof m == "function") return function() {
1108
+ m.apply(s, arguments);
1109
+ };
1110
+ }
1111
+ function n(s, m) {
1112
+ var w = !1;
1113
+ function x(E) {
1114
+ w || (w = !0, r.reject(s, E));
1115
+ }
1116
+ function S(E) {
1117
+ w || (w = !0, r.resolve(s, E));
1118
+ }
1119
+ var F = c(function() {
1120
+ m(S, x);
1121
+ });
1122
+ F.status === "error" && x(F.value);
1123
+ }
1124
+ function c(s, m) {
1125
+ var w = {};
1126
+ try {
1127
+ w.value = s(m), w.status = "success";
1128
+ } catch (x) {
1129
+ w.status = "error", w.value = x;
1130
+ }
1131
+ return w;
1132
+ }
1133
+ (A.exports = _).prototype.finally = function(s) {
1134
+ if (typeof s != "function") return this;
1135
+ var m = this.constructor;
1136
+ return this.then(function(w) {
1137
+ return m.resolve(s()).then(function() {
1138
+ return w;
1139
+ });
1140
+ }, function(w) {
1141
+ return m.resolve(s()).then(function() {
1142
+ throw w;
1143
+ });
1144
+ });
1145
+ }, _.prototype.catch = function(s) {
1146
+ return this.then(null, s);
1147
+ }, _.prototype.then = function(s, m) {
1148
+ if (typeof s != "function" && this.state === g || typeof m != "function" && this.state === l) return this;
1149
+ var w = new this.constructor(o);
1150
+ return this.state !== y ? i(w, this.state === g ? s : m, this.outcome) : this.queue.push(new b(w, s, m)), w;
1151
+ }, b.prototype.callFulfilled = function(s) {
1152
+ r.resolve(this.promise, s);
1153
+ }, b.prototype.otherCallFulfilled = function(s) {
1154
+ i(this.promise, this.onFulfilled, s);
1155
+ }, b.prototype.callRejected = function(s) {
1156
+ r.reject(this.promise, s);
1157
+ }, b.prototype.otherCallRejected = function(s) {
1158
+ i(this.promise, this.onRejected, s);
1159
+ }, r.resolve = function(s, m) {
1160
+ var w = c(d, m);
1161
+ if (w.status === "error") return r.reject(s, w.value);
1162
+ var x = w.value;
1163
+ if (x) n(s, x);
1164
+ else {
1165
+ s.state = g, s.outcome = m;
1166
+ for (var S = -1, F = s.queue.length; ++S < F; ) s.queue[S].callFulfilled(m);
1167
+ }
1168
+ return s;
1169
+ }, r.reject = function(s, m) {
1170
+ s.state = l, s.outcome = m;
1171
+ for (var w = -1, x = s.queue.length; ++w < x; ) s.queue[w].callRejected(m);
1172
+ return s;
1173
+ }, _.resolve = function(s) {
1174
+ return s instanceof this ? s : r.resolve(new this(o), s);
1175
+ }, _.reject = function(s) {
1176
+ var m = new this(o);
1177
+ return r.reject(m, s);
1178
+ }, _.all = function(s) {
1179
+ var m = this;
1180
+ if (Object.prototype.toString.call(s) !== "[object Array]") return this.reject(new TypeError("must be an array"));
1181
+ var w = s.length, x = !1;
1182
+ if (!w) return this.resolve([]);
1183
+ for (var S = new Array(w), F = 0, E = -1, D = new this(o); ++E < w; ) C(s[E], E);
1184
+ return D;
1185
+ function C(z, X) {
1186
+ m.resolve(z).then(function(h) {
1187
+ S[X] = h, ++F !== w || x || (x = !0, r.resolve(D, S));
1188
+ }, function(h) {
1189
+ x || (x = !0, r.reject(D, h));
1190
+ });
1191
+ }
1192
+ }, _.race = function(s) {
1193
+ var m = this;
1194
+ if (Object.prototype.toString.call(s) !== "[object Array]") return this.reject(new TypeError("must be an array"));
1195
+ var w = s.length, x = !1;
1196
+ if (!w) return this.resolve([]);
1197
+ for (var S = -1, F = new this(o); ++S < w; ) E = s[S], m.resolve(E).then(function(D) {
1198
+ x || (x = !0, r.resolve(F, D));
1199
+ }, function(D) {
1200
+ x || (x = !0, r.reject(F, D));
1201
+ });
1202
+ var E;
1203
+ return F;
1204
+ };
1205
+ }, { immediate: 36 }], 38: [function(p, A, v) {
1206
+ var a = {};
1207
+ (0, p("./lib/utils/common").assign)(a, p("./lib/deflate"), p("./lib/inflate"), p("./lib/zlib/constants")), A.exports = a;
1208
+ }, { "./lib/deflate": 39, "./lib/inflate": 40, "./lib/utils/common": 41, "./lib/zlib/constants": 44 }], 39: [function(p, A, v) {
1209
+ var a = p("./zlib/deflate"), o = p("./utils/common"), r = p("./utils/strings"), l = p("./zlib/messages"), g = p("./zlib/zstream"), y = Object.prototype.toString, _ = 0, b = -1, i = 0, d = 8;
1210
+ function n(s) {
1211
+ if (!(this instanceof n)) return new n(s);
1212
+ this.options = o.assign({ level: b, method: d, chunkSize: 16384, windowBits: 15, memLevel: 8, strategy: i, to: "" }, s || {});
1213
+ var m = this.options;
1214
+ m.raw && 0 < m.windowBits ? m.windowBits = -m.windowBits : m.gzip && 0 < m.windowBits && m.windowBits < 16 && (m.windowBits += 16), this.err = 0, this.msg = "", this.ended = !1, this.chunks = [], this.strm = new g(), this.strm.avail_out = 0;
1215
+ var w = a.deflateInit2(this.strm, m.level, m.method, m.windowBits, m.memLevel, m.strategy);
1216
+ if (w !== _) throw new Error(l[w]);
1217
+ if (m.header && a.deflateSetHeader(this.strm, m.header), m.dictionary) {
1218
+ var x;
1219
+ if (x = typeof m.dictionary == "string" ? r.string2buf(m.dictionary) : y.call(m.dictionary) === "[object ArrayBuffer]" ? new Uint8Array(m.dictionary) : m.dictionary, (w = a.deflateSetDictionary(this.strm, x)) !== _) throw new Error(l[w]);
1220
+ this._dict_set = !0;
1221
+ }
1222
+ }
1223
+ function c(s, m) {
1224
+ var w = new n(m);
1225
+ if (w.push(s, !0), w.err) throw w.msg || l[w.err];
1226
+ return w.result;
1227
+ }
1228
+ n.prototype.push = function(s, m) {
1229
+ var w, x, S = this.strm, F = this.options.chunkSize;
1230
+ if (this.ended) return !1;
1231
+ x = m === ~~m ? m : m === !0 ? 4 : 0, typeof s == "string" ? S.input = r.string2buf(s) : y.call(s) === "[object ArrayBuffer]" ? S.input = new Uint8Array(s) : S.input = s, S.next_in = 0, S.avail_in = S.input.length;
1232
+ do {
1233
+ if (S.avail_out === 0 && (S.output = new o.Buf8(F), S.next_out = 0, S.avail_out = F), (w = a.deflate(S, x)) !== 1 && w !== _) return this.onEnd(w), !(this.ended = !0);
1234
+ S.avail_out !== 0 && (S.avail_in !== 0 || x !== 4 && x !== 2) || (this.options.to === "string" ? this.onData(r.buf2binstring(o.shrinkBuf(S.output, S.next_out))) : this.onData(o.shrinkBuf(S.output, S.next_out)));
1235
+ } while ((0 < S.avail_in || S.avail_out === 0) && w !== 1);
1236
+ return x === 4 ? (w = a.deflateEnd(this.strm), this.onEnd(w), this.ended = !0, w === _) : x !== 2 || (this.onEnd(_), !(S.avail_out = 0));
1237
+ }, n.prototype.onData = function(s) {
1238
+ this.chunks.push(s);
1239
+ }, n.prototype.onEnd = function(s) {
1240
+ s === _ && (this.options.to === "string" ? this.result = this.chunks.join("") : this.result = o.flattenChunks(this.chunks)), this.chunks = [], this.err = s, this.msg = this.strm.msg;
1241
+ }, v.Deflate = n, v.deflate = c, v.deflateRaw = function(s, m) {
1242
+ return (m = m || {}).raw = !0, c(s, m);
1243
+ }, v.gzip = function(s, m) {
1244
+ return (m = m || {}).gzip = !0, c(s, m);
1245
+ };
1246
+ }, { "./utils/common": 41, "./utils/strings": 42, "./zlib/deflate": 46, "./zlib/messages": 51, "./zlib/zstream": 53 }], 40: [function(p, A, v) {
1247
+ var a = p("./zlib/inflate"), o = p("./utils/common"), r = p("./utils/strings"), l = p("./zlib/constants"), g = p("./zlib/messages"), y = p("./zlib/zstream"), _ = p("./zlib/gzheader"), b = Object.prototype.toString;
1248
+ function i(n) {
1249
+ if (!(this instanceof i)) return new i(n);
1250
+ this.options = o.assign({ chunkSize: 16384, windowBits: 0, to: "" }, n || {});
1251
+ var c = this.options;
1252
+ c.raw && 0 <= c.windowBits && c.windowBits < 16 && (c.windowBits = -c.windowBits, c.windowBits === 0 && (c.windowBits = -15)), !(0 <= c.windowBits && c.windowBits < 16) || n && n.windowBits || (c.windowBits += 32), 15 < c.windowBits && c.windowBits < 48 && !(15 & c.windowBits) && (c.windowBits |= 15), this.err = 0, this.msg = "", this.ended = !1, this.chunks = [], this.strm = new y(), this.strm.avail_out = 0;
1253
+ var s = a.inflateInit2(this.strm, c.windowBits);
1254
+ if (s !== l.Z_OK) throw new Error(g[s]);
1255
+ this.header = new _(), a.inflateGetHeader(this.strm, this.header);
1256
+ }
1257
+ function d(n, c) {
1258
+ var s = new i(c);
1259
+ if (s.push(n, !0), s.err) throw s.msg || g[s.err];
1260
+ return s.result;
1261
+ }
1262
+ i.prototype.push = function(n, c) {
1263
+ var s, m, w, x, S, F, E = this.strm, D = this.options.chunkSize, C = this.options.dictionary, z = !1;
1264
+ if (this.ended) return !1;
1265
+ m = c === ~~c ? c : c === !0 ? l.Z_FINISH : l.Z_NO_FLUSH, typeof n == "string" ? E.input = r.binstring2buf(n) : b.call(n) === "[object ArrayBuffer]" ? E.input = new Uint8Array(n) : E.input = n, E.next_in = 0, E.avail_in = E.input.length;
1266
+ do {
1267
+ if (E.avail_out === 0 && (E.output = new o.Buf8(D), E.next_out = 0, E.avail_out = D), (s = a.inflate(E, l.Z_NO_FLUSH)) === l.Z_NEED_DICT && C && (F = typeof C == "string" ? r.string2buf(C) : b.call(C) === "[object ArrayBuffer]" ? new Uint8Array(C) : C, s = a.inflateSetDictionary(this.strm, F)), s === l.Z_BUF_ERROR && z === !0 && (s = l.Z_OK, z = !1), s !== l.Z_STREAM_END && s !== l.Z_OK) return this.onEnd(s), !(this.ended = !0);
1268
+ E.next_out && (E.avail_out !== 0 && s !== l.Z_STREAM_END && (E.avail_in !== 0 || m !== l.Z_FINISH && m !== l.Z_SYNC_FLUSH) || (this.options.to === "string" ? (w = r.utf8border(E.output, E.next_out), x = E.next_out - w, S = r.buf2string(E.output, w), E.next_out = x, E.avail_out = D - x, x && o.arraySet(E.output, E.output, w, x, 0), this.onData(S)) : this.onData(o.shrinkBuf(E.output, E.next_out)))), E.avail_in === 0 && E.avail_out === 0 && (z = !0);
1269
+ } while ((0 < E.avail_in || E.avail_out === 0) && s !== l.Z_STREAM_END);
1270
+ return s === l.Z_STREAM_END && (m = l.Z_FINISH), m === l.Z_FINISH ? (s = a.inflateEnd(this.strm), this.onEnd(s), this.ended = !0, s === l.Z_OK) : m !== l.Z_SYNC_FLUSH || (this.onEnd(l.Z_OK), !(E.avail_out = 0));
1271
+ }, i.prototype.onData = function(n) {
1272
+ this.chunks.push(n);
1273
+ }, i.prototype.onEnd = function(n) {
1274
+ n === l.Z_OK && (this.options.to === "string" ? this.result = this.chunks.join("") : this.result = o.flattenChunks(this.chunks)), this.chunks = [], this.err = n, this.msg = this.strm.msg;
1275
+ }, v.Inflate = i, v.inflate = d, v.inflateRaw = function(n, c) {
1276
+ return (c = c || {}).raw = !0, d(n, c);
1277
+ }, v.ungzip = d;
1278
+ }, { "./utils/common": 41, "./utils/strings": 42, "./zlib/constants": 44, "./zlib/gzheader": 47, "./zlib/inflate": 49, "./zlib/messages": 51, "./zlib/zstream": 53 }], 41: [function(p, A, v) {
1279
+ var a = typeof Uint8Array < "u" && typeof Uint16Array < "u" && typeof Int32Array < "u";
1280
+ v.assign = function(l) {
1281
+ for (var g = Array.prototype.slice.call(arguments, 1); g.length; ) {
1282
+ var y = g.shift();
1283
+ if (y) {
1284
+ if (typeof y != "object") throw new TypeError(y + "must be non-object");
1285
+ for (var _ in y) y.hasOwnProperty(_) && (l[_] = y[_]);
1286
+ }
1287
+ }
1288
+ return l;
1289
+ }, v.shrinkBuf = function(l, g) {
1290
+ return l.length === g ? l : l.subarray ? l.subarray(0, g) : (l.length = g, l);
1291
+ };
1292
+ var o = { arraySet: function(l, g, y, _, b) {
1293
+ if (g.subarray && l.subarray) l.set(g.subarray(y, y + _), b);
1294
+ else for (var i = 0; i < _; i++) l[b + i] = g[y + i];
1295
+ }, flattenChunks: function(l) {
1296
+ var g, y, _, b, i, d;
1297
+ for (g = _ = 0, y = l.length; g < y; g++) _ += l[g].length;
1298
+ for (d = new Uint8Array(_), g = b = 0, y = l.length; g < y; g++) i = l[g], d.set(i, b), b += i.length;
1299
+ return d;
1300
+ } }, r = { arraySet: function(l, g, y, _, b) {
1301
+ for (var i = 0; i < _; i++) l[b + i] = g[y + i];
1302
+ }, flattenChunks: function(l) {
1303
+ return [].concat.apply([], l);
1304
+ } };
1305
+ v.setTyped = function(l) {
1306
+ l ? (v.Buf8 = Uint8Array, v.Buf16 = Uint16Array, v.Buf32 = Int32Array, v.assign(v, o)) : (v.Buf8 = Array, v.Buf16 = Array, v.Buf32 = Array, v.assign(v, r));
1307
+ }, v.setTyped(a);
1308
+ }, {}], 42: [function(p, A, v) {
1309
+ var a = p("./common"), o = !0, r = !0;
1310
+ try {
1311
+ String.fromCharCode.apply(null, [0]);
1312
+ } catch {
1313
+ o = !1;
1314
+ }
1315
+ try {
1316
+ String.fromCharCode.apply(null, new Uint8Array(1));
1317
+ } catch {
1318
+ r = !1;
1319
+ }
1320
+ for (var l = new a.Buf8(256), g = 0; g < 256; g++) l[g] = 252 <= g ? 6 : 248 <= g ? 5 : 240 <= g ? 4 : 224 <= g ? 3 : 192 <= g ? 2 : 1;
1321
+ function y(_, b) {
1322
+ if (b < 65537 && (_.subarray && r || !_.subarray && o)) return String.fromCharCode.apply(null, a.shrinkBuf(_, b));
1323
+ for (var i = "", d = 0; d < b; d++) i += String.fromCharCode(_[d]);
1324
+ return i;
1325
+ }
1326
+ l[254] = l[254] = 1, v.string2buf = function(_) {
1327
+ var b, i, d, n, c, s = _.length, m = 0;
1328
+ for (n = 0; n < s; n++) (64512 & (i = _.charCodeAt(n))) == 55296 && n + 1 < s && (64512 & (d = _.charCodeAt(n + 1))) == 56320 && (i = 65536 + (i - 55296 << 10) + (d - 56320), n++), m += i < 128 ? 1 : i < 2048 ? 2 : i < 65536 ? 3 : 4;
1329
+ for (b = new a.Buf8(m), n = c = 0; c < m; n++) (64512 & (i = _.charCodeAt(n))) == 55296 && n + 1 < s && (64512 & (d = _.charCodeAt(n + 1))) == 56320 && (i = 65536 + (i - 55296 << 10) + (d - 56320), n++), i < 128 ? b[c++] = i : (i < 2048 ? b[c++] = 192 | i >>> 6 : (i < 65536 ? b[c++] = 224 | i >>> 12 : (b[c++] = 240 | i >>> 18, b[c++] = 128 | i >>> 12 & 63), b[c++] = 128 | i >>> 6 & 63), b[c++] = 128 | 63 & i);
1330
+ return b;
1331
+ }, v.buf2binstring = function(_) {
1332
+ return y(_, _.length);
1333
+ }, v.binstring2buf = function(_) {
1334
+ for (var b = new a.Buf8(_.length), i = 0, d = b.length; i < d; i++) b[i] = _.charCodeAt(i);
1335
+ return b;
1336
+ }, v.buf2string = function(_, b) {
1337
+ var i, d, n, c, s = b || _.length, m = new Array(2 * s);
1338
+ for (i = d = 0; i < s; ) if ((n = _[i++]) < 128) m[d++] = n;
1339
+ else if (4 < (c = l[n])) m[d++] = 65533, i += c - 1;
1340
+ else {
1341
+ for (n &= c === 2 ? 31 : c === 3 ? 15 : 7; 1 < c && i < s; ) n = n << 6 | 63 & _[i++], c--;
1342
+ 1 < c ? m[d++] = 65533 : n < 65536 ? m[d++] = n : (n -= 65536, m[d++] = 55296 | n >> 10 & 1023, m[d++] = 56320 | 1023 & n);
1343
+ }
1344
+ return y(m, d);
1345
+ }, v.utf8border = function(_, b) {
1346
+ var i;
1347
+ for ((b = b || _.length) > _.length && (b = _.length), i = b - 1; 0 <= i && (192 & _[i]) == 128; ) i--;
1348
+ return i < 0 || i === 0 ? b : i + l[_[i]] > b ? i : b;
1349
+ };
1350
+ }, { "./common": 41 }], 43: [function(p, A, v) {
1351
+ A.exports = function(a, o, r, l) {
1352
+ for (var g = 65535 & a | 0, y = a >>> 16 & 65535 | 0, _ = 0; r !== 0; ) {
1353
+ for (r -= _ = 2e3 < r ? 2e3 : r; y = y + (g = g + o[l++] | 0) | 0, --_; ) ;
1354
+ g %= 65521, y %= 65521;
1355
+ }
1356
+ return g | y << 16 | 0;
1357
+ };
1358
+ }, {}], 44: [function(p, A, v) {
1359
+ A.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 };
1360
+ }, {}], 45: [function(p, A, v) {
1361
+ var a = function() {
1362
+ for (var o, r = [], l = 0; l < 256; l++) {
1363
+ o = l;
1364
+ for (var g = 0; g < 8; g++) o = 1 & o ? 3988292384 ^ o >>> 1 : o >>> 1;
1365
+ r[l] = o;
1366
+ }
1367
+ return r;
1368
+ }();
1369
+ A.exports = function(o, r, l, g) {
1370
+ var y = a, _ = g + l;
1371
+ o ^= -1;
1372
+ for (var b = g; b < _; b++) o = o >>> 8 ^ y[255 & (o ^ r[b])];
1373
+ return -1 ^ o;
1374
+ };
1375
+ }, {}], 46: [function(p, A, v) {
1376
+ var a, o = p("../utils/common"), r = p("./trees"), l = p("./adler32"), g = p("./crc32"), y = p("./messages"), _ = 0, b = 4, i = 0, d = -2, n = -1, c = 4, s = 2, m = 8, w = 9, x = 286, S = 30, F = 19, E = 2 * x + 1, D = 15, C = 3, z = 258, X = z + C + 1, h = 42, T = 113, e = 1, P = 2, V = 3, L = 4;
1377
+ function Q(t, N) {
1378
+ return t.msg = y[N], N;
1379
+ }
1380
+ function W(t) {
1381
+ return (t << 1) - (4 < t ? 9 : 0);
1382
+ }
1383
+ function tt(t) {
1384
+ for (var N = t.length; 0 <= --N; ) t[N] = 0;
1385
+ }
1386
+ function B(t) {
1387
+ var N = t.state, R = N.pending;
1388
+ R > t.avail_out && (R = t.avail_out), R !== 0 && (o.arraySet(t.output, N.pending_buf, N.pending_out, R, t.next_out), t.next_out += R, N.pending_out += R, t.total_out += R, t.avail_out -= R, N.pending -= R, N.pending === 0 && (N.pending_out = 0));
1389
+ }
1390
+ function I(t, N) {
1391
+ r._tr_flush_block(t, 0 <= t.block_start ? t.block_start : -1, t.strstart - t.block_start, N), t.block_start = t.strstart, B(t.strm);
1392
+ }
1393
+ function J(t, N) {
1394
+ t.pending_buf[t.pending++] = N;
1395
+ }
1396
+ function $(t, N) {
1397
+ t.pending_buf[t.pending++] = N >>> 8 & 255, t.pending_buf[t.pending++] = 255 & N;
1398
+ }
1399
+ function G(t, N) {
1400
+ var R, f, u = t.max_chain_length, k = t.strstart, U = t.prev_length, j = t.nice_match, O = t.strstart > t.w_size - X ? t.strstart - (t.w_size - X) : 0, M = t.window, Y = t.w_mask, H = t.prev, q = t.strstart + z, at = M[k + U - 1], nt = M[k + U];
1401
+ t.prev_length >= t.good_match && (u >>= 2), j > t.lookahead && (j = t.lookahead);
1402
+ do
1403
+ if (M[(R = N) + U] === nt && M[R + U - 1] === at && M[R] === M[k] && M[++R] === M[k + 1]) {
1404
+ k += 2, R++;
1405
+ do
1406
+ ;
1407
+ while (M[++k] === M[++R] && M[++k] === M[++R] && M[++k] === M[++R] && M[++k] === M[++R] && M[++k] === M[++R] && M[++k] === M[++R] && M[++k] === M[++R] && M[++k] === M[++R] && k < q);
1408
+ if (f = z - (q - k), k = q - z, U < f) {
1409
+ if (t.match_start = N, j <= (U = f)) break;
1410
+ at = M[k + U - 1], nt = M[k + U];
1411
+ }
1412
+ }
1413
+ while ((N = H[N & Y]) > O && --u != 0);
1414
+ return U <= t.lookahead ? U : t.lookahead;
1415
+ }
1416
+ function st(t) {
1417
+ var N, R, f, u, k, U, j, O, M, Y, H = t.w_size;
1418
+ do {
1419
+ if (u = t.window_size - t.lookahead - t.strstart, t.strstart >= H + (H - X)) {
1420
+ for (o.arraySet(t.window, t.window, H, H, 0), t.match_start -= H, t.strstart -= H, t.block_start -= H, N = R = t.hash_size; f = t.head[--N], t.head[N] = H <= f ? f - H : 0, --R; ) ;
1421
+ for (N = R = H; f = t.prev[--N], t.prev[N] = H <= f ? f - H : 0, --R; ) ;
1422
+ u += H;
1423
+ }
1424
+ if (t.strm.avail_in === 0) break;
1425
+ if (U = t.strm, j = t.window, O = t.strstart + t.lookahead, M = u, Y = void 0, Y = U.avail_in, M < Y && (Y = M), R = Y === 0 ? 0 : (U.avail_in -= Y, o.arraySet(j, U.input, U.next_in, Y, O), U.state.wrap === 1 ? U.adler = l(U.adler, j, Y, O) : U.state.wrap === 2 && (U.adler = g(U.adler, j, Y, O)), U.next_in += Y, U.total_in += Y, Y), t.lookahead += R, t.lookahead + t.insert >= C) for (k = t.strstart - t.insert, t.ins_h = t.window[k], t.ins_h = (t.ins_h << t.hash_shift ^ t.window[k + 1]) & t.hash_mask; t.insert && (t.ins_h = (t.ins_h << t.hash_shift ^ t.window[k + C - 1]) & t.hash_mask, t.prev[k & t.w_mask] = t.head[t.ins_h], t.head[t.ins_h] = k, k++, t.insert--, !(t.lookahead + t.insert < C)); ) ;
1426
+ } while (t.lookahead < X && t.strm.avail_in !== 0);
1427
+ }
1428
+ function ht(t, N) {
1429
+ for (var R, f; ; ) {
1430
+ if (t.lookahead < X) {
1431
+ if (st(t), t.lookahead < X && N === _) return e;
1432
+ if (t.lookahead === 0) break;
1433
+ }
1434
+ if (R = 0, t.lookahead >= C && (t.ins_h = (t.ins_h << t.hash_shift ^ t.window[t.strstart + C - 1]) & t.hash_mask, R = t.prev[t.strstart & t.w_mask] = t.head[t.ins_h], t.head[t.ins_h] = t.strstart), R !== 0 && t.strstart - R <= t.w_size - X && (t.match_length = G(t, R)), t.match_length >= C) if (f = r._tr_tally(t, t.strstart - t.match_start, t.match_length - C), t.lookahead -= t.match_length, t.match_length <= t.max_lazy_match && t.lookahead >= C) {
1435
+ for (t.match_length--; t.strstart++, t.ins_h = (t.ins_h << t.hash_shift ^ t.window[t.strstart + C - 1]) & t.hash_mask, R = t.prev[t.strstart & t.w_mask] = t.head[t.ins_h], t.head[t.ins_h] = t.strstart, --t.match_length != 0; ) ;
1436
+ t.strstart++;
1437
+ } else t.strstart += t.match_length, t.match_length = 0, t.ins_h = t.window[t.strstart], t.ins_h = (t.ins_h << t.hash_shift ^ t.window[t.strstart + 1]) & t.hash_mask;
1438
+ else f = r._tr_tally(t, 0, t.window[t.strstart]), t.lookahead--, t.strstart++;
1439
+ if (f && (I(t, !1), t.strm.avail_out === 0)) return e;
1440
+ }
1441
+ return t.insert = t.strstart < C - 1 ? t.strstart : C - 1, N === b ? (I(t, !0), t.strm.avail_out === 0 ? V : L) : t.last_lit && (I(t, !1), t.strm.avail_out === 0) ? e : P;
1442
+ }
1443
+ function rt(t, N) {
1444
+ for (var R, f, u; ; ) {
1445
+ if (t.lookahead < X) {
1446
+ if (st(t), t.lookahead < X && N === _) return e;
1447
+ if (t.lookahead === 0) break;
1448
+ }
1449
+ if (R = 0, t.lookahead >= C && (t.ins_h = (t.ins_h << t.hash_shift ^ t.window[t.strstart + C - 1]) & t.hash_mask, R = t.prev[t.strstart & t.w_mask] = t.head[t.ins_h], t.head[t.ins_h] = t.strstart), t.prev_length = t.match_length, t.prev_match = t.match_start, t.match_length = C - 1, R !== 0 && t.prev_length < t.max_lazy_match && t.strstart - R <= t.w_size - X && (t.match_length = G(t, R), t.match_length <= 5 && (t.strategy === 1 || t.match_length === C && 4096 < t.strstart - t.match_start) && (t.match_length = C - 1)), t.prev_length >= C && t.match_length <= t.prev_length) {
1450
+ for (u = t.strstart + t.lookahead - C, f = r._tr_tally(t, t.strstart - 1 - t.prev_match, t.prev_length - C), t.lookahead -= t.prev_length - 1, t.prev_length -= 2; ++t.strstart <= u && (t.ins_h = (t.ins_h << t.hash_shift ^ t.window[t.strstart + C - 1]) & t.hash_mask, R = t.prev[t.strstart & t.w_mask] = t.head[t.ins_h], t.head[t.ins_h] = t.strstart), --t.prev_length != 0; ) ;
1451
+ if (t.match_available = 0, t.match_length = C - 1, t.strstart++, f && (I(t, !1), t.strm.avail_out === 0)) return e;
1452
+ } else if (t.match_available) {
1453
+ if ((f = r._tr_tally(t, 0, t.window[t.strstart - 1])) && I(t, !1), t.strstart++, t.lookahead--, t.strm.avail_out === 0) return e;
1454
+ } else t.match_available = 1, t.strstart++, t.lookahead--;
1455
+ }
1456
+ return t.match_available && (f = r._tr_tally(t, 0, t.window[t.strstart - 1]), t.match_available = 0), t.insert = t.strstart < C - 1 ? t.strstart : C - 1, N === b ? (I(t, !0), t.strm.avail_out === 0 ? V : L) : t.last_lit && (I(t, !1), t.strm.avail_out === 0) ? e : P;
1457
+ }
1458
+ function it(t, N, R, f, u) {
1459
+ this.good_length = t, this.max_lazy = N, this.nice_length = R, this.max_chain = f, this.func = u;
1460
+ }
1461
+ function ct() {
1462
+ 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 = m, 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 o.Buf16(2 * E), this.dyn_dtree = new o.Buf16(2 * (2 * S + 1)), this.bl_tree = new o.Buf16(2 * (2 * F + 1)), tt(this.dyn_ltree), tt(this.dyn_dtree), tt(this.bl_tree), this.l_desc = null, this.d_desc = null, this.bl_desc = null, this.bl_count = new o.Buf16(D + 1), this.heap = new o.Buf16(2 * x + 1), tt(this.heap), this.heap_len = 0, this.heap_max = 0, this.depth = new o.Buf16(2 * x + 1), tt(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;
1463
+ }
1464
+ function ot(t) {
1465
+ var N;
1466
+ return t && t.state ? (t.total_in = t.total_out = 0, t.data_type = s, (N = t.state).pending = 0, N.pending_out = 0, N.wrap < 0 && (N.wrap = -N.wrap), N.status = N.wrap ? h : T, t.adler = N.wrap === 2 ? 0 : 1, N.last_flush = _, r._tr_init(N), i) : Q(t, d);
1467
+ }
1468
+ function _t(t) {
1469
+ var N = ot(t);
1470
+ return N === i && function(R) {
1471
+ R.window_size = 2 * R.w_size, tt(R.head), R.max_lazy_match = a[R.level].max_lazy, R.good_match = a[R.level].good_length, R.nice_match = a[R.level].nice_length, R.max_chain_length = a[R.level].max_chain, R.strstart = 0, R.block_start = 0, R.lookahead = 0, R.insert = 0, R.match_length = R.prev_length = C - 1, R.match_available = 0, R.ins_h = 0;
1472
+ }(t.state), N;
1473
+ }
1474
+ function gt(t, N, R, f, u, k) {
1475
+ if (!t) return d;
1476
+ var U = 1;
1477
+ if (N === n && (N = 6), f < 0 ? (U = 0, f = -f) : 15 < f && (U = 2, f -= 16), u < 1 || w < u || R !== m || f < 8 || 15 < f || N < 0 || 9 < N || k < 0 || c < k) return Q(t, d);
1478
+ f === 8 && (f = 9);
1479
+ var j = new ct();
1480
+ return (t.state = j).strm = t, j.wrap = U, j.gzhead = null, j.w_bits = f, j.w_size = 1 << j.w_bits, j.w_mask = j.w_size - 1, j.hash_bits = u + 7, j.hash_size = 1 << j.hash_bits, j.hash_mask = j.hash_size - 1, j.hash_shift = ~~((j.hash_bits + C - 1) / C), j.window = new o.Buf8(2 * j.w_size), j.head = new o.Buf16(j.hash_size), j.prev = new o.Buf16(j.w_size), j.lit_bufsize = 1 << u + 6, j.pending_buf_size = 4 * j.lit_bufsize, j.pending_buf = new o.Buf8(j.pending_buf_size), j.d_buf = 1 * j.lit_bufsize, j.l_buf = 3 * j.lit_bufsize, j.level = N, j.strategy = k, j.method = R, _t(t);
1481
+ }
1482
+ a = [new it(0, 0, 0, 0, function(t, N) {
1483
+ var R = 65535;
1484
+ for (R > t.pending_buf_size - 5 && (R = t.pending_buf_size - 5); ; ) {
1485
+ if (t.lookahead <= 1) {
1486
+ if (st(t), t.lookahead === 0 && N === _) return e;
1487
+ if (t.lookahead === 0) break;
1488
+ }
1489
+ t.strstart += t.lookahead, t.lookahead = 0;
1490
+ var f = t.block_start + R;
1491
+ if ((t.strstart === 0 || t.strstart >= f) && (t.lookahead = t.strstart - f, t.strstart = f, I(t, !1), t.strm.avail_out === 0) || t.strstart - t.block_start >= t.w_size - X && (I(t, !1), t.strm.avail_out === 0)) return e;
1492
+ }
1493
+ return t.insert = 0, N === b ? (I(t, !0), t.strm.avail_out === 0 ? V : L) : (t.strstart > t.block_start && (I(t, !1), t.strm.avail_out), e);
1494
+ }), new it(4, 4, 8, 4, ht), new it(4, 5, 16, 8, ht), new it(4, 6, 32, 32, ht), new it(4, 4, 16, 16, rt), new it(8, 16, 32, 32, rt), new it(8, 16, 128, 128, rt), new it(8, 32, 128, 256, rt), new it(32, 128, 258, 1024, rt), new it(32, 258, 258, 4096, rt)], v.deflateInit = function(t, N) {
1495
+ return gt(t, N, m, 15, 8, 0);
1496
+ }, v.deflateInit2 = gt, v.deflateReset = _t, v.deflateResetKeep = ot, v.deflateSetHeader = function(t, N) {
1497
+ return t && t.state ? t.state.wrap !== 2 ? d : (t.state.gzhead = N, i) : d;
1498
+ }, v.deflate = function(t, N) {
1499
+ var R, f, u, k;
1500
+ if (!t || !t.state || 5 < N || N < 0) return t ? Q(t, d) : d;
1501
+ if (f = t.state, !t.output || !t.input && t.avail_in !== 0 || f.status === 666 && N !== b) return Q(t, t.avail_out === 0 ? -5 : d);
1502
+ if (f.strm = t, R = f.last_flush, f.last_flush = N, f.status === h) if (f.wrap === 2) t.adler = 0, J(f, 31), J(f, 139), J(f, 8), f.gzhead ? (J(f, (f.gzhead.text ? 1 : 0) + (f.gzhead.hcrc ? 2 : 0) + (f.gzhead.extra ? 4 : 0) + (f.gzhead.name ? 8 : 0) + (f.gzhead.comment ? 16 : 0)), J(f, 255 & f.gzhead.time), J(f, f.gzhead.time >> 8 & 255), J(f, f.gzhead.time >> 16 & 255), J(f, f.gzhead.time >> 24 & 255), J(f, f.level === 9 ? 2 : 2 <= f.strategy || f.level < 2 ? 4 : 0), J(f, 255 & f.gzhead.os), f.gzhead.extra && f.gzhead.extra.length && (J(f, 255 & f.gzhead.extra.length), J(f, f.gzhead.extra.length >> 8 & 255)), f.gzhead.hcrc && (t.adler = g(t.adler, f.pending_buf, f.pending, 0)), f.gzindex = 0, f.status = 69) : (J(f, 0), J(f, 0), J(f, 0), J(f, 0), J(f, 0), J(f, f.level === 9 ? 2 : 2 <= f.strategy || f.level < 2 ? 4 : 0), J(f, 3), f.status = T);
1503
+ else {
1504
+ var U = m + (f.w_bits - 8 << 4) << 8;
1505
+ U |= (2 <= f.strategy || f.level < 2 ? 0 : f.level < 6 ? 1 : f.level === 6 ? 2 : 3) << 6, f.strstart !== 0 && (U |= 32), U += 31 - U % 31, f.status = T, $(f, U), f.strstart !== 0 && ($(f, t.adler >>> 16), $(f, 65535 & t.adler)), t.adler = 1;
1506
+ }
1507
+ if (f.status === 69) if (f.gzhead.extra) {
1508
+ for (u = f.pending; f.gzindex < (65535 & f.gzhead.extra.length) && (f.pending !== f.pending_buf_size || (f.gzhead.hcrc && f.pending > u && (t.adler = g(t.adler, f.pending_buf, f.pending - u, u)), B(t), u = f.pending, f.pending !== f.pending_buf_size)); ) J(f, 255 & f.gzhead.extra[f.gzindex]), f.gzindex++;
1509
+ f.gzhead.hcrc && f.pending > u && (t.adler = g(t.adler, f.pending_buf, f.pending - u, u)), f.gzindex === f.gzhead.extra.length && (f.gzindex = 0, f.status = 73);
1510
+ } else f.status = 73;
1511
+ if (f.status === 73) if (f.gzhead.name) {
1512
+ u = f.pending;
1513
+ do {
1514
+ if (f.pending === f.pending_buf_size && (f.gzhead.hcrc && f.pending > u && (t.adler = g(t.adler, f.pending_buf, f.pending - u, u)), B(t), u = f.pending, f.pending === f.pending_buf_size)) {
1515
+ k = 1;
1516
+ break;
1517
+ }
1518
+ k = f.gzindex < f.gzhead.name.length ? 255 & f.gzhead.name.charCodeAt(f.gzindex++) : 0, J(f, k);
1519
+ } while (k !== 0);
1520
+ f.gzhead.hcrc && f.pending > u && (t.adler = g(t.adler, f.pending_buf, f.pending - u, u)), k === 0 && (f.gzindex = 0, f.status = 91);
1521
+ } else f.status = 91;
1522
+ if (f.status === 91) if (f.gzhead.comment) {
1523
+ u = f.pending;
1524
+ do {
1525
+ if (f.pending === f.pending_buf_size && (f.gzhead.hcrc && f.pending > u && (t.adler = g(t.adler, f.pending_buf, f.pending - u, u)), B(t), u = f.pending, f.pending === f.pending_buf_size)) {
1526
+ k = 1;
1527
+ break;
1528
+ }
1529
+ k = f.gzindex < f.gzhead.comment.length ? 255 & f.gzhead.comment.charCodeAt(f.gzindex++) : 0, J(f, k);
1530
+ } while (k !== 0);
1531
+ f.gzhead.hcrc && f.pending > u && (t.adler = g(t.adler, f.pending_buf, f.pending - u, u)), k === 0 && (f.status = 103);
1532
+ } else f.status = 103;
1533
+ if (f.status === 103 && (f.gzhead.hcrc ? (f.pending + 2 > f.pending_buf_size && B(t), f.pending + 2 <= f.pending_buf_size && (J(f, 255 & t.adler), J(f, t.adler >> 8 & 255), t.adler = 0, f.status = T)) : f.status = T), f.pending !== 0) {
1534
+ if (B(t), t.avail_out === 0) return f.last_flush = -1, i;
1535
+ } else if (t.avail_in === 0 && W(N) <= W(R) && N !== b) return Q(t, -5);
1536
+ if (f.status === 666 && t.avail_in !== 0) return Q(t, -5);
1537
+ if (t.avail_in !== 0 || f.lookahead !== 0 || N !== _ && f.status !== 666) {
1538
+ var j = f.strategy === 2 ? function(O, M) {
1539
+ for (var Y; ; ) {
1540
+ if (O.lookahead === 0 && (st(O), O.lookahead === 0)) {
1541
+ if (M === _) return e;
1542
+ break;
1543
+ }
1544
+ if (O.match_length = 0, Y = r._tr_tally(O, 0, O.window[O.strstart]), O.lookahead--, O.strstart++, Y && (I(O, !1), O.strm.avail_out === 0)) return e;
1545
+ }
1546
+ return O.insert = 0, M === b ? (I(O, !0), O.strm.avail_out === 0 ? V : L) : O.last_lit && (I(O, !1), O.strm.avail_out === 0) ? e : P;
1547
+ }(f, N) : f.strategy === 3 ? function(O, M) {
1548
+ for (var Y, H, q, at, nt = O.window; ; ) {
1549
+ if (O.lookahead <= z) {
1550
+ if (st(O), O.lookahead <= z && M === _) return e;
1551
+ if (O.lookahead === 0) break;
1552
+ }
1553
+ if (O.match_length = 0, O.lookahead >= C && 0 < O.strstart && (H = nt[q = O.strstart - 1]) === nt[++q] && H === nt[++q] && H === nt[++q]) {
1554
+ at = O.strstart + z;
1555
+ do
1556
+ ;
1557
+ while (H === nt[++q] && H === nt[++q] && H === nt[++q] && H === nt[++q] && H === nt[++q] && H === nt[++q] && H === nt[++q] && H === nt[++q] && q < at);
1558
+ O.match_length = z - (at - q), O.match_length > O.lookahead && (O.match_length = O.lookahead);
1559
+ }
1560
+ if (O.match_length >= C ? (Y = r._tr_tally(O, 1, O.match_length - C), O.lookahead -= O.match_length, O.strstart += O.match_length, O.match_length = 0) : (Y = r._tr_tally(O, 0, O.window[O.strstart]), O.lookahead--, O.strstart++), Y && (I(O, !1), O.strm.avail_out === 0)) return e;
1561
+ }
1562
+ return O.insert = 0, M === b ? (I(O, !0), O.strm.avail_out === 0 ? V : L) : O.last_lit && (I(O, !1), O.strm.avail_out === 0) ? e : P;
1563
+ }(f, N) : a[f.level].func(f, N);
1564
+ if (j !== V && j !== L || (f.status = 666), j === e || j === V) return t.avail_out === 0 && (f.last_flush = -1), i;
1565
+ if (j === P && (N === 1 ? r._tr_align(f) : N !== 5 && (r._tr_stored_block(f, 0, 0, !1), N === 3 && (tt(f.head), f.lookahead === 0 && (f.strstart = 0, f.block_start = 0, f.insert = 0))), B(t), t.avail_out === 0)) return f.last_flush = -1, i;
1566
+ }
1567
+ return N !== b ? i : f.wrap <= 0 ? 1 : (f.wrap === 2 ? (J(f, 255 & t.adler), J(f, t.adler >> 8 & 255), J(f, t.adler >> 16 & 255), J(f, t.adler >> 24 & 255), J(f, 255 & t.total_in), J(f, t.total_in >> 8 & 255), J(f, t.total_in >> 16 & 255), J(f, t.total_in >> 24 & 255)) : ($(f, t.adler >>> 16), $(f, 65535 & t.adler)), B(t), 0 < f.wrap && (f.wrap = -f.wrap), f.pending !== 0 ? i : 1);
1568
+ }, v.deflateEnd = function(t) {
1569
+ var N;
1570
+ return t && t.state ? (N = t.state.status) !== h && N !== 69 && N !== 73 && N !== 91 && N !== 103 && N !== T && N !== 666 ? Q(t, d) : (t.state = null, N === T ? Q(t, -3) : i) : d;
1571
+ }, v.deflateSetDictionary = function(t, N) {
1572
+ var R, f, u, k, U, j, O, M, Y = N.length;
1573
+ if (!t || !t.state || (k = (R = t.state).wrap) === 2 || k === 1 && R.status !== h || R.lookahead) return d;
1574
+ for (k === 1 && (t.adler = l(t.adler, N, Y, 0)), R.wrap = 0, Y >= R.w_size && (k === 0 && (tt(R.head), R.strstart = 0, R.block_start = 0, R.insert = 0), M = new o.Buf8(R.w_size), o.arraySet(M, N, Y - R.w_size, R.w_size, 0), N = M, Y = R.w_size), U = t.avail_in, j = t.next_in, O = t.input, t.avail_in = Y, t.next_in = 0, t.input = N, st(R); R.lookahead >= C; ) {
1575
+ for (f = R.strstart, u = R.lookahead - (C - 1); R.ins_h = (R.ins_h << R.hash_shift ^ R.window[f + C - 1]) & R.hash_mask, R.prev[f & R.w_mask] = R.head[R.ins_h], R.head[R.ins_h] = f, f++, --u; ) ;
1576
+ R.strstart = f, R.lookahead = C - 1, st(R);
1577
+ }
1578
+ return R.strstart += R.lookahead, R.block_start = R.strstart, R.insert = R.lookahead, R.lookahead = 0, R.match_length = R.prev_length = C - 1, R.match_available = 0, t.next_in = j, t.input = O, t.avail_in = U, R.wrap = k, i;
1579
+ }, v.deflateInfo = "pako deflate (from Nodeca project)";
1580
+ }, { "../utils/common": 41, "./adler32": 43, "./crc32": 45, "./messages": 51, "./trees": 52 }], 47: [function(p, A, v) {
1581
+ A.exports = function() {
1582
+ 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 = !1;
1583
+ };
1584
+ }, {}], 48: [function(p, A, v) {
1585
+ A.exports = function(a, o) {
1586
+ var r, l, g, y, _, b, i, d, n, c, s, m, w, x, S, F, E, D, C, z, X, h, T, e, P;
1587
+ r = a.state, l = a.next_in, e = a.input, g = l + (a.avail_in - 5), y = a.next_out, P = a.output, _ = y - (o - a.avail_out), b = y + (a.avail_out - 257), i = r.dmax, d = r.wsize, n = r.whave, c = r.wnext, s = r.window, m = r.hold, w = r.bits, x = r.lencode, S = r.distcode, F = (1 << r.lenbits) - 1, E = (1 << r.distbits) - 1;
1588
+ t: do {
1589
+ w < 15 && (m += e[l++] << w, w += 8, m += e[l++] << w, w += 8), D = x[m & F];
1590
+ e: for (; ; ) {
1591
+ if (m >>>= C = D >>> 24, w -= C, (C = D >>> 16 & 255) === 0) P[y++] = 65535 & D;
1592
+ else {
1593
+ if (!(16 & C)) {
1594
+ if (!(64 & C)) {
1595
+ D = x[(65535 & D) + (m & (1 << C) - 1)];
1596
+ continue e;
1597
+ }
1598
+ if (32 & C) {
1599
+ r.mode = 12;
1600
+ break t;
1601
+ }
1602
+ a.msg = "invalid literal/length code", r.mode = 30;
1603
+ break t;
1604
+ }
1605
+ z = 65535 & D, (C &= 15) && (w < C && (m += e[l++] << w, w += 8), z += m & (1 << C) - 1, m >>>= C, w -= C), w < 15 && (m += e[l++] << w, w += 8, m += e[l++] << w, w += 8), D = S[m & E];
1606
+ r: for (; ; ) {
1607
+ if (m >>>= C = D >>> 24, w -= C, !(16 & (C = D >>> 16 & 255))) {
1608
+ if (!(64 & C)) {
1609
+ D = S[(65535 & D) + (m & (1 << C) - 1)];
1610
+ continue r;
1611
+ }
1612
+ a.msg = "invalid distance code", r.mode = 30;
1613
+ break t;
1614
+ }
1615
+ if (X = 65535 & D, w < (C &= 15) && (m += e[l++] << w, (w += 8) < C && (m += e[l++] << w, w += 8)), i < (X += m & (1 << C) - 1)) {
1616
+ a.msg = "invalid distance too far back", r.mode = 30;
1617
+ break t;
1618
+ }
1619
+ if (m >>>= C, w -= C, (C = y - _) < X) {
1620
+ if (n < (C = X - C) && r.sane) {
1621
+ a.msg = "invalid distance too far back", r.mode = 30;
1622
+ break t;
1623
+ }
1624
+ if (T = s, (h = 0) === c) {
1625
+ if (h += d - C, C < z) {
1626
+ for (z -= C; P[y++] = s[h++], --C; ) ;
1627
+ h = y - X, T = P;
1628
+ }
1629
+ } else if (c < C) {
1630
+ if (h += d + c - C, (C -= c) < z) {
1631
+ for (z -= C; P[y++] = s[h++], --C; ) ;
1632
+ if (h = 0, c < z) {
1633
+ for (z -= C = c; P[y++] = s[h++], --C; ) ;
1634
+ h = y - X, T = P;
1635
+ }
1636
+ }
1637
+ } else if (h += c - C, C < z) {
1638
+ for (z -= C; P[y++] = s[h++], --C; ) ;
1639
+ h = y - X, T = P;
1640
+ }
1641
+ for (; 2 < z; ) P[y++] = T[h++], P[y++] = T[h++], P[y++] = T[h++], z -= 3;
1642
+ z && (P[y++] = T[h++], 1 < z && (P[y++] = T[h++]));
1643
+ } else {
1644
+ for (h = y - X; P[y++] = P[h++], P[y++] = P[h++], P[y++] = P[h++], 2 < (z -= 3); ) ;
1645
+ z && (P[y++] = P[h++], 1 < z && (P[y++] = P[h++]));
1646
+ }
1647
+ break;
1648
+ }
1649
+ }
1650
+ break;
1651
+ }
1652
+ } while (l < g && y < b);
1653
+ l -= z = w >> 3, m &= (1 << (w -= z << 3)) - 1, a.next_in = l, a.next_out = y, a.avail_in = l < g ? g - l + 5 : 5 - (l - g), a.avail_out = y < b ? b - y + 257 : 257 - (y - b), r.hold = m, r.bits = w;
1654
+ };
1655
+ }, {}], 49: [function(p, A, v) {
1656
+ var a = p("../utils/common"), o = p("./adler32"), r = p("./crc32"), l = p("./inffast"), g = p("./inftrees"), y = 1, _ = 2, b = 0, i = -2, d = 1, n = 852, c = 592;
1657
+ function s(h) {
1658
+ return (h >>> 24 & 255) + (h >>> 8 & 65280) + ((65280 & h) << 8) + ((255 & h) << 24);
1659
+ }
1660
+ function m() {
1661
+ this.mode = 0, this.last = !1, this.wrap = 0, this.havedict = !1, 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 a.Buf16(320), this.work = new a.Buf16(288), this.lendyn = null, this.distdyn = null, this.sane = 0, this.back = 0, this.was = 0;
1662
+ }
1663
+ function w(h) {
1664
+ var T;
1665
+ return h && h.state ? (T = h.state, h.total_in = h.total_out = T.total = 0, h.msg = "", T.wrap && (h.adler = 1 & T.wrap), T.mode = d, T.last = 0, T.havedict = 0, T.dmax = 32768, T.head = null, T.hold = 0, T.bits = 0, T.lencode = T.lendyn = new a.Buf32(n), T.distcode = T.distdyn = new a.Buf32(c), T.sane = 1, T.back = -1, b) : i;
1666
+ }
1667
+ function x(h) {
1668
+ var T;
1669
+ return h && h.state ? ((T = h.state).wsize = 0, T.whave = 0, T.wnext = 0, w(h)) : i;
1670
+ }
1671
+ function S(h, T) {
1672
+ var e, P;
1673
+ return h && h.state ? (P = h.state, T < 0 ? (e = 0, T = -T) : (e = 1 + (T >> 4), T < 48 && (T &= 15)), T && (T < 8 || 15 < T) ? i : (P.window !== null && P.wbits !== T && (P.window = null), P.wrap = e, P.wbits = T, x(h))) : i;
1674
+ }
1675
+ function F(h, T) {
1676
+ var e, P;
1677
+ return h ? (P = new m(), (h.state = P).window = null, (e = S(h, T)) !== b && (h.state = null), e) : i;
1678
+ }
1679
+ var E, D, C = !0;
1680
+ function z(h) {
1681
+ if (C) {
1682
+ var T;
1683
+ for (E = new a.Buf32(512), D = new a.Buf32(32), T = 0; T < 144; ) h.lens[T++] = 8;
1684
+ for (; T < 256; ) h.lens[T++] = 9;
1685
+ for (; T < 280; ) h.lens[T++] = 7;
1686
+ for (; T < 288; ) h.lens[T++] = 8;
1687
+ for (g(y, h.lens, 0, 288, E, 0, h.work, { bits: 9 }), T = 0; T < 32; ) h.lens[T++] = 5;
1688
+ g(_, h.lens, 0, 32, D, 0, h.work, { bits: 5 }), C = !1;
1689
+ }
1690
+ h.lencode = E, h.lenbits = 9, h.distcode = D, h.distbits = 5;
1691
+ }
1692
+ function X(h, T, e, P) {
1693
+ var V, L = h.state;
1694
+ return L.window === null && (L.wsize = 1 << L.wbits, L.wnext = 0, L.whave = 0, L.window = new a.Buf8(L.wsize)), P >= L.wsize ? (a.arraySet(L.window, T, e - L.wsize, L.wsize, 0), L.wnext = 0, L.whave = L.wsize) : (P < (V = L.wsize - L.wnext) && (V = P), a.arraySet(L.window, T, e - P, V, L.wnext), (P -= V) ? (a.arraySet(L.window, T, e - P, P, 0), L.wnext = P, L.whave = L.wsize) : (L.wnext += V, L.wnext === L.wsize && (L.wnext = 0), L.whave < L.wsize && (L.whave += V))), 0;
1695
+ }
1696
+ v.inflateReset = x, v.inflateReset2 = S, v.inflateResetKeep = w, v.inflateInit = function(h) {
1697
+ return F(h, 15);
1698
+ }, v.inflateInit2 = F, v.inflate = function(h, T) {
1699
+ var e, P, V, L, Q, W, tt, B, I, J, $, G, st, ht, rt, it, ct, ot, _t, gt, t, N, R, f, u = 0, k = new a.Buf8(4), U = [16, 17, 18, 0, 8, 7, 9, 6, 10, 5, 11, 4, 12, 3, 13, 2, 14, 1, 15];
1700
+ if (!h || !h.state || !h.output || !h.input && h.avail_in !== 0) return i;
1701
+ (e = h.state).mode === 12 && (e.mode = 13), Q = h.next_out, V = h.output, tt = h.avail_out, L = h.next_in, P = h.input, W = h.avail_in, B = e.hold, I = e.bits, J = W, $ = tt, N = b;
1702
+ t: for (; ; ) switch (e.mode) {
1703
+ case d:
1704
+ if (e.wrap === 0) {
1705
+ e.mode = 13;
1706
+ break;
1707
+ }
1708
+ for (; I < 16; ) {
1709
+ if (W === 0) break t;
1710
+ W--, B += P[L++] << I, I += 8;
1711
+ }
1712
+ if (2 & e.wrap && B === 35615) {
1713
+ k[e.check = 0] = 255 & B, k[1] = B >>> 8 & 255, e.check = r(e.check, k, 2, 0), I = B = 0, e.mode = 2;
1714
+ break;
1715
+ }
1716
+ if (e.flags = 0, e.head && (e.head.done = !1), !(1 & e.wrap) || (((255 & B) << 8) + (B >> 8)) % 31) {
1717
+ h.msg = "incorrect header check", e.mode = 30;
1718
+ break;
1719
+ }
1720
+ if ((15 & B) != 8) {
1721
+ h.msg = "unknown compression method", e.mode = 30;
1722
+ break;
1723
+ }
1724
+ if (I -= 4, t = 8 + (15 & (B >>>= 4)), e.wbits === 0) e.wbits = t;
1725
+ else if (t > e.wbits) {
1726
+ h.msg = "invalid window size", e.mode = 30;
1727
+ break;
1728
+ }
1729
+ e.dmax = 1 << t, h.adler = e.check = 1, e.mode = 512 & B ? 10 : 12, I = B = 0;
1730
+ break;
1731
+ case 2:
1732
+ for (; I < 16; ) {
1733
+ if (W === 0) break t;
1734
+ W--, B += P[L++] << I, I += 8;
1735
+ }
1736
+ if (e.flags = B, (255 & e.flags) != 8) {
1737
+ h.msg = "unknown compression method", e.mode = 30;
1738
+ break;
1739
+ }
1740
+ if (57344 & e.flags) {
1741
+ h.msg = "unknown header flags set", e.mode = 30;
1742
+ break;
1743
+ }
1744
+ e.head && (e.head.text = B >> 8 & 1), 512 & e.flags && (k[0] = 255 & B, k[1] = B >>> 8 & 255, e.check = r(e.check, k, 2, 0)), I = B = 0, e.mode = 3;
1745
+ case 3:
1746
+ for (; I < 32; ) {
1747
+ if (W === 0) break t;
1748
+ W--, B += P[L++] << I, I += 8;
1749
+ }
1750
+ e.head && (e.head.time = B), 512 & e.flags && (k[0] = 255 & B, k[1] = B >>> 8 & 255, k[2] = B >>> 16 & 255, k[3] = B >>> 24 & 255, e.check = r(e.check, k, 4, 0)), I = B = 0, e.mode = 4;
1751
+ case 4:
1752
+ for (; I < 16; ) {
1753
+ if (W === 0) break t;
1754
+ W--, B += P[L++] << I, I += 8;
1755
+ }
1756
+ e.head && (e.head.xflags = 255 & B, e.head.os = B >> 8), 512 & e.flags && (k[0] = 255 & B, k[1] = B >>> 8 & 255, e.check = r(e.check, k, 2, 0)), I = B = 0, e.mode = 5;
1757
+ case 5:
1758
+ if (1024 & e.flags) {
1759
+ for (; I < 16; ) {
1760
+ if (W === 0) break t;
1761
+ W--, B += P[L++] << I, I += 8;
1762
+ }
1763
+ e.length = B, e.head && (e.head.extra_len = B), 512 & e.flags && (k[0] = 255 & B, k[1] = B >>> 8 & 255, e.check = r(e.check, k, 2, 0)), I = B = 0;
1764
+ } else e.head && (e.head.extra = null);
1765
+ e.mode = 6;
1766
+ case 6:
1767
+ if (1024 & e.flags && (W < (G = e.length) && (G = W), G && (e.head && (t = e.head.extra_len - e.length, e.head.extra || (e.head.extra = new Array(e.head.extra_len)), a.arraySet(e.head.extra, P, L, G, t)), 512 & e.flags && (e.check = r(e.check, P, G, L)), W -= G, L += G, e.length -= G), e.length)) break t;
1768
+ e.length = 0, e.mode = 7;
1769
+ case 7:
1770
+ if (2048 & e.flags) {
1771
+ if (W === 0) break t;
1772
+ for (G = 0; t = P[L + G++], e.head && t && e.length < 65536 && (e.head.name += String.fromCharCode(t)), t && G < W; ) ;
1773
+ if (512 & e.flags && (e.check = r(e.check, P, G, L)), W -= G, L += G, t) break t;
1774
+ } else e.head && (e.head.name = null);
1775
+ e.length = 0, e.mode = 8;
1776
+ case 8:
1777
+ if (4096 & e.flags) {
1778
+ if (W === 0) break t;
1779
+ for (G = 0; t = P[L + G++], e.head && t && e.length < 65536 && (e.head.comment += String.fromCharCode(t)), t && G < W; ) ;
1780
+ if (512 & e.flags && (e.check = r(e.check, P, G, L)), W -= G, L += G, t) break t;
1781
+ } else e.head && (e.head.comment = null);
1782
+ e.mode = 9;
1783
+ case 9:
1784
+ if (512 & e.flags) {
1785
+ for (; I < 16; ) {
1786
+ if (W === 0) break t;
1787
+ W--, B += P[L++] << I, I += 8;
1788
+ }
1789
+ if (B !== (65535 & e.check)) {
1790
+ h.msg = "header crc mismatch", e.mode = 30;
1791
+ break;
1792
+ }
1793
+ I = B = 0;
1794
+ }
1795
+ e.head && (e.head.hcrc = e.flags >> 9 & 1, e.head.done = !0), h.adler = e.check = 0, e.mode = 12;
1796
+ break;
1797
+ case 10:
1798
+ for (; I < 32; ) {
1799
+ if (W === 0) break t;
1800
+ W--, B += P[L++] << I, I += 8;
1801
+ }
1802
+ h.adler = e.check = s(B), I = B = 0, e.mode = 11;
1803
+ case 11:
1804
+ if (e.havedict === 0) return h.next_out = Q, h.avail_out = tt, h.next_in = L, h.avail_in = W, e.hold = B, e.bits = I, 2;
1805
+ h.adler = e.check = 1, e.mode = 12;
1806
+ case 12:
1807
+ if (T === 5 || T === 6) break t;
1808
+ case 13:
1809
+ if (e.last) {
1810
+ B >>>= 7 & I, I -= 7 & I, e.mode = 27;
1811
+ break;
1812
+ }
1813
+ for (; I < 3; ) {
1814
+ if (W === 0) break t;
1815
+ W--, B += P[L++] << I, I += 8;
1816
+ }
1817
+ switch (e.last = 1 & B, I -= 1, 3 & (B >>>= 1)) {
1818
+ case 0:
1819
+ e.mode = 14;
1820
+ break;
1821
+ case 1:
1822
+ if (z(e), e.mode = 20, T !== 6) break;
1823
+ B >>>= 2, I -= 2;
1824
+ break t;
1825
+ case 2:
1826
+ e.mode = 17;
1827
+ break;
1828
+ case 3:
1829
+ h.msg = "invalid block type", e.mode = 30;
1830
+ }
1831
+ B >>>= 2, I -= 2;
1832
+ break;
1833
+ case 14:
1834
+ for (B >>>= 7 & I, I -= 7 & I; I < 32; ) {
1835
+ if (W === 0) break t;
1836
+ W--, B += P[L++] << I, I += 8;
1837
+ }
1838
+ if ((65535 & B) != (B >>> 16 ^ 65535)) {
1839
+ h.msg = "invalid stored block lengths", e.mode = 30;
1840
+ break;
1841
+ }
1842
+ if (e.length = 65535 & B, I = B = 0, e.mode = 15, T === 6) break t;
1843
+ case 15:
1844
+ e.mode = 16;
1845
+ case 16:
1846
+ if (G = e.length) {
1847
+ if (W < G && (G = W), tt < G && (G = tt), G === 0) break t;
1848
+ a.arraySet(V, P, L, G, Q), W -= G, L += G, tt -= G, Q += G, e.length -= G;
1849
+ break;
1850
+ }
1851
+ e.mode = 12;
1852
+ break;
1853
+ case 17:
1854
+ for (; I < 14; ) {
1855
+ if (W === 0) break t;
1856
+ W--, B += P[L++] << I, I += 8;
1857
+ }
1858
+ if (e.nlen = 257 + (31 & B), B >>>= 5, I -= 5, e.ndist = 1 + (31 & B), B >>>= 5, I -= 5, e.ncode = 4 + (15 & B), B >>>= 4, I -= 4, 286 < e.nlen || 30 < e.ndist) {
1859
+ h.msg = "too many length or distance symbols", e.mode = 30;
1860
+ break;
1861
+ }
1862
+ e.have = 0, e.mode = 18;
1863
+ case 18:
1864
+ for (; e.have < e.ncode; ) {
1865
+ for (; I < 3; ) {
1866
+ if (W === 0) break t;
1867
+ W--, B += P[L++] << I, I += 8;
1868
+ }
1869
+ e.lens[U[e.have++]] = 7 & B, B >>>= 3, I -= 3;
1870
+ }
1871
+ for (; e.have < 19; ) e.lens[U[e.have++]] = 0;
1872
+ if (e.lencode = e.lendyn, e.lenbits = 7, R = { bits: e.lenbits }, N = g(0, e.lens, 0, 19, e.lencode, 0, e.work, R), e.lenbits = R.bits, N) {
1873
+ h.msg = "invalid code lengths set", e.mode = 30;
1874
+ break;
1875
+ }
1876
+ e.have = 0, e.mode = 19;
1877
+ case 19:
1878
+ for (; e.have < e.nlen + e.ndist; ) {
1879
+ for (; it = (u = e.lencode[B & (1 << e.lenbits) - 1]) >>> 16 & 255, ct = 65535 & u, !((rt = u >>> 24) <= I); ) {
1880
+ if (W === 0) break t;
1881
+ W--, B += P[L++] << I, I += 8;
1882
+ }
1883
+ if (ct < 16) B >>>= rt, I -= rt, e.lens[e.have++] = ct;
1884
+ else {
1885
+ if (ct === 16) {
1886
+ for (f = rt + 2; I < f; ) {
1887
+ if (W === 0) break t;
1888
+ W--, B += P[L++] << I, I += 8;
1889
+ }
1890
+ if (B >>>= rt, I -= rt, e.have === 0) {
1891
+ h.msg = "invalid bit length repeat", e.mode = 30;
1892
+ break;
1893
+ }
1894
+ t = e.lens[e.have - 1], G = 3 + (3 & B), B >>>= 2, I -= 2;
1895
+ } else if (ct === 17) {
1896
+ for (f = rt + 3; I < f; ) {
1897
+ if (W === 0) break t;
1898
+ W--, B += P[L++] << I, I += 8;
1899
+ }
1900
+ I -= rt, t = 0, G = 3 + (7 & (B >>>= rt)), B >>>= 3, I -= 3;
1901
+ } else {
1902
+ for (f = rt + 7; I < f; ) {
1903
+ if (W === 0) break t;
1904
+ W--, B += P[L++] << I, I += 8;
1905
+ }
1906
+ I -= rt, t = 0, G = 11 + (127 & (B >>>= rt)), B >>>= 7, I -= 7;
1907
+ }
1908
+ if (e.have + G > e.nlen + e.ndist) {
1909
+ h.msg = "invalid bit length repeat", e.mode = 30;
1910
+ break;
1911
+ }
1912
+ for (; G--; ) e.lens[e.have++] = t;
1913
+ }
1914
+ }
1915
+ if (e.mode === 30) break;
1916
+ if (e.lens[256] === 0) {
1917
+ h.msg = "invalid code -- missing end-of-block", e.mode = 30;
1918
+ break;
1919
+ }
1920
+ if (e.lenbits = 9, R = { bits: e.lenbits }, N = g(y, e.lens, 0, e.nlen, e.lencode, 0, e.work, R), e.lenbits = R.bits, N) {
1921
+ h.msg = "invalid literal/lengths set", e.mode = 30;
1922
+ break;
1923
+ }
1924
+ if (e.distbits = 6, e.distcode = e.distdyn, R = { bits: e.distbits }, N = g(_, e.lens, e.nlen, e.ndist, e.distcode, 0, e.work, R), e.distbits = R.bits, N) {
1925
+ h.msg = "invalid distances set", e.mode = 30;
1926
+ break;
1927
+ }
1928
+ if (e.mode = 20, T === 6) break t;
1929
+ case 20:
1930
+ e.mode = 21;
1931
+ case 21:
1932
+ if (6 <= W && 258 <= tt) {
1933
+ h.next_out = Q, h.avail_out = tt, h.next_in = L, h.avail_in = W, e.hold = B, e.bits = I, l(h, $), Q = h.next_out, V = h.output, tt = h.avail_out, L = h.next_in, P = h.input, W = h.avail_in, B = e.hold, I = e.bits, e.mode === 12 && (e.back = -1);
1934
+ break;
1935
+ }
1936
+ for (e.back = 0; it = (u = e.lencode[B & (1 << e.lenbits) - 1]) >>> 16 & 255, ct = 65535 & u, !((rt = u >>> 24) <= I); ) {
1937
+ if (W === 0) break t;
1938
+ W--, B += P[L++] << I, I += 8;
1939
+ }
1940
+ if (it && !(240 & it)) {
1941
+ for (ot = rt, _t = it, gt = ct; it = (u = e.lencode[gt + ((B & (1 << ot + _t) - 1) >> ot)]) >>> 16 & 255, ct = 65535 & u, !(ot + (rt = u >>> 24) <= I); ) {
1942
+ if (W === 0) break t;
1943
+ W--, B += P[L++] << I, I += 8;
1944
+ }
1945
+ B >>>= ot, I -= ot, e.back += ot;
1946
+ }
1947
+ if (B >>>= rt, I -= rt, e.back += rt, e.length = ct, it === 0) {
1948
+ e.mode = 26;
1949
+ break;
1950
+ }
1951
+ if (32 & it) {
1952
+ e.back = -1, e.mode = 12;
1953
+ break;
1954
+ }
1955
+ if (64 & it) {
1956
+ h.msg = "invalid literal/length code", e.mode = 30;
1957
+ break;
1958
+ }
1959
+ e.extra = 15 & it, e.mode = 22;
1960
+ case 22:
1961
+ if (e.extra) {
1962
+ for (f = e.extra; I < f; ) {
1963
+ if (W === 0) break t;
1964
+ W--, B += P[L++] << I, I += 8;
1965
+ }
1966
+ e.length += B & (1 << e.extra) - 1, B >>>= e.extra, I -= e.extra, e.back += e.extra;
1967
+ }
1968
+ e.was = e.length, e.mode = 23;
1969
+ case 23:
1970
+ for (; it = (u = e.distcode[B & (1 << e.distbits) - 1]) >>> 16 & 255, ct = 65535 & u, !((rt = u >>> 24) <= I); ) {
1971
+ if (W === 0) break t;
1972
+ W--, B += P[L++] << I, I += 8;
1973
+ }
1974
+ if (!(240 & it)) {
1975
+ for (ot = rt, _t = it, gt = ct; it = (u = e.distcode[gt + ((B & (1 << ot + _t) - 1) >> ot)]) >>> 16 & 255, ct = 65535 & u, !(ot + (rt = u >>> 24) <= I); ) {
1976
+ if (W === 0) break t;
1977
+ W--, B += P[L++] << I, I += 8;
1978
+ }
1979
+ B >>>= ot, I -= ot, e.back += ot;
1980
+ }
1981
+ if (B >>>= rt, I -= rt, e.back += rt, 64 & it) {
1982
+ h.msg = "invalid distance code", e.mode = 30;
1983
+ break;
1984
+ }
1985
+ e.offset = ct, e.extra = 15 & it, e.mode = 24;
1986
+ case 24:
1987
+ if (e.extra) {
1988
+ for (f = e.extra; I < f; ) {
1989
+ if (W === 0) break t;
1990
+ W--, B += P[L++] << I, I += 8;
1991
+ }
1992
+ e.offset += B & (1 << e.extra) - 1, B >>>= e.extra, I -= e.extra, e.back += e.extra;
1993
+ }
1994
+ if (e.offset > e.dmax) {
1995
+ h.msg = "invalid distance too far back", e.mode = 30;
1996
+ break;
1997
+ }
1998
+ e.mode = 25;
1999
+ case 25:
2000
+ if (tt === 0) break t;
2001
+ if (G = $ - tt, e.offset > G) {
2002
+ if ((G = e.offset - G) > e.whave && e.sane) {
2003
+ h.msg = "invalid distance too far back", e.mode = 30;
2004
+ break;
2005
+ }
2006
+ st = G > e.wnext ? (G -= e.wnext, e.wsize - G) : e.wnext - G, G > e.length && (G = e.length), ht = e.window;
2007
+ } else ht = V, st = Q - e.offset, G = e.length;
2008
+ for (tt < G && (G = tt), tt -= G, e.length -= G; V[Q++] = ht[st++], --G; ) ;
2009
+ e.length === 0 && (e.mode = 21);
2010
+ break;
2011
+ case 26:
2012
+ if (tt === 0) break t;
2013
+ V[Q++] = e.length, tt--, e.mode = 21;
2014
+ break;
2015
+ case 27:
2016
+ if (e.wrap) {
2017
+ for (; I < 32; ) {
2018
+ if (W === 0) break t;
2019
+ W--, B |= P[L++] << I, I += 8;
2020
+ }
2021
+ if ($ -= tt, h.total_out += $, e.total += $, $ && (h.adler = e.check = e.flags ? r(e.check, V, $, Q - $) : o(e.check, V, $, Q - $)), $ = tt, (e.flags ? B : s(B)) !== e.check) {
2022
+ h.msg = "incorrect data check", e.mode = 30;
2023
+ break;
2024
+ }
2025
+ I = B = 0;
2026
+ }
2027
+ e.mode = 28;
2028
+ case 28:
2029
+ if (e.wrap && e.flags) {
2030
+ for (; I < 32; ) {
2031
+ if (W === 0) break t;
2032
+ W--, B += P[L++] << I, I += 8;
2033
+ }
2034
+ if (B !== (4294967295 & e.total)) {
2035
+ h.msg = "incorrect length check", e.mode = 30;
2036
+ break;
2037
+ }
2038
+ I = B = 0;
2039
+ }
2040
+ e.mode = 29;
2041
+ case 29:
2042
+ N = 1;
2043
+ break t;
2044
+ case 30:
2045
+ N = -3;
2046
+ break t;
2047
+ case 31:
2048
+ return -4;
2049
+ case 32:
2050
+ default:
2051
+ return i;
2052
+ }
2053
+ return h.next_out = Q, h.avail_out = tt, h.next_in = L, h.avail_in = W, e.hold = B, e.bits = I, (e.wsize || $ !== h.avail_out && e.mode < 30 && (e.mode < 27 || T !== 4)) && X(h, h.output, h.next_out, $ - h.avail_out) ? (e.mode = 31, -4) : (J -= h.avail_in, $ -= h.avail_out, h.total_in += J, h.total_out += $, e.total += $, e.wrap && $ && (h.adler = e.check = e.flags ? r(e.check, V, $, h.next_out - $) : o(e.check, V, $, h.next_out - $)), h.data_type = e.bits + (e.last ? 64 : 0) + (e.mode === 12 ? 128 : 0) + (e.mode === 20 || e.mode === 15 ? 256 : 0), (J == 0 && $ === 0 || T === 4) && N === b && (N = -5), N);
2054
+ }, v.inflateEnd = function(h) {
2055
+ if (!h || !h.state) return i;
2056
+ var T = h.state;
2057
+ return T.window && (T.window = null), h.state = null, b;
2058
+ }, v.inflateGetHeader = function(h, T) {
2059
+ var e;
2060
+ return h && h.state && 2 & (e = h.state).wrap ? ((e.head = T).done = !1, b) : i;
2061
+ }, v.inflateSetDictionary = function(h, T) {
2062
+ var e, P = T.length;
2063
+ return h && h.state ? (e = h.state).wrap !== 0 && e.mode !== 11 ? i : e.mode === 11 && o(1, T, P, 0) !== e.check ? -3 : X(h, T, P, P) ? (e.mode = 31, -4) : (e.havedict = 1, b) : i;
2064
+ }, v.inflateInfo = "pako inflate (from Nodeca project)";
2065
+ }, { "../utils/common": 41, "./adler32": 43, "./crc32": 45, "./inffast": 48, "./inftrees": 50 }], 50: [function(p, A, v) {
2066
+ var a = p("../utils/common"), o = [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], r = [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], l = [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], g = [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];
2067
+ A.exports = function(y, _, b, i, d, n, c, s) {
2068
+ var m, w, x, S, F, E, D, C, z, X = s.bits, h = 0, T = 0, e = 0, P = 0, V = 0, L = 0, Q = 0, W = 0, tt = 0, B = 0, I = null, J = 0, $ = new a.Buf16(16), G = new a.Buf16(16), st = null, ht = 0;
2069
+ for (h = 0; h <= 15; h++) $[h] = 0;
2070
+ for (T = 0; T < i; T++) $[_[b + T]]++;
2071
+ for (V = X, P = 15; 1 <= P && $[P] === 0; P--) ;
2072
+ if (P < V && (V = P), P === 0) return d[n++] = 20971520, d[n++] = 20971520, s.bits = 1, 0;
2073
+ for (e = 1; e < P && $[e] === 0; e++) ;
2074
+ for (V < e && (V = e), h = W = 1; h <= 15; h++) if (W <<= 1, (W -= $[h]) < 0) return -1;
2075
+ if (0 < W && (y === 0 || P !== 1)) return -1;
2076
+ for (G[1] = 0, h = 1; h < 15; h++) G[h + 1] = G[h] + $[h];
2077
+ for (T = 0; T < i; T++) _[b + T] !== 0 && (c[G[_[b + T]]++] = T);
2078
+ if (E = y === 0 ? (I = st = c, 19) : y === 1 ? (I = o, J -= 257, st = r, ht -= 257, 256) : (I = l, st = g, -1), h = e, F = n, Q = T = B = 0, x = -1, S = (tt = 1 << (L = V)) - 1, y === 1 && 852 < tt || y === 2 && 592 < tt) return 1;
2079
+ for (; ; ) {
2080
+ for (D = h - Q, z = c[T] < E ? (C = 0, c[T]) : c[T] > E ? (C = st[ht + c[T]], I[J + c[T]]) : (C = 96, 0), m = 1 << h - Q, e = w = 1 << L; d[F + (B >> Q) + (w -= m)] = D << 24 | C << 16 | z | 0, w !== 0; ) ;
2081
+ for (m = 1 << h - 1; B & m; ) m >>= 1;
2082
+ if (m !== 0 ? (B &= m - 1, B += m) : B = 0, T++, --$[h] == 0) {
2083
+ if (h === P) break;
2084
+ h = _[b + c[T]];
2085
+ }
2086
+ if (V < h && (B & S) !== x) {
2087
+ for (Q === 0 && (Q = V), F += e, W = 1 << (L = h - Q); L + Q < P && !((W -= $[L + Q]) <= 0); ) L++, W <<= 1;
2088
+ if (tt += 1 << L, y === 1 && 852 < tt || y === 2 && 592 < tt) return 1;
2089
+ d[x = B & S] = V << 24 | L << 16 | F - n | 0;
2090
+ }
2091
+ }
2092
+ return B !== 0 && (d[F + B] = h - Q << 24 | 64 << 16 | 0), s.bits = V, 0;
2093
+ };
2094
+ }, { "../utils/common": 41 }], 51: [function(p, A, v) {
2095
+ A.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" };
2096
+ }, {}], 52: [function(p, A, v) {
2097
+ var a = p("../utils/common"), o = 0, r = 1;
2098
+ function l(u) {
2099
+ for (var k = u.length; 0 <= --k; ) u[k] = 0;
2100
+ }
2101
+ var g = 0, y = 29, _ = 256, b = _ + 1 + y, i = 30, d = 19, n = 2 * b + 1, c = 15, s = 16, m = 7, w = 256, x = 16, S = 17, F = 18, E = [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], D = [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], C = [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 2, 3, 7], z = [16, 17, 18, 0, 8, 7, 9, 6, 10, 5, 11, 4, 12, 3, 13, 2, 14, 1, 15], X = new Array(2 * (b + 2));
2102
+ l(X);
2103
+ var h = new Array(2 * i);
2104
+ l(h);
2105
+ var T = new Array(512);
2106
+ l(T);
2107
+ var e = new Array(256);
2108
+ l(e);
2109
+ var P = new Array(y);
2110
+ l(P);
2111
+ var V, L, Q, W = new Array(i);
2112
+ function tt(u, k, U, j, O) {
2113
+ this.static_tree = u, this.extra_bits = k, this.extra_base = U, this.elems = j, this.max_length = O, this.has_stree = u && u.length;
2114
+ }
2115
+ function B(u, k) {
2116
+ this.dyn_tree = u, this.max_code = 0, this.stat_desc = k;
2117
+ }
2118
+ function I(u) {
2119
+ return u < 256 ? T[u] : T[256 + (u >>> 7)];
2120
+ }
2121
+ function J(u, k) {
2122
+ u.pending_buf[u.pending++] = 255 & k, u.pending_buf[u.pending++] = k >>> 8 & 255;
2123
+ }
2124
+ function $(u, k, U) {
2125
+ u.bi_valid > s - U ? (u.bi_buf |= k << u.bi_valid & 65535, J(u, u.bi_buf), u.bi_buf = k >> s - u.bi_valid, u.bi_valid += U - s) : (u.bi_buf |= k << u.bi_valid & 65535, u.bi_valid += U);
2126
+ }
2127
+ function G(u, k, U) {
2128
+ $(u, U[2 * k], U[2 * k + 1]);
2129
+ }
2130
+ function st(u, k) {
2131
+ for (var U = 0; U |= 1 & u, u >>>= 1, U <<= 1, 0 < --k; ) ;
2132
+ return U >>> 1;
2133
+ }
2134
+ function ht(u, k, U) {
2135
+ var j, O, M = new Array(c + 1), Y = 0;
2136
+ for (j = 1; j <= c; j++) M[j] = Y = Y + U[j - 1] << 1;
2137
+ for (O = 0; O <= k; O++) {
2138
+ var H = u[2 * O + 1];
2139
+ H !== 0 && (u[2 * O] = st(M[H]++, H));
2140
+ }
2141
+ }
2142
+ function rt(u) {
2143
+ var k;
2144
+ for (k = 0; k < b; k++) u.dyn_ltree[2 * k] = 0;
2145
+ for (k = 0; k < i; k++) u.dyn_dtree[2 * k] = 0;
2146
+ for (k = 0; k < d; k++) u.bl_tree[2 * k] = 0;
2147
+ u.dyn_ltree[2 * w] = 1, u.opt_len = u.static_len = 0, u.last_lit = u.matches = 0;
2148
+ }
2149
+ function it(u) {
2150
+ 8 < u.bi_valid ? J(u, u.bi_buf) : 0 < u.bi_valid && (u.pending_buf[u.pending++] = u.bi_buf), u.bi_buf = 0, u.bi_valid = 0;
2151
+ }
2152
+ function ct(u, k, U, j) {
2153
+ var O = 2 * k, M = 2 * U;
2154
+ return u[O] < u[M] || u[O] === u[M] && j[k] <= j[U];
2155
+ }
2156
+ function ot(u, k, U) {
2157
+ for (var j = u.heap[U], O = U << 1; O <= u.heap_len && (O < u.heap_len && ct(k, u.heap[O + 1], u.heap[O], u.depth) && O++, !ct(k, j, u.heap[O], u.depth)); ) u.heap[U] = u.heap[O], U = O, O <<= 1;
2158
+ u.heap[U] = j;
2159
+ }
2160
+ function _t(u, k, U) {
2161
+ var j, O, M, Y, H = 0;
2162
+ if (u.last_lit !== 0) for (; j = u.pending_buf[u.d_buf + 2 * H] << 8 | u.pending_buf[u.d_buf + 2 * H + 1], O = u.pending_buf[u.l_buf + H], H++, j === 0 ? G(u, O, k) : (G(u, (M = e[O]) + _ + 1, k), (Y = E[M]) !== 0 && $(u, O -= P[M], Y), G(u, M = I(--j), U), (Y = D[M]) !== 0 && $(u, j -= W[M], Y)), H < u.last_lit; ) ;
2163
+ G(u, w, k);
2164
+ }
2165
+ function gt(u, k) {
2166
+ var U, j, O, M = k.dyn_tree, Y = k.stat_desc.static_tree, H = k.stat_desc.has_stree, q = k.stat_desc.elems, at = -1;
2167
+ for (u.heap_len = 0, u.heap_max = n, U = 0; U < q; U++) M[2 * U] !== 0 ? (u.heap[++u.heap_len] = at = U, u.depth[U] = 0) : M[2 * U + 1] = 0;
2168
+ for (; u.heap_len < 2; ) M[2 * (O = u.heap[++u.heap_len] = at < 2 ? ++at : 0)] = 1, u.depth[O] = 0, u.opt_len--, H && (u.static_len -= Y[2 * O + 1]);
2169
+ for (k.max_code = at, U = u.heap_len >> 1; 1 <= U; U--) ot(u, M, U);
2170
+ for (O = q; U = u.heap[1], u.heap[1] = u.heap[u.heap_len--], ot(u, M, 1), j = u.heap[1], u.heap[--u.heap_max] = U, u.heap[--u.heap_max] = j, M[2 * O] = M[2 * U] + M[2 * j], u.depth[O] = (u.depth[U] >= u.depth[j] ? u.depth[U] : u.depth[j]) + 1, M[2 * U + 1] = M[2 * j + 1] = O, u.heap[1] = O++, ot(u, M, 1), 2 <= u.heap_len; ) ;
2171
+ u.heap[--u.heap_max] = u.heap[1], function(nt, mt) {
2172
+ var xt, bt, St, lt, Ct, Bt, vt = mt.dyn_tree, Rt = mt.max_code, Mt = mt.stat_desc.static_tree, Zt = mt.stat_desc.has_stree, Xt = mt.stat_desc.extra_bits, Pt = mt.stat_desc.extra_base, Et = mt.stat_desc.max_length, zt = 0;
2173
+ for (lt = 0; lt <= c; lt++) nt.bl_count[lt] = 0;
2174
+ for (vt[2 * nt.heap[nt.heap_max] + 1] = 0, xt = nt.heap_max + 1; xt < n; xt++) Et < (lt = vt[2 * vt[2 * (bt = nt.heap[xt]) + 1] + 1] + 1) && (lt = Et, zt++), vt[2 * bt + 1] = lt, Rt < bt || (nt.bl_count[lt]++, Ct = 0, Pt <= bt && (Ct = Xt[bt - Pt]), Bt = vt[2 * bt], nt.opt_len += Bt * (lt + Ct), Zt && (nt.static_len += Bt * (Mt[2 * bt + 1] + Ct)));
2175
+ if (zt !== 0) {
2176
+ do {
2177
+ for (lt = Et - 1; nt.bl_count[lt] === 0; ) lt--;
2178
+ nt.bl_count[lt]--, nt.bl_count[lt + 1] += 2, nt.bl_count[Et]--, zt -= 2;
2179
+ } while (0 < zt);
2180
+ for (lt = Et; lt !== 0; lt--) for (bt = nt.bl_count[lt]; bt !== 0; ) Rt < (St = nt.heap[--xt]) || (vt[2 * St + 1] !== lt && (nt.opt_len += (lt - vt[2 * St + 1]) * vt[2 * St], vt[2 * St + 1] = lt), bt--);
2181
+ }
2182
+ }(u, k), ht(M, at, u.bl_count);
2183
+ }
2184
+ function t(u, k, U) {
2185
+ var j, O, M = -1, Y = k[1], H = 0, q = 7, at = 4;
2186
+ for (Y === 0 && (q = 138, at = 3), k[2 * (U + 1) + 1] = 65535, j = 0; j <= U; j++) O = Y, Y = k[2 * (j + 1) + 1], ++H < q && O === Y || (H < at ? u.bl_tree[2 * O] += H : O !== 0 ? (O !== M && u.bl_tree[2 * O]++, u.bl_tree[2 * x]++) : H <= 10 ? u.bl_tree[2 * S]++ : u.bl_tree[2 * F]++, M = O, at = (H = 0) === Y ? (q = 138, 3) : O === Y ? (q = 6, 3) : (q = 7, 4));
2187
+ }
2188
+ function N(u, k, U) {
2189
+ var j, O, M = -1, Y = k[1], H = 0, q = 7, at = 4;
2190
+ for (Y === 0 && (q = 138, at = 3), j = 0; j <= U; j++) if (O = Y, Y = k[2 * (j + 1) + 1], !(++H < q && O === Y)) {
2191
+ if (H < at) for (; G(u, O, u.bl_tree), --H != 0; ) ;
2192
+ else O !== 0 ? (O !== M && (G(u, O, u.bl_tree), H--), G(u, x, u.bl_tree), $(u, H - 3, 2)) : H <= 10 ? (G(u, S, u.bl_tree), $(u, H - 3, 3)) : (G(u, F, u.bl_tree), $(u, H - 11, 7));
2193
+ M = O, at = (H = 0) === Y ? (q = 138, 3) : O === Y ? (q = 6, 3) : (q = 7, 4);
2194
+ }
2195
+ }
2196
+ l(W);
2197
+ var R = !1;
2198
+ function f(u, k, U, j) {
2199
+ $(u, (g << 1) + (j ? 1 : 0), 3), function(O, M, Y, H) {
2200
+ it(O), J(O, Y), J(O, ~Y), a.arraySet(O.pending_buf, O.window, M, Y, O.pending), O.pending += Y;
2201
+ }(u, k, U);
2202
+ }
2203
+ v._tr_init = function(u) {
2204
+ R || (function() {
2205
+ var k, U, j, O, M, Y = new Array(c + 1);
2206
+ for (O = j = 0; O < y - 1; O++) for (P[O] = j, k = 0; k < 1 << E[O]; k++) e[j++] = O;
2207
+ for (e[j - 1] = O, O = M = 0; O < 16; O++) for (W[O] = M, k = 0; k < 1 << D[O]; k++) T[M++] = O;
2208
+ for (M >>= 7; O < i; O++) for (W[O] = M << 7, k = 0; k < 1 << D[O] - 7; k++) T[256 + M++] = O;
2209
+ for (U = 0; U <= c; U++) Y[U] = 0;
2210
+ for (k = 0; k <= 143; ) X[2 * k + 1] = 8, k++, Y[8]++;
2211
+ for (; k <= 255; ) X[2 * k + 1] = 9, k++, Y[9]++;
2212
+ for (; k <= 279; ) X[2 * k + 1] = 7, k++, Y[7]++;
2213
+ for (; k <= 287; ) X[2 * k + 1] = 8, k++, Y[8]++;
2214
+ for (ht(X, b + 1, Y), k = 0; k < i; k++) h[2 * k + 1] = 5, h[2 * k] = st(k, 5);
2215
+ V = new tt(X, E, _ + 1, b, c), L = new tt(h, D, 0, i, c), Q = new tt(new Array(0), C, 0, d, m);
2216
+ }(), R = !0), u.l_desc = new B(u.dyn_ltree, V), u.d_desc = new B(u.dyn_dtree, L), u.bl_desc = new B(u.bl_tree, Q), u.bi_buf = 0, u.bi_valid = 0, rt(u);
2217
+ }, v._tr_stored_block = f, v._tr_flush_block = function(u, k, U, j) {
2218
+ var O, M, Y = 0;
2219
+ 0 < u.level ? (u.strm.data_type === 2 && (u.strm.data_type = function(H) {
2220
+ var q, at = 4093624447;
2221
+ for (q = 0; q <= 31; q++, at >>>= 1) if (1 & at && H.dyn_ltree[2 * q] !== 0) return o;
2222
+ if (H.dyn_ltree[18] !== 0 || H.dyn_ltree[20] !== 0 || H.dyn_ltree[26] !== 0) return r;
2223
+ for (q = 32; q < _; q++) if (H.dyn_ltree[2 * q] !== 0) return r;
2224
+ return o;
2225
+ }(u)), gt(u, u.l_desc), gt(u, u.d_desc), Y = function(H) {
2226
+ var q;
2227
+ for (t(H, H.dyn_ltree, H.l_desc.max_code), t(H, H.dyn_dtree, H.d_desc.max_code), gt(H, H.bl_desc), q = d - 1; 3 <= q && H.bl_tree[2 * z[q] + 1] === 0; q--) ;
2228
+ return H.opt_len += 3 * (q + 1) + 5 + 5 + 4, q;
2229
+ }(u), O = u.opt_len + 3 + 7 >>> 3, (M = u.static_len + 3 + 7 >>> 3) <= O && (O = M)) : O = M = U + 5, U + 4 <= O && k !== -1 ? f(u, k, U, j) : u.strategy === 4 || M === O ? ($(u, 2 + (j ? 1 : 0), 3), _t(u, X, h)) : ($(u, 4 + (j ? 1 : 0), 3), function(H, q, at, nt) {
2230
+ var mt;
2231
+ for ($(H, q - 257, 5), $(H, at - 1, 5), $(H, nt - 4, 4), mt = 0; mt < nt; mt++) $(H, H.bl_tree[2 * z[mt] + 1], 3);
2232
+ N(H, H.dyn_ltree, q - 1), N(H, H.dyn_dtree, at - 1);
2233
+ }(u, u.l_desc.max_code + 1, u.d_desc.max_code + 1, Y + 1), _t(u, u.dyn_ltree, u.dyn_dtree)), rt(u), j && it(u);
2234
+ }, v._tr_tally = function(u, k, U) {
2235
+ return u.pending_buf[u.d_buf + 2 * u.last_lit] = k >>> 8 & 255, u.pending_buf[u.d_buf + 2 * u.last_lit + 1] = 255 & k, u.pending_buf[u.l_buf + u.last_lit] = 255 & U, u.last_lit++, k === 0 ? u.dyn_ltree[2 * U]++ : (u.matches++, k--, u.dyn_ltree[2 * (e[U] + _ + 1)]++, u.dyn_dtree[2 * I(k)]++), u.last_lit === u.lit_bufsize - 1;
2236
+ }, v._tr_align = function(u) {
2237
+ $(u, 2, 3), G(u, w, X), function(k) {
2238
+ k.bi_valid === 16 ? (J(k, k.bi_buf), k.bi_buf = 0, k.bi_valid = 0) : 8 <= k.bi_valid && (k.pending_buf[k.pending++] = 255 & k.bi_buf, k.bi_buf >>= 8, k.bi_valid -= 8);
2239
+ }(u);
2240
+ };
2241
+ }, { "../utils/common": 41 }], 53: [function(p, A, v) {
2242
+ A.exports = function() {
2243
+ 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;
2244
+ };
2245
+ }, {}], 54: [function(p, A, v) {
2246
+ (function(a) {
2247
+ (function(o, r) {
2248
+ if (!o.setImmediate) {
2249
+ var l, g, y, _, b = 1, i = {}, d = !1, n = o.document, c = Object.getPrototypeOf && Object.getPrototypeOf(o);
2250
+ c = c && c.setTimeout ? c : o, l = {}.toString.call(o.process) === "[object process]" ? function(x) {
2251
+ process.nextTick(function() {
2252
+ m(x);
2253
+ });
2254
+ } : function() {
2255
+ if (o.postMessage && !o.importScripts) {
2256
+ var x = !0, S = o.onmessage;
2257
+ return o.onmessage = function() {
2258
+ x = !1;
2259
+ }, o.postMessage("", "*"), o.onmessage = S, x;
2260
+ }
2261
+ }() ? (_ = "setImmediate$" + Math.random() + "$", o.addEventListener ? o.addEventListener("message", w, !1) : o.attachEvent("onmessage", w), function(x) {
2262
+ o.postMessage(_ + x, "*");
2263
+ }) : o.MessageChannel ? ((y = new MessageChannel()).port1.onmessage = function(x) {
2264
+ m(x.data);
2265
+ }, function(x) {
2266
+ y.port2.postMessage(x);
2267
+ }) : n && "onreadystatechange" in n.createElement("script") ? (g = n.documentElement, function(x) {
2268
+ var S = n.createElement("script");
2269
+ S.onreadystatechange = function() {
2270
+ m(x), S.onreadystatechange = null, g.removeChild(S), S = null;
2271
+ }, g.appendChild(S);
2272
+ }) : function(x) {
2273
+ setTimeout(m, 0, x);
2274
+ }, c.setImmediate = function(x) {
2275
+ typeof x != "function" && (x = new Function("" + x));
2276
+ for (var S = new Array(arguments.length - 1), F = 0; F < S.length; F++) S[F] = arguments[F + 1];
2277
+ var E = { callback: x, args: S };
2278
+ return i[b] = E, l(b), b++;
2279
+ }, c.clearImmediate = s;
2280
+ }
2281
+ function s(x) {
2282
+ delete i[x];
2283
+ }
2284
+ function m(x) {
2285
+ if (d) setTimeout(m, 0, x);
2286
+ else {
2287
+ var S = i[x];
2288
+ if (S) {
2289
+ d = !0;
2290
+ try {
2291
+ (function(F) {
2292
+ var E = F.callback, D = F.args;
2293
+ switch (D.length) {
2294
+ case 0:
2295
+ E();
2296
+ break;
2297
+ case 1:
2298
+ E(D[0]);
2299
+ break;
2300
+ case 2:
2301
+ E(D[0], D[1]);
2302
+ break;
2303
+ case 3:
2304
+ E(D[0], D[1], D[2]);
2305
+ break;
2306
+ default:
2307
+ E.apply(r, D);
2308
+ }
2309
+ })(S);
2310
+ } finally {
2311
+ s(x), d = !1;
2312
+ }
2313
+ }
2314
+ }
2315
+ }
2316
+ function w(x) {
2317
+ x.source === o && typeof x.data == "string" && x.data.indexOf(_) === 0 && m(+x.data.slice(_.length));
2318
+ }
2319
+ })(typeof self > "u" ? a === void 0 ? this : a : self);
2320
+ }).call(this, typeof At < "u" ? At : typeof self < "u" ? self : typeof window < "u" ? window : {});
2321
+ }, {}] }, {}, [10])(10);
2322
+ });
2323
+ })(jt);
2324
+ var Vt = jt.exports;
2325
+ const Kt = /* @__PURE__ */ Yt(Vt);
2326
+ function qt() {
2327
+ const [Z, K] = ft(""), [p, A] = ft(!1), [v, a] = ft(""), [o, r] = ft(null);
2328
+ let l = "", g = "";
2329
+ const y = yt(null), _ = yt(null), b = {}, i = [
2330
+ "text/html",
2331
+ "text/xml",
2332
+ "application/xml",
2333
+ "application/xhtml+xml",
2334
+ "image/svg+xml"
2335
+ ], d = Tt(
2336
+ async (C) => {
2337
+ A(!0), K(""), a("Loading..."), r(null), _.current && (document.head.removeChild(_.current), URL.revokeObjectURL(_.current.href), _.current = null);
2338
+ try {
2339
+ let z;
2340
+ if (typeof C == "string") {
2341
+ const X = await fetch(C);
2342
+ if (!X.ok)
2343
+ throw new Error(
2344
+ `HTTP error! status: ${X.status} ${X.statusText}`
2345
+ );
2346
+ z = await X.arrayBuffer();
2347
+ } else C instanceof File ? z = await C.arrayBuffer() : z = C;
2348
+ if (!z || z.byteLength === 0)
2349
+ throw new Error(
2350
+ "EPUB source is empty or could not be read."
2351
+ );
2352
+ y.current = await Kt.loadAsync(z), await n();
2353
+ } catch (z) {
2354
+ const X = z instanceof Error ? z.message : "An unknown error occurred while fetching or loading the EPUB.";
2355
+ console.error("Error processing EPUB source:", z), r(X), K(""), a(""), A(!1);
2356
+ }
2357
+ },
2358
+ // eslint-disable-next-line
2359
+ []
2360
+ );
2361
+ async function n() {
2362
+ if (!y.current) throw new Error("Zip not loaded");
2363
+ const z = y.current.file("META-INF/container.xml");
2364
+ if (!z)
2365
+ throw new Error("META-INF/container.xml not found.");
2366
+ const X = await z.async("text"), h = c(X);
2367
+ if (!h)
2368
+ throw new Error("OPF file path not found in container.xml.");
2369
+ l = h.substring(0, h.lastIndexOf("/") + 1);
2370
+ const T = y.current.file(h);
2371
+ if (!T) throw new Error(`OPF file not found at path: ${h}`);
2372
+ const e = await T.async("text"), V = new DOMParser().parseFromString(e, "application/xml"), L = V.querySelector("parsererror");
2373
+ if (L)
2374
+ throw new Error(
2375
+ `Error parsing OPF file: ${L.textContent || "Unknown XML parse error"}`
2376
+ );
2377
+ s(V), await m(V);
2378
+ }
2379
+ function c(C) {
2380
+ const h = new DOMParser().parseFromString(
2381
+ C,
2382
+ "application/xml"
2383
+ ).querySelector(
2384
+ 'rootfile[media-type="application/oebps-package+xml"]'
2385
+ );
2386
+ return (h == null ? void 0 : h.getAttribute("full-path")) ?? null;
2387
+ }
2388
+ function s(C) {
2389
+ const z = C.querySelector("metadata > dc\\:title") || C.querySelector("metadata > title");
2390
+ a((z == null ? void 0 : z.textContent) || "Untitled Book");
2391
+ }
2392
+ async function m(C) {
2393
+ if (!y.current) return;
2394
+ const z = {};
2395
+ C.querySelectorAll("manifest > item").forEach((e) => {
2396
+ const P = e.getAttribute("id"), V = e.getAttribute("href"), L = e.getAttribute("media-type");
2397
+ P && V && L && (z[P] = { href: decodeURIComponent(V), type: L });
2398
+ });
2399
+ const X = Array.from(
2400
+ C.querySelectorAll("spine > itemref")
2401
+ ).map((e) => e.getAttribute("idref"));
2402
+ let h = "";
2403
+ const T = /* @__PURE__ */ new Set();
2404
+ for (const e of X) {
2405
+ if (!e) continue;
2406
+ const P = z[e];
2407
+ if (P) {
2408
+ const V = l + P.href, L = y.current.file(V);
2409
+ if (L && (P.type.includes("html") || P.type.includes("xml")))
2410
+ try {
2411
+ const Q = await L.async("text"), W = await w(
2412
+ Q,
2413
+ P.type
2414
+ );
2415
+ h += `<div class="bok-chapter">${W}</div>`;
2416
+ } catch (Q) {
2417
+ console.warn(
2418
+ `Failed to process spine item ${V}:`,
2419
+ Q
2420
+ );
2421
+ }
2422
+ }
2423
+ }
2424
+ for (const e in z) {
2425
+ const P = z[e];
2426
+ if (P.type.includes("css")) {
2427
+ const V = l + P.href;
2428
+ if (!T.has(V)) {
2429
+ const L = y.current.file(V);
2430
+ if (L)
2431
+ try {
2432
+ g += await L.async("text") + `
2433
+ `, T.add(V);
2434
+ } catch (Q) {
2435
+ console.warn(`Failed to load CSS ${V}:`, Q);
2436
+ }
2437
+ }
2438
+ }
2439
+ }
2440
+ D(), K(h);
2441
+ }
2442
+ async function w(C, z) {
2443
+ let X = [...C.matchAll(/<style[^>]*>([\s\S]*?)<\/style>/gi)].map((T) => T[1]).join(`
2444
+ `);
2445
+ X = x(X), g += X;
2446
+ let h = C.replace(/<style[^>]*>[\s\S]*?<\/style>/gi, "");
2447
+ return h = await S(h, z), h;
2448
+ }
2449
+ function x(C) {
2450
+ const z = [
2451
+ "background-color",
2452
+ "color",
2453
+ "font-size",
2454
+ "font-family",
2455
+ "font-weight",
2456
+ "line-height",
2457
+ "text-align"
2458
+ ];
2459
+ return C.split(/}/).map((X) => {
2460
+ const h = X.split(/{/), T = h[0], e = h[1];
2461
+ if (!e) return "";
2462
+ const P = e.split(/;/).map((V) => V.trim()).filter((V) => V ? !z.some(
2463
+ (L) => new RegExp(`^${L}s*:`, "i").test(V)
2464
+ ) : !1).join("; ");
2465
+ return P ? `${T.trim()} { ${P}; }` : "";
2466
+ }).filter((X) => !!X).join(`
2467
+ `);
2468
+ }
2469
+ async function S(C, z) {
2470
+ const X = new DOMParser();
2471
+ if (i.includes(z))
2472
+ try {
2473
+ const h = X.parseFromString(
2474
+ C,
2475
+ z
2476
+ ), T = h.querySelector("parsererror");
2477
+ if (T)
2478
+ return console.warn(
2479
+ "Parser error in content item during cleanImages, skipping.",
2480
+ T.textContent
2481
+ ), C;
2482
+ const e = h.querySelectorAll("img");
2483
+ for (const Q of e)
2484
+ await F(Q);
2485
+ const P = h.querySelectorAll("image");
2486
+ for (const Q of P)
2487
+ await E(Q);
2488
+ return new XMLSerializer().serializeToString(
2489
+ h.documentElement || h
2490
+ );
2491
+ } catch (h) {
2492
+ return console.error(
2493
+ "Error during cleanImages DOM processing:",
2494
+ h
2495
+ ), C;
2496
+ }
2497
+ else return C;
2498
+ }
2499
+ async function F(C) {
2500
+ var X;
2501
+ let z = C.getAttribute("src");
2502
+ if (z) {
2503
+ for (; z.startsWith(".") || z.startsWith("/"); ) z = z.slice(1);
2504
+ if (z = l + z, b[z] === void 0) {
2505
+ const h = (X = y.current) == null ? void 0 : X.file(z);
2506
+ if (h)
2507
+ try {
2508
+ const T = await h.async("blob"), e = URL.createObjectURL(T);
2509
+ b[z] = e;
2510
+ } catch (T) {
2511
+ console.warn(
2512
+ `Could not load image blob (formatImg) ${z}:`,
2513
+ T
2514
+ ), b[z] = "";
2515
+ }
2516
+ else
2517
+ console.warn(`Image file not found in zip (formatImg): ${z}`), b[z] = "";
2518
+ }
2519
+ C.setAttribute("src", b[z]);
2520
+ }
2521
+ }
2522
+ async function E(C) {
2523
+ var X;
2524
+ let z = C.getAttribute("xlink:href");
2525
+ if (z) {
2526
+ for (; z.startsWith(".") || z.startsWith("/"); ) z = z.slice(1);
2527
+ if (z = l + z, b[z] === void 0) {
2528
+ const h = (X = y.current) == null ? void 0 : X.file(z);
2529
+ if (h)
2530
+ try {
2531
+ const T = await h.async("blob"), e = URL.createObjectURL(T);
2532
+ b[z] = e;
2533
+ } catch (T) {
2534
+ console.warn(
2535
+ `Could not load image blob (formatXMLImage) ${z}:`,
2536
+ T
2537
+ ), b[z] = "";
2538
+ }
2539
+ else
2540
+ console.warn(
2541
+ `Image file not found in zip (formatXMLImage): ${z}`
2542
+ ), b[z] = "";
2543
+ }
2544
+ C.setAttribute("xlink:href", b[z]);
2545
+ }
2546
+ }
2547
+ function D() {
2548
+ if (!g.trim()) return;
2549
+ const C = new Blob([g], { type: "text/css" }), z = URL.createObjectURL(C);
2550
+ _.current = document.createElement("link"), _.current.href = z, _.current.rel = "stylesheet", _.current.setAttribute("data-bok-reader-style", "true"), document.head.appendChild(_.current);
2551
+ }
2552
+ return {
2553
+ title: v,
2554
+ rawContent: Z,
2555
+ isLoading: p,
2556
+ error: o,
2557
+ loadEpub: d,
2558
+ setIsLoading: A
2559
+ };
2560
+ }
2561
+ function Wt(Z) {
2562
+ const [K, p] = ft({
2563
+ width: 0,
2564
+ height: 0,
2565
+ noOfPages: 1
2566
+ });
2567
+ return ut(() => {
2568
+ const A = Z == null ? void 0 : Z.current, v = () => {
2569
+ if (A) {
2570
+ const a = A.getBoundingClientRect(), o = a.height < a.width;
2571
+ p((r) => {
2572
+ const l = o ? a.width / 2 : a.width, g = a.height, y = o ? 2 : 1;
2573
+ return r.width !== l || r.height !== g || r.noOfPages !== y ? {
2574
+ width: l,
2575
+ height: g,
2576
+ noOfPages: y
2577
+ } : r;
2578
+ });
2579
+ } else
2580
+ p({ width: 0, height: 0, noOfPages: 1 });
2581
+ };
2582
+ if (A) {
2583
+ v();
2584
+ const a = new ResizeObserver(v);
2585
+ return a.observe(A), () => {
2586
+ a.unobserve(A);
2587
+ };
2588
+ }
2589
+ }, [Z]), [K.width, K.height, K.noOfPages];
2590
+ }
2591
+ function Jt(Z) {
2592
+ const [K, p] = ft(0), A = Tt(() => {
2593
+ if (Z.current) {
2594
+ const v = Z.current.scrollWidth, a = Z.current.scrollLeft, o = v > 0 ? a / v : 0;
2595
+ p(o);
2596
+ }
2597
+ }, [Z]);
2598
+ return ut(() => {
2599
+ const v = Z.current;
2600
+ if (!v) return;
2601
+ let a = null;
2602
+ const o = 100, r = () => {
2603
+ a && clearTimeout(a), a = setTimeout(() => {
2604
+ A();
2605
+ }, o);
2606
+ };
2607
+ return v.addEventListener("scroll", r), A(), () => {
2608
+ a && clearTimeout(a), v.removeEventListener("scroll", r);
2609
+ };
2610
+ }, [A, Z]), [K, p];
2611
+ }
2612
+ function Qt(Z, K, p, A, v) {
2613
+ let a = "";
2614
+ ut(() => {
2615
+ K > 1e-7 && (a = JSON.stringify({
2616
+ percentRead: K,
2617
+ padding: p,
2618
+ fontSize: A,
2619
+ fontFamily: v
2620
+ }), localStorage.setItem(Z, a));
2621
+ }, [Z, K, p, A, v]);
2622
+ }
2623
+ const te = (Z, K, p, A) => {
2624
+ const [v, a] = Wt(p), o = yt(null), r = yt(""), l = Tt(
2625
+ (g, y) => {
2626
+ !K && !A && (g / v <= 0.4 && y / a < 0.8 && Z(-1), g / v > 0.4 && y / a < 0.8 && Z(1));
2627
+ },
2628
+ [Z, K, v, a]
2629
+ );
2630
+ ut(() => {
2631
+ const g = () => {
2632
+ var _;
2633
+ const y = (_ = window.getSelection()) == null ? void 0 : _.toString();
2634
+ y && y.length > 0 ? r.current = y : r.current = "";
2635
+ };
2636
+ return document.addEventListener("selectionchange", g), () => {
2637
+ document.removeEventListener("selectionchange", g);
2638
+ };
2639
+ }, []), ut(() => {
2640
+ const g = () => {
2641
+ o.current = window.setTimeout(() => {
2642
+ o.current = null;
2643
+ }, 500);
2644
+ }, y = (_) => {
2645
+ if (o.current && r.current) {
2646
+ clearTimeout(o.current), o.current = null;
2647
+ const { pageX: b, pageY: i } = _.touches[0];
2648
+ l(b, i);
2649
+ }
2650
+ };
2651
+ return window.addEventListener("touchstart", g), window.addEventListener("touchend", y), () => {
2652
+ window.removeEventListener("touchstart", g), window.removeEventListener("touchend", y);
2653
+ };
2654
+ }, [v, l]), ut(() => {
2655
+ const g = p.current, y = () => {
2656
+ o.current = window.setTimeout(() => {
2657
+ }, 200);
2658
+ }, _ = (b) => {
2659
+ o.current && !r.current && (clearTimeout(o.current), o.current = null, l(b.clientX, b.clientY));
2660
+ };
2661
+ return g == null || g.addEventListener("mousedown", y), g == null || g.addEventListener("mouseup", _), () => {
2662
+ g == null || g.removeEventListener("mousedown", y), g == null || g.removeEventListener("mouseup", _);
2663
+ };
2664
+ }, [v, K, l, p]);
2665
+ };
2666
+ function ee({ currentPage: Z, pages: K }) {
2667
+ return /* @__PURE__ */ pt("div", { className: "page-number", children: [
2668
+ Z + 1,
2669
+ "/",
2670
+ K
2671
+ ] });
2672
+ }
2673
+ function re({
2674
+ content: Z,
2675
+ title: K,
2676
+ setIsLoading: p,
2677
+ fontSize: A,
2678
+ sidePadding: v,
2679
+ fontFamily: a,
2680
+ isOptionMenuVisible: o,
2681
+ setFontSize: r,
2682
+ setPadding: l,
2683
+ setFontFamily: g,
2684
+ containerElementRef: y,
2685
+ showTutorial: _
2686
+ }) {
2687
+ const b = yt(null), [i, d, n] = Wt(y), [c, s] = Jt(b), [m, w] = ft(1), [x, S] = ft(0);
2688
+ Qt(K, c, v, A, a);
2689
+ const F = Tt(
2690
+ (E) => {
2691
+ w((D) => {
2692
+ const C = b.current;
2693
+ if (C && x > 0 && n > 0 && C.clientWidth > 0) {
2694
+ let z = D + E;
2695
+ return z < 0 && (z = 0), z >= x && (z = x - 1), C.scroll({
2696
+ left: z * i * n,
2697
+ behavior: "smooth"
2698
+ }), z;
2699
+ }
2700
+ return D;
2701
+ });
2702
+ },
2703
+ [i, x, n]
2704
+ );
2705
+ return te(
2706
+ F,
2707
+ o,
2708
+ y,
2709
+ _
2710
+ ), ut(() => {
2711
+ if (!K) return;
2712
+ const E = localStorage.getItem(K);
2713
+ if (E)
2714
+ try {
2715
+ const D = JSON.parse(E);
2716
+ D && (s(D.percentRead || 0), D.fontSize !== void 0 && r(D.fontSize), D.padding !== void 0 && l(D.padding), D.fontFamily !== void 0 && g(D.fontFamily));
2717
+ } catch (D) {
2718
+ console.error("Failed to parse local storage for", K, D), s(0);
2719
+ }
2720
+ else
2721
+ s(0);
2722
+ w(1);
2723
+ }, [K, s, r, l, g]), ut(() => {
2724
+ const E = b.current;
2725
+ if (!E || i <= 0 || d <= 0) return;
2726
+ p(!0);
2727
+ const D = setTimeout(() => {
2728
+ E.style.setProperty(
2729
+ "--side-padding",
2730
+ `${v}px`
2731
+ ), E.style.setProperty("--font-size", `${A}em`), E.style.setProperty("--font-family", a), E.style.maxHeight = `${d}px`;
2732
+ const C = E.scrollWidth, z = i > 0 && C > 0 ? Math.round(C / i) : 0, X = n === 1 ? z : Math.round(z / 2);
2733
+ if (S(X), X > 0 && E.clientWidth > 0) {
2734
+ let h = Math.round(X * c);
2735
+ h = Math.max(
2736
+ 0,
2737
+ Math.min(X - 1, h)
2738
+ ), m !== h && (w(h), E.scrollLeft = h * i * n);
2739
+ } else
2740
+ p(!1), w(1);
2741
+ p(!1);
2742
+ }, 400);
2743
+ return () => {
2744
+ clearTimeout(D);
2745
+ };
2746
+ }, [
2747
+ i,
2748
+ d,
2749
+ v,
2750
+ A,
2751
+ a,
2752
+ n,
2753
+ Z,
2754
+ K,
2755
+ p
2756
+ ]), ut(() => {
2757
+ const E = (D) => {
2758
+ D.key === "ArrowLeft" ? (D.preventDefault(), F(-1)) : D.key === "ArrowRight" && (D.preventDefault(), F(1));
2759
+ };
2760
+ return document.addEventListener("keydown", E), () => {
2761
+ document.removeEventListener("keydown", E);
2762
+ };
2763
+ }, [F, i, c]), /* @__PURE__ */ pt(Lt, { children: [
2764
+ /* @__PURE__ */ et(
2765
+ "div",
2766
+ {
2767
+ ref: b,
2768
+ dangerouslySetInnerHTML: { __html: Z },
2769
+ className: "book-page"
2770
+ }
2771
+ ),
2772
+ /* @__PURE__ */ et(ee, { pages: x, currentPage: m })
2773
+ ] });
2774
+ }
2775
+ var ne = {
2776
+ cm: !0,
2777
+ mm: !0,
2778
+ in: !0,
2779
+ px: !0,
2780
+ pt: !0,
2781
+ pc: !0,
2782
+ em: !0,
2783
+ ex: !0,
2784
+ ch: !0,
2785
+ rem: !0,
2786
+ vw: !0,
2787
+ vh: !0,
2788
+ vmin: !0,
2789
+ vmax: !0,
2790
+ "%": !0
2791
+ };
2792
+ function ie(Z) {
2793
+ if (typeof Z == "number")
2794
+ return {
2795
+ value: Z,
2796
+ unit: "px"
2797
+ };
2798
+ var K, p = (Z.match(/^[0-9.]*/) || "").toString();
2799
+ p.includes(".") ? K = parseFloat(p) : K = parseInt(p, 10);
2800
+ var A = (Z.match(/[^0-9]*$/) || "").toString();
2801
+ return ne[A] ? {
2802
+ value: K,
2803
+ unit: A
2804
+ } : (console.warn("React Spinners: ".concat(Z, " is not a valid css value. Defaulting to ").concat(K, "px.")), {
2805
+ value: K,
2806
+ unit: "px"
2807
+ });
2808
+ }
2809
+ var kt = function(Z, K, p) {
2810
+ var A = "react-spinners-".concat(Z, "-").concat(p);
2811
+ if (typeof window > "u" || !window.document)
2812
+ return A;
2813
+ var v = document.createElement("style");
2814
+ document.head.appendChild(v);
2815
+ var a = v.sheet, o = `
2816
+ @keyframes `.concat(A, ` {
2817
+ `).concat(K, `
2818
+ }
2819
+ `);
2820
+ return a && a.insertRule(o, 0), A;
2821
+ }, It = function() {
2822
+ return It = Object.assign || function(Z) {
2823
+ for (var K, p = 1, A = arguments.length; p < A; p++) {
2824
+ K = arguments[p];
2825
+ for (var v in K) Object.prototype.hasOwnProperty.call(K, v) && (Z[v] = K[v]);
2826
+ }
2827
+ return Z;
2828
+ }, It.apply(this, arguments);
2829
+ }, ae = function(Z, K) {
2830
+ var p = {};
2831
+ for (var A in Z) Object.prototype.hasOwnProperty.call(Z, A) && K.indexOf(A) < 0 && (p[A] = Z[A]);
2832
+ if (Z != null && typeof Object.getOwnPropertySymbols == "function")
2833
+ for (var v = 0, A = Object.getOwnPropertySymbols(Z); v < A.length; v++)
2834
+ K.indexOf(A[v]) < 0 && Object.prototype.propertyIsEnumerable.call(Z, A[v]) && (p[A[v]] = Z[A[v]]);
2835
+ return p;
2836
+ }, dt = [1, 3, 5], se = [
2837
+ kt("PropagateLoader", "25% {transform: translateX(-".concat(dt[0], `rem) scale(0.75)}
2838
+ 50% {transform: translateX(-`).concat(dt[1], `rem) scale(0.6)}
2839
+ 75% {transform: translateX(-`).concat(dt[2], `rem) scale(0.5)}
2840
+ 95% {transform: translateX(0rem) scale(1)}`), "propogate-0"),
2841
+ kt("PropagateLoader", "25% {transform: translateX(-".concat(dt[0], `rem) scale(0.75)}
2842
+ 50% {transform: translateX(-`).concat(dt[1], `rem) scale(0.6)}
2843
+ 75% {transform: translateX(-`).concat(dt[1], `rem) scale(0.6)}
2844
+ 95% {transform: translateX(0rem) scale(1)}`), "propogate-1"),
2845
+ kt("PropagateLoader", "25% {transform: translateX(-".concat(dt[0], `rem) scale(0.75)}
2846
+ 75% {transform: translateX(-`).concat(dt[0], `rem) scale(0.75)}
2847
+ 95% {transform: translateX(0rem) scale(1)}`), "propogate-2"),
2848
+ kt("PropagateLoader", "25% {transform: translateX(".concat(dt[0], `rem) scale(0.75)}
2849
+ 75% {transform: translateX(`).concat(dt[0], `rem) scale(0.75)}
2850
+ 95% {transform: translateX(0rem) scale(1)}`), "propogate-3"),
2851
+ kt("PropagateLoader", "25% {transform: translateX(".concat(dt[0], `rem) scale(0.75)}
2852
+ 50% {transform: translateX(`).concat(dt[1], `rem) scale(0.6)}
2853
+ 75% {transform: translateX(`).concat(dt[1], `rem) scale(0.6)}
2854
+ 95% {transform: translateX(0rem) scale(1)}`), "propogate-4"),
2855
+ kt("PropagateLoader", "25% {transform: translateX(".concat(dt[0], `rem) scale(0.75)}
2856
+ 50% {transform: translateX(`).concat(dt[1], `rem) scale(0.6)}
2857
+ 75% {transform: translateX(`).concat(dt[2], `rem) scale(0.5)}
2858
+ 95% {transform: translateX(0rem) scale(1)}`), "propogate-5")
2859
+ ];
2860
+ function oe(Z) {
2861
+ var K = Z.loading, p = K === void 0 ? !0 : K, A = Z.color, v = A === void 0 ? "#000000" : A, a = Z.speedMultiplier, o = a === void 0 ? 1 : a, r = Z.cssOverride, l = r === void 0 ? {} : r, g = Z.size, y = g === void 0 ? 15 : g, _ = ae(Z, ["loading", "color", "speedMultiplier", "cssOverride", "size"]), b = ie(y), i = b.value, d = b.unit, n = It({ display: "inherit", position: "relative" }, l), c = function(s) {
2862
+ return {
2863
+ position: "absolute",
2864
+ fontSize: "".concat(i / 3).concat(d),
2865
+ width: "".concat(i).concat(d),
2866
+ height: "".concat(i).concat(d),
2867
+ background: v,
2868
+ borderRadius: "50%",
2869
+ animation: "".concat(se[s], " ").concat(1.5 / o, "s infinite"),
2870
+ animationFillMode: "forwards"
2871
+ };
2872
+ };
2873
+ return p ? wt.createElement(
2874
+ "span",
2875
+ It({ style: n }, _),
2876
+ wt.createElement("span", { style: c(0) }),
2877
+ wt.createElement("span", { style: c(1) }),
2878
+ wt.createElement("span", { style: c(2) }),
2879
+ wt.createElement("span", { style: c(3) }),
2880
+ wt.createElement("span", { style: c(4) }),
2881
+ wt.createElement("span", { style: c(5) })
2882
+ ) : null;
2883
+ }
2884
+ const Ft = {
2885
+ "loading-screen": "_loading-screen_42072_1",
2886
+ "loading-screen-gon": "_loading-screen-gon_42072_18"
2887
+ };
2888
+ function le({
2889
+ isLoading: Z,
2890
+ color: K
2891
+ }) {
2892
+ return /* @__PURE__ */ et(
2893
+ "div",
2894
+ {
2895
+ className: Z ? Ft["loading-screen"] : Ft["loading-screen-gon"],
2896
+ children: /* @__PURE__ */ et("div", { children: /* @__PURE__ */ et(
2897
+ oe,
2898
+ {
2899
+ color: K || "red"
2900
+ }
2901
+ ) })
2902
+ }
2903
+ );
2904
+ }
2905
+ function ce() {
2906
+ document.fullscreenElement ? document.exitFullscreen && document.exitFullscreen() : document.documentElement.requestFullscreen();
2907
+ }
2908
+ function ue({
2909
+ onClose: Z,
2910
+ fontSize: K,
2911
+ padding: p,
2912
+ fontFamily: A,
2913
+ setFontSize: v,
2914
+ setPadding: a,
2915
+ setFontFamily: o,
2916
+ supportedFonts: r
2917
+ }) {
2918
+ const [l, g] = ft(!1), [y, _] = ft(!1), b = yt(null), i = yt(null), d = [
2919
+ { displayName: "System Default", name: "system-ui" },
2920
+ ...r
2921
+ ];
2922
+ ut(() => {
2923
+ const E = setTimeout(() => {
2924
+ _(!0);
2925
+ }, 0);
2926
+ return () => clearTimeout(E);
2927
+ }, []);
2928
+ const n = () => {
2929
+ _(!1), g(!0);
2930
+ };
2931
+ ut(() => {
2932
+ if (l) {
2933
+ const E = setTimeout(() => {
2934
+ Z();
2935
+ }, 300);
2936
+ return () => clearTimeout(E);
2937
+ }
2938
+ }, [l, Z]);
2939
+ const c = () => {
2940
+ n();
2941
+ }, s = (E) => {
2942
+ E.stopPropagation();
2943
+ }, m = (E) => {
2944
+ E.current && (E.current.classList.add("value-changed"), setTimeout(() => {
2945
+ E.current && E.current.classList.remove("value-changed");
2946
+ }, 300));
2947
+ }, w = () => {
2948
+ p <= 70 && (a((E) => E + 5), m(i));
2949
+ }, x = () => {
2950
+ p - 5 > 0 && (a((E) => E - 5), m(i));
2951
+ }, S = () => {
2952
+ K < 3 && (v((E) => E + 0.2), m(b));
2953
+ }, F = () => {
2954
+ K - 0.2 > 0.6 && (v((E) => E - 0.2), m(b));
2955
+ };
2956
+ return /* @__PURE__ */ et(
2957
+ "div",
2958
+ {
2959
+ className: `options-menu-overlay ${l ? "fade-out" : ""}`,
2960
+ onClick: c,
2961
+ children: /* @__PURE__ */ pt(
2962
+ "div",
2963
+ {
2964
+ className: `options-menu ${y ? "visible" : ""} ${l ? "slide-down" : ""}`,
2965
+ onClick: s,
2966
+ children: [
2967
+ /* @__PURE__ */ et("button", { onClick: n, className: "close-button", children: "✕" }),
2968
+ /* @__PURE__ */ et("h2", { children: "Reader Options" }),
2969
+ /* @__PURE__ */ pt("div", { className: "options-buttons", children: [
2970
+ /* @__PURE__ */ pt("div", { className: "font-family-buttons", children: [
2971
+ /* @__PURE__ */ et(
2972
+ "select",
2973
+ {
2974
+ value: A,
2975
+ onChange: (E) => {
2976
+ for (const D of d)
2977
+ D.name === E.target.value && o(E.target.value);
2978
+ },
2979
+ children: d.map((E) => /* @__PURE__ */ et(
2980
+ "option",
2981
+ {
2982
+ value: E.name,
2983
+ children: E.displayName
2984
+ },
2985
+ E.displayName
2986
+ ))
2987
+ }
2988
+ ),
2989
+ /* @__PURE__ */ et("div", { className: "option-label", children: "Font family" })
2990
+ ] }),
2991
+ /* @__PURE__ */ pt("div", { className: "padding-buttons", children: [
2992
+ /* @__PURE__ */ et("button", { onClick: w, children: "+" }),
2993
+ /* @__PURE__ */ et("button", { onClick: x, children: "-" }),
2994
+ /* @__PURE__ */ pt("div", { children: [
2995
+ /* @__PURE__ */ et("span", { className: "option-label", children: "Side padding: " }),
2996
+ /* @__PURE__ */ et(
2997
+ "span",
2998
+ {
2999
+ ref: i,
3000
+ className: "option-value",
3001
+ children: p
3002
+ }
3003
+ )
3004
+ ] })
3005
+ ] }),
3006
+ /* @__PURE__ */ pt("div", { className: "font-buttons", children: [
3007
+ /* @__PURE__ */ et("button", { onClick: S, children: "+" }),
3008
+ /* @__PURE__ */ et("button", { onClick: F, children: "-" }),
3009
+ /* @__PURE__ */ pt("div", { style: { marginLeft: "auto" }, children: [
3010
+ /* @__PURE__ */ et("span", { className: "option-label", children: "Font size: " }),
3011
+ /* @__PURE__ */ et("span", { ref: b, className: "option-value", children: Math.round(K * 10) })
3012
+ ] })
3013
+ ] }),
3014
+ /* @__PURE__ */ et("button", { onClick: ce, children: "Toggle fullscreen" })
3015
+ ] })
3016
+ ]
3017
+ }
3018
+ )
3019
+ }
3020
+ );
3021
+ }
3022
+ const he = Ut.div`
3023
+ position: absolute;
3024
+ top: 0;
3025
+ left: 0;
3026
+ width: 100%;
3027
+ height: 100%;
3028
+ background: rgba(0, 0, 0, 0.55);
3029
+ z-index: 2000;
3030
+ pointer-events: auto;
3031
+ overflow: hidden;
3032
+ opacity: 1;
3033
+ transition: opacity 0.35s ease;
3034
+ &.fade-out {
3035
+ opacity: 0;
3036
+ pointer-events: none;
3037
+ }
3038
+
3039
+ .tap-circle {
3040
+ position: absolute;
3041
+ width: 54px;
3042
+ height: 54px;
3043
+ border-radius: 50%;
3044
+ border: 3px solid ${({ color: Z }) => Z || "#4fc3f7"};
3045
+ background: ${({ color: Z }) => Z || "#4fc3f7"};
3046
+ box-shadow: 0 0 16px 0 ${({ color: Z }) => Z || "#4fc3f7"}55;
3047
+ display: flex;
3048
+ align-items: center;
3049
+ justify-content: center;
3050
+ z-index: 2;
3051
+ pointer-events: none;
3052
+ opacity: 0.95;
3053
+ }
3054
+ .tap-circle.right {
3055
+ right: 18px;
3056
+ top: 50%;
3057
+ transform: translateY(-50%);
3058
+ }
3059
+ .tap-circle.left {
3060
+ left: 18px;
3061
+ top: 50%;
3062
+ transform: translateY(-50%);
3063
+ }
3064
+ .tap-circle.bottom {
3065
+ left: 50%;
3066
+ bottom: 32px;
3067
+ transform: translateX(-50%);
3068
+ }
3069
+ .tutorial-label {
3070
+ position: absolute;
3071
+ color: ${({ color: Z }) => Z || "#4fc3f7"};
3072
+ font-size: 1.1em;
3073
+ font-weight: 500;
3074
+ background: rgba(0, 0, 0, 0.7);
3075
+ padding: 0.5em 1.1em;
3076
+ border-radius: 1.2em;
3077
+ z-index: 3;
3078
+ pointer-events: none;
3079
+ white-space: nowrap;
3080
+ }
3081
+ .tutorial-label.right {
3082
+ right: 90px;
3083
+ top: 47%;
3084
+ transform: none;
3085
+ }
3086
+ .tutorial-label.left {
3087
+ left: 90px;
3088
+ top: 47%;
3089
+ transform: none;
3090
+ }
3091
+ .tutorial-label.bottom {
3092
+ left: 50%;
3093
+ bottom: 110px;
3094
+ transform: translateX(-50%);
3095
+ }
3096
+ .tutorial-svg {
3097
+ position: absolute;
3098
+ top: 0;
3099
+ left: 0;
3100
+ width: 100%;
3101
+ height: 100%;
3102
+ pointer-events: none;
3103
+ z-index: 1;
3104
+ }
3105
+ .dismiss {
3106
+ position: absolute;
3107
+ left: 50%;
3108
+ top: 16%;
3109
+ text-align: center;
3110
+ padding: 0.5em 1.1em;
3111
+ transform: translateX(-50%);
3112
+ font-size: 1em;
3113
+ color: #fff;
3114
+ opacity: 0.8;
3115
+ background: rgba(0, 0, 0, 0.7);
3116
+ z-index: 10;
3117
+ pointer-events: none;
3118
+ }
3119
+ @media (max-width: 600px) {
3120
+ .tap-circle.right {
3121
+ top: 44%;
3122
+ }
3123
+ .tutorial-label.right {
3124
+ top: 41%;
3125
+ }
3126
+ .tap-circle.left {
3127
+ top: 56%;
3128
+ }
3129
+ .tutorial-label.left {
3130
+ top: 53%;
3131
+ }
3132
+ }
3133
+ `, de = ({
3134
+ color: Z,
3135
+ onDismiss: K
3136
+ }) => {
3137
+ const [p, A] = Ht.useState(!1);
3138
+ return /* @__PURE__ */ pt(
3139
+ he,
3140
+ {
3141
+ color: Z,
3142
+ onClick: () => {
3143
+ A(!0), setTimeout(K, 350);
3144
+ },
3145
+ className: p ? "fade-out" : "",
3146
+ children: [
3147
+ /* @__PURE__ */ et("div", { className: "tap-circle right" }),
3148
+ /* @__PURE__ */ et("div", { className: "tap-circle left" }),
3149
+ /* @__PURE__ */ et("div", { className: "tap-circle bottom" }),
3150
+ /* @__PURE__ */ et("div", { className: "tutorial-label right", children: "scroll right" }),
3151
+ /* @__PURE__ */ et("div", { className: "tutorial-label left", children: "scroll left" }),
3152
+ /* @__PURE__ */ et("div", { className: "tutorial-label bottom", children: "open settings" }),
3153
+ /* @__PURE__ */ et("div", { className: "dismiss", children: "Tap anywhere to continue" })
3154
+ ]
3155
+ }
3156
+ );
3157
+ }, Dt = $t`
3158
+ .bok-reader-container {
3159
+ font-family: system-ui, Avenir, Helvetica, Arial, sans-serif;
3160
+ line-height: 1.5;
3161
+ font-weight: 400;
3162
+ text-align: justify;
3163
+ color-scheme: dark light;
3164
+ color: rgb(215, 215, 215) !important;
3165
+ background-color: black;
3166
+ height: 100%;
3167
+ width: 100%;
3168
+ overflow: hidden;
3169
+ scrollbar-width: none;
3170
+ -ms-overflow-style: none;
3171
+ &::-webkit-scrollbar { display: none; }
3172
+ font-synthesis: none;
3173
+ text-rendering: optimizeLegibility;
3174
+ -webkit-font-smoothing: antialiased;
3175
+ -moz-osx-font-smoothing: grayscale;
3176
+ container-type: size;
3177
+
3178
+ .book-page {
3179
+ margin: 0;
3180
+ font-family: var(--font-family);
3181
+ padding: var(--top-padding) var(--side-padding) var(--bottom-padding);
3182
+ height: 100%;
3183
+ text-shadow: 2px 2px 5px rgba(0, 0, 0);
3184
+ font-size: var(--font-size);
3185
+
3186
+ column-gap: calc(2 * var(--side-padding));
3187
+ -webkit-column-fill: auto;
3188
+ // column-fill: auto; // MUST be auto for scrollWidth calculation to be correct
3189
+ -webkit-column-gap: calc(2 * var(--side-padding));
3190
+
3191
+ // Enable horizontal scrolling of the columns
3192
+ overflow-x: hidden;
3193
+ overflow-y: hidden; // Prevent vertical scrollbar on the container itself
3194
+ scroll-snap-type: x mandatory; // Snap pages (columns)
3195
+ scroll-behavior: auto; // Let JS handle smooth scrolling during page turns
3196
+ -webkit-overflow-scrolling: touch;
3197
+ box-sizing: border-box;
3198
+
3199
+ scrollbar-width: none;
3200
+ -ms-overflow-style: none;
3201
+ &::-webkit-scrollbar {
3202
+ display: none;
3203
+ }
3204
+
3205
+ // Content *inside* the columns
3206
+ > * { // Target direct children (likely the .bok-chapter divs)
3207
+ break-inside: avoid-column; // Try to prevent elements breaking mid-column
3208
+ page-break-inside: avoid; /* Older alias */
3209
+ -webkit-column-break-inside: avoid;
3210
+ }
3211
+ p {
3212
+ color:
3213
+ }
3214
+ }
3215
+
3216
+ @container (aspect-ratio > 1/1) {
3217
+ .book-page {
3218
+ column-count: 2;
3219
+ -moz-column-count: 2;
3220
+ -webkit-column-count: 2;
3221
+ column-width: calc(50% - var(--side-padding));
3222
+ -webkit-column-width: calc(50% - var(--side-padding));
3223
+
3224
+ img, svg {
3225
+ max-width: calc(100% - 2 * var(--side-padding)) !important;
3226
+ margin-bottom: 10px;
3227
+ }
3228
+
3229
+ }
3230
+ }
3231
+
3232
+ @container (aspect-ratio <= 1/1) {
3233
+ .book-page {
3234
+ columns: var(--safari-is-stupid-width, 100%) auto;
3235
+
3236
+ img, svg {
3237
+ max-width: calc(100% - 2 * var(--side-padding)) !important;
3238
+ margin-bottom: 10px;
3239
+ }
3240
+ }
3241
+ } // --- Styles for Images/SVG within Columns ---
3242
+
3243
+ .book-page img,
3244
+ .book-page svg {
3245
+ border-radius: 10px;
3246
+ // Max height respects the vertical padding of the book-page container
3247
+ max-height: calc(100% - var(--top-padding) - var(--bottom-padding)) !important;
3248
+ display: block;
3249
+ margin-left: auto; // Center if smaller than column width
3250
+ margin-right: auto;
3251
+ object-fit: contain; // Fit without distortion
3252
+ box-sizing: border-box; // Ensure border/padding included in size
3253
+ break-inside: avoid-column; // Crucial to prevent images splitting across columns
3254
+ page-break-inside: avoid;
3255
+ -webkit-column-break-inside: avoid;
3256
+ }
3257
+
3258
+ .book-page svg > image {
3259
+ width: 100%; // Inherit size from parent SVG
3260
+ height: 100%;
3261
+ }
3262
+
3263
+ // --- Chapter Styling ---
3264
+ .bok-chapter {
3265
+ margin-bottom: 100%;
3266
+ break-inside: avoid-column;
3267
+ page-break-inside: avoid;
3268
+ -webkit-column-break-inside: avoid;
3269
+ }
3270
+
3271
+ // --- Other Scoped Styles ---
3272
+ parsererror { display: none; } // Hide EPUB parsing errors if they render
3273
+
3274
+ .page-number {
3275
+ position: absolute;
3276
+ bottom: 15px; // Position relative to the reader container
3277
+ left: 50%;
3278
+ transform: translateX(-50%);
3279
+ font-size: 13px;
3280
+ color: gray;
3281
+ z-index: 10; // Above book content
3282
+ pointer-events: none; // Non-interactive
3283
+ }
3284
+
3285
+ .bottom-click-area {
3286
+ position: absolute; // Within the reader container
3287
+ bottom: 0;
3288
+ left: 0;
3289
+ width: 100%;
3290
+ height: 15%;
3291
+ z-index: 1000; // Above page number, below options menu overlay
3292
+ background-color: transparent;
3293
+ cursor: pointer;
3294
+ }
3295
+ }
3296
+ `, Nt = Ut.div`
3297
+ width: 100%;
3298
+ height: 100%;
3299
+ position: relative;d
3300
+ overflow: hidden;d
3301
+ overflow-y: hidden;
3302
+ `;
3303
+ function fe(Z, K) {
3304
+ const [p, A] = ft(() => {
3305
+ const v = localStorage.getItem(Z);
3306
+ return v === null ? K : v === "true";
3307
+ });
3308
+ return ut(() => {
3309
+ localStorage.setItem(Z, p ? "true" : "false");
3310
+ }, [Z, p]), [p, A];
3311
+ }
3312
+ const _e = ({
3313
+ epubDataSource: Z,
3314
+ onTitleChange: K,
3315
+ onLoadingChange: p,
3316
+ onError: A,
3317
+ className: v,
3318
+ style: a,
3319
+ color: o,
3320
+ supportedFonts: r = []
3321
+ }) => {
3322
+ const { title: l, rawContent: g, isLoading: y, error: _, loadEpub: b, setIsLoading: i } = qt(), [d, n] = ft(!1), [c, s] = ft(1.2), [m, w] = ft(30), [x, S] = ft("Inter"), F = yt(null), [E, D] = fe(
3323
+ "bokreader_tutorial_shown",
3324
+ !1
3325
+ ), [C, z] = ft(!E);
3326
+ ut(() => {
3327
+ E && z(!1);
3328
+ }, [E]);
3329
+ const X = () => {
3330
+ z(!1), D(!0);
3331
+ };
3332
+ ut(() => {
3333
+ Z && b(Z);
3334
+ }, [Z, b]), ut(() => {
3335
+ K && K(l);
3336
+ }, [l, K]), ut(() => {
3337
+ p && p(y);
3338
+ }, [y, p]), ut(() => {
3339
+ _ && A && A(_);
3340
+ }, [_, A]);
3341
+ const h = Gt(
3342
+ () => ({
3343
+ "--color-tint": o,
3344
+ "--side-padding": `${m}px`,
3345
+ "--top-padding": "30px",
3346
+ // Example: make these configurable too if needed
3347
+ "--bottom-padding": "70px",
3348
+ // Example
3349
+ "--font-size": `${c}em`,
3350
+ "--font-family": x
3351
+ }),
3352
+ [m, c, x]
3353
+ );
3354
+ return _ && !y && !g ? /* @__PURE__ */ pt(
3355
+ Nt,
3356
+ {
3357
+ className: `bok-reader-container ${v || ""}`,
3358
+ style: a,
3359
+ children: [
3360
+ /* @__PURE__ */ et(Dt, {}),
3361
+ /* @__PURE__ */ pt("div", { style: { padding: "20px", color: "red" }, children: [
3362
+ "Error loading EPUB: ",
3363
+ _
3364
+ ] })
3365
+ ]
3366
+ }
3367
+ ) : /* @__PURE__ */ pt(
3368
+ Nt,
3369
+ {
3370
+ className: `bok-reader-container ${v || ""}`,
3371
+ style: { ...a, ...h },
3372
+ ref: F,
3373
+ children: [
3374
+ /* @__PURE__ */ et(Dt, {}),
3375
+ /* @__PURE__ */ et(le, { isLoading: y, color: o }),
3376
+ g && /* @__PURE__ */ pt(Lt, { children: [
3377
+ C && !y && /* @__PURE__ */ et(
3378
+ de,
3379
+ {
3380
+ color: o,
3381
+ onDismiss: X
3382
+ }
3383
+ ),
3384
+ /* @__PURE__ */ et(
3385
+ re,
3386
+ {
3387
+ content: g,
3388
+ title: l,
3389
+ setIsLoading: i,
3390
+ fontSize: c,
3391
+ sidePadding: m,
3392
+ fontFamily: x,
3393
+ setPadding: w,
3394
+ setFontSize: s,
3395
+ setFontFamily: S,
3396
+ isOptionMenuVisible: d,
3397
+ containerElementRef: F,
3398
+ showTutorial: C
3399
+ }
3400
+ ),
3401
+ d && /* @__PURE__ */ et(
3402
+ ue,
3403
+ {
3404
+ onClose: () => n(!1),
3405
+ fontSize: c,
3406
+ padding: m,
3407
+ fontFamily: x,
3408
+ setPadding: w,
3409
+ setFontSize: s,
3410
+ setFontFamily: S,
3411
+ supportedFonts: r
3412
+ }
3413
+ ),
3414
+ !d && /* @__PURE__ */ et(
3415
+ "div",
3416
+ {
3417
+ className: "bottom-click-area",
3418
+ onClick: () => {
3419
+ C || n(!0);
3420
+ },
3421
+ "aria-label": "Open reader options"
3422
+ }
3423
+ )
3424
+ ] }),
3425
+ !Z && !y && !_ && /* @__PURE__ */ et("div", { style: { padding: "20px", textAlign: "center" }, children: "No EPUB loaded." })
3426
+ ]
3427
+ }
3428
+ );
3429
+ };
3430
+ export {
3431
+ _e as BokReader
3432
+ };