bok-reader 0.6.2 → 0.6.4
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 +607 -599
- package/dist/bok.umd.js +19 -19
- package/dist/main.css +1 -1
- package/package.json +1 -1
package/dist/bok.es.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { jsxs as vt, jsx as Q, Fragment as Jt } from "react/jsx-runtime";
|
|
2
|
-
import we, { forwardRef as Xt, createElement as ee, useState as Nt, useRef as
|
|
2
|
+
import we, { forwardRef as Xt, createElement as ee, useState as Nt, useRef as yt, useCallback as At, useEffect as bt, memo as Ne, useImperativeHandle as ke, useLayoutEffect as le, useMemo as ce } from "react";
|
|
3
3
|
import './main.css';/**
|
|
4
4
|
* @license lucide-react v0.555.0 - ISC
|
|
5
5
|
*
|
|
@@ -127,11 +127,11 @@ const Me = [
|
|
|
127
127
|
],
|
|
128
128
|
["circle", { cx: "12", cy: "12", r: "3", key: "1v7zrd" }]
|
|
129
129
|
], xe = oe("settings", Me);
|
|
130
|
-
var
|
|
130
|
+
var qt = typeof globalThis < "u" ? globalThis : typeof window < "u" ? window : typeof global < "u" ? global : typeof self < "u" ? self : {};
|
|
131
131
|
function Ue(E) {
|
|
132
132
|
return E && E.__esModule && Object.prototype.hasOwnProperty.call(E, "default") ? E.default : E;
|
|
133
133
|
}
|
|
134
|
-
function
|
|
134
|
+
function Zt(E) {
|
|
135
135
|
throw new Error('Could not dynamically require "' + E + '". Please configure the dynamicRequireTargets or/and ignoreDynamicRequires option of @rollup/plugin-commonjs appropriately for this require call to work.');
|
|
136
136
|
}
|
|
137
137
|
var Se = { exports: {} };
|
|
@@ -154,9 +154,9 @@ https://github.com/nodeca/pako/blob/main/LICENSE
|
|
|
154
154
|
function h(b, y) {
|
|
155
155
|
if (!l[b]) {
|
|
156
156
|
if (!C[b]) {
|
|
157
|
-
var
|
|
158
|
-
if (!y &&
|
|
159
|
-
return
|
|
157
|
+
var _ = typeof Zt == "function" && Zt;
|
|
158
|
+
if (!y && _)
|
|
159
|
+
return _(b, !0);
|
|
160
160
|
if (r)
|
|
161
161
|
return r(b, !0);
|
|
162
162
|
var v = new Error("Cannot find module '" + b + "'");
|
|
@@ -170,41 +170,41 @@ https://github.com/nodeca/pako/blob/main/LICENSE
|
|
|
170
170
|
}
|
|
171
171
|
return l[b].exports;
|
|
172
172
|
}
|
|
173
|
-
for (var r = typeof
|
|
173
|
+
for (var r = typeof Zt == "function" && Zt, c = 0; c < a.length; c++)
|
|
174
174
|
h(a[c]);
|
|
175
175
|
return h;
|
|
176
176
|
}({ 1: [function(s, C, l) {
|
|
177
177
|
var a = s("./utils"), h = s("./support"), r = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=";
|
|
178
178
|
l.encode = function(c) {
|
|
179
|
-
for (var b, y,
|
|
180
|
-
x =
|
|
179
|
+
for (var b, y, _, v, i, p, o, d = [], u = 0, g = c.length, x = g, A = a.getTypeOf(c) !== "string"; u < c.length; )
|
|
180
|
+
x = g - u, _ = A ? (b = c[u++], y = u < g ? c[u++] : 0, u < g ? c[u++] : 0) : (b = c.charCodeAt(u++), y = u < g ? c.charCodeAt(u++) : 0, u < g ? c.charCodeAt(u++) : 0), v = b >> 2, i = (3 & b) << 4 | y >> 4, p = 1 < x ? (15 & y) << 2 | _ >> 6 : 64, o = 2 < x ? 63 & _ : 64, d.push(r.charAt(v) + r.charAt(i) + r.charAt(p) + r.charAt(o));
|
|
181
181
|
return d.join("");
|
|
182
182
|
}, l.decode = function(c) {
|
|
183
|
-
var b, y,
|
|
183
|
+
var b, y, _, v, i, p, o = 0, d = 0, u = "data:";
|
|
184
184
|
if (c.substr(0, u.length) === u)
|
|
185
185
|
throw new Error("Invalid base64 input, it looks like a data url.");
|
|
186
|
-
var
|
|
186
|
+
var g, x = 3 * (c = c.replace(/[^A-Za-z0-9+/=]/g, "")).length / 4;
|
|
187
187
|
if (c.charAt(c.length - 1) === r.charAt(64) && x--, c.charAt(c.length - 2) === r.charAt(64) && x--, x % 1 != 0)
|
|
188
188
|
throw new Error("Invalid base64 input, bad content length.");
|
|
189
|
-
for (
|
|
190
|
-
b = r.indexOf(c.charAt(o++)) << 2 | (v = r.indexOf(c.charAt(o++))) >> 4, y = (15 & v) << 4 | (i = r.indexOf(c.charAt(o++))) >> 2,
|
|
191
|
-
return
|
|
189
|
+
for (g = h.uint8array ? new Uint8Array(0 | x) : new Array(0 | x); o < c.length; )
|
|
190
|
+
b = r.indexOf(c.charAt(o++)) << 2 | (v = r.indexOf(c.charAt(o++))) >> 4, y = (15 & v) << 4 | (i = r.indexOf(c.charAt(o++))) >> 2, _ = (3 & i) << 6 | (p = r.indexOf(c.charAt(o++))), g[d++] = b, i !== 64 && (g[d++] = y), p !== 64 && (g[d++] = _);
|
|
191
|
+
return g;
|
|
192
192
|
};
|
|
193
193
|
}, { "./support": 30, "./utils": 32 }], 2: [function(s, C, l) {
|
|
194
194
|
var a = s("./external"), h = s("./stream/DataWorker"), r = s("./stream/Crc32Probe"), c = s("./stream/DataLengthProbe");
|
|
195
|
-
function b(y,
|
|
196
|
-
this.compressedSize = y, this.uncompressedSize =
|
|
195
|
+
function b(y, _, v, i, p) {
|
|
196
|
+
this.compressedSize = y, this.uncompressedSize = _, this.crc32 = v, this.compression = i, this.compressedContent = p;
|
|
197
197
|
}
|
|
198
198
|
b.prototype = { getContentWorker: function() {
|
|
199
|
-
var y = new h(a.Promise.resolve(this.compressedContent)).pipe(this.compression.uncompressWorker()).pipe(new c("data_length")),
|
|
199
|
+
var y = new h(a.Promise.resolve(this.compressedContent)).pipe(this.compression.uncompressWorker()).pipe(new c("data_length")), _ = this;
|
|
200
200
|
return y.on("end", function() {
|
|
201
|
-
if (this.streamInfo.data_length !==
|
|
201
|
+
if (this.streamInfo.data_length !== _.uncompressedSize)
|
|
202
202
|
throw new Error("Bug : uncompressed data size mismatch");
|
|
203
203
|
}), y;
|
|
204
204
|
}, getCompressedWorker: function() {
|
|
205
205
|
return new h(a.Promise.resolve(this.compressedContent)).withStreamInfo("compressedSize", this.compressedSize).withStreamInfo("uncompressedSize", this.uncompressedSize).withStreamInfo("crc32", this.crc32).withStreamInfo("compression", this.compression);
|
|
206
|
-
} }, b.createWorkerFrom = function(y,
|
|
207
|
-
return y.pipe(new r()).pipe(new c("uncompressedSize")).pipe(
|
|
206
|
+
} }, b.createWorkerFrom = function(y, _, v) {
|
|
207
|
+
return y.pipe(new r()).pipe(new c("uncompressedSize")).pipe(_.compressWorker(v)).pipe(new c("compressedSize")).withStreamInfo("compression", _);
|
|
208
208
|
}, C.exports = b;
|
|
209
209
|
}, { "./external": 6, "./stream/Crc32Probe": 25, "./stream/DataLengthProbe": 26, "./stream/DataWorker": 27 }], 3: [function(s, C, l) {
|
|
210
210
|
var a = s("./stream/GenericWorker");
|
|
@@ -224,14 +224,14 @@ https://github.com/nodeca/pako/blob/main/LICENSE
|
|
|
224
224
|
return c;
|
|
225
225
|
}();
|
|
226
226
|
C.exports = function(r, c) {
|
|
227
|
-
return r !== void 0 && r.length ? a.getTypeOf(r) !== "string" ? function(b, y,
|
|
228
|
-
var i = h, p = v +
|
|
227
|
+
return r !== void 0 && r.length ? a.getTypeOf(r) !== "string" ? function(b, y, _, v) {
|
|
228
|
+
var i = h, p = v + _;
|
|
229
229
|
b ^= -1;
|
|
230
230
|
for (var o = v; o < p; o++)
|
|
231
231
|
b = b >>> 8 ^ i[255 & (b ^ y[o])];
|
|
232
232
|
return -1 ^ b;
|
|
233
|
-
}(0 | c, r, r.length, 0) : function(b, y,
|
|
234
|
-
var i = h, p = v +
|
|
233
|
+
}(0 | c, r, r.length, 0) : function(b, y, _, v) {
|
|
234
|
+
var i = h, p = v + _;
|
|
235
235
|
b ^= -1;
|
|
236
236
|
for (var o = v; o < p; o++)
|
|
237
237
|
b = b >>> 8 ^ i[255 & (b ^ y.charCodeAt(o))];
|
|
@@ -245,23 +245,23 @@ https://github.com/nodeca/pako/blob/main/LICENSE
|
|
|
245
245
|
a = typeof Promise < "u" ? Promise : s("lie"), C.exports = { Promise: a };
|
|
246
246
|
}, { lie: 37 }], 7: [function(s, C, l) {
|
|
247
247
|
var a = typeof Uint8Array < "u" && typeof Uint16Array < "u" && typeof Uint32Array < "u", h = s("pako"), r = s("./utils"), c = s("./stream/GenericWorker"), b = a ? "uint8array" : "array";
|
|
248
|
-
function y(
|
|
249
|
-
c.call(this, "FlateWorker/" +
|
|
248
|
+
function y(_, v) {
|
|
249
|
+
c.call(this, "FlateWorker/" + _), this._pako = null, this._pakoAction = _, this._pakoOptions = v, this.meta = {};
|
|
250
250
|
}
|
|
251
|
-
l.magic = "\b\0", r.inherits(y, c), y.prototype.processChunk = function(
|
|
252
|
-
this.meta =
|
|
251
|
+
l.magic = "\b\0", r.inherits(y, c), y.prototype.processChunk = function(_) {
|
|
252
|
+
this.meta = _.meta, this._pako === null && this._createPako(), this._pako.push(r.transformTo(b, _.data), !1);
|
|
253
253
|
}, y.prototype.flush = function() {
|
|
254
254
|
c.prototype.flush.call(this), this._pako === null && this._createPako(), this._pako.push([], !0);
|
|
255
255
|
}, y.prototype.cleanUp = function() {
|
|
256
256
|
c.prototype.cleanUp.call(this), this._pako = null;
|
|
257
257
|
}, y.prototype._createPako = function() {
|
|
258
258
|
this._pako = new h[this._pakoAction]({ raw: !0, level: this._pakoOptions.level || -1 });
|
|
259
|
-
var
|
|
259
|
+
var _ = this;
|
|
260
260
|
this._pako.onData = function(v) {
|
|
261
|
-
|
|
261
|
+
_.push({ data: v, meta: _.meta });
|
|
262
262
|
};
|
|
263
|
-
}, l.compressWorker = function(
|
|
264
|
-
return new y("Deflate",
|
|
263
|
+
}, l.compressWorker = function(_) {
|
|
264
|
+
return new y("Deflate", _);
|
|
265
265
|
}, l.uncompressWorker = function() {
|
|
266
266
|
return new y("Inflate", {});
|
|
267
267
|
};
|
|
@@ -272,23 +272,23 @@ https://github.com/nodeca/pako/blob/main/LICENSE
|
|
|
272
272
|
d += String.fromCharCode(255 & i), i >>>= 8;
|
|
273
273
|
return d;
|
|
274
274
|
}
|
|
275
|
-
function h(i, p, o, d, u,
|
|
276
|
-
var x, A, k = i.file, O = i.compression, P =
|
|
275
|
+
function h(i, p, o, d, u, g) {
|
|
276
|
+
var x, A, k = i.file, O = i.compression, P = g !== b.utf8encode, F = r.transformTo("string", g(k.name)), I = r.transformTo("string", b.utf8encode(k.name)), H = k.comment, tt = r.transformTo("string", g(H)), w = r.transformTo("string", b.utf8encode(H)), L = I.length !== k.name.length, n = w.length !== H.length, T = "", V = "", M = "", et = k.dir, $ = k.date, K = { crc32: 0, compressedSize: 0, uncompressedSize: 0 };
|
|
277
277
|
p && !o || (K.crc32 = i.crc32, K.compressedSize = i.compressedSize, K.uncompressedSize = i.uncompressedSize);
|
|
278
278
|
var z = 0;
|
|
279
279
|
p && (z |= 8), P || !L && !n || (z |= 2048);
|
|
280
280
|
var N = 0, it = 0;
|
|
281
|
-
et && (N |= 16), u === "UNIX" ? (it = 798, N |= function(
|
|
282
|
-
var mt =
|
|
283
|
-
return
|
|
284
|
-
}(k.unixPermissions, et)) : (it = 20, N |= function(
|
|
285
|
-
return 63 & (
|
|
281
|
+
et && (N |= 16), u === "UNIX" ? (it = 798, N |= function(q, ht) {
|
|
282
|
+
var mt = q;
|
|
283
|
+
return q || (mt = ht ? 16893 : 33204), (65535 & mt) << 16;
|
|
284
|
+
}(k.unixPermissions, et)) : (it = 20, N |= function(q) {
|
|
285
|
+
return 63 & (q || 0);
|
|
286
286
|
}(k.dosPermissions)), x = $.getUTCHours(), x <<= 6, x |= $.getUTCMinutes(), x <<= 5, x |= $.getUTCSeconds() / 2, A = $.getUTCFullYear() - 1980, A <<= 4, A |= $.getUTCMonth() + 1, A <<= 5, A |= $.getUTCDate(), L && (V = a(1, 1) + a(y(F), 4) + I, T += "up" + a(V.length, 2) + V), n && (M = a(1, 1) + a(y(tt), 4) + w, T += "uc" + a(M.length, 2) + M);
|
|
287
287
|
var Y = "";
|
|
288
288
|
return Y += `
|
|
289
|
-
\0`, Y += a(z, 2), Y += O.magic, Y += a(x, 2), Y += a(A, 2), Y += a(K.crc32, 4), Y += a(K.compressedSize, 4), Y += a(K.uncompressedSize, 4), Y += a(F.length, 2), Y += a(T.length, 2), { fileRecord:
|
|
289
|
+
\0`, Y += a(z, 2), Y += O.magic, Y += a(x, 2), Y += a(A, 2), Y += a(K.crc32, 4), Y += a(K.compressedSize, 4), Y += a(K.uncompressedSize, 4), Y += a(F.length, 2), Y += a(T.length, 2), { fileRecord: _.LOCAL_FILE_HEADER + Y + F + T, dirRecord: _.CENTRAL_FILE_HEADER + a(it, 2) + Y + a(tt.length, 2) + "\0\0\0\0" + a(N, 4) + a(d, 4) + F + T + tt };
|
|
290
290
|
}
|
|
291
|
-
var r = s("../utils"), c = s("../stream/GenericWorker"), b = s("../utf8"), y = s("../crc32"),
|
|
291
|
+
var r = s("../utils"), c = s("../stream/GenericWorker"), b = s("../utf8"), y = s("../crc32"), _ = s("../signature");
|
|
292
292
|
function v(i, p, o, d) {
|
|
293
293
|
c.call(this, "ZipFileWorker"), this.bytesWritten = 0, this.zipComment = p, this.zipPlatform = o, this.encodeFileName = d, this.streamFiles = i, this.accumulate = !1, this.contentBuffer = [], this.dirRecords = [], this.currentSourceOffset = 0, this.entriesCount = 0, this.currentFile = null, this._sources = [];
|
|
294
294
|
}
|
|
@@ -308,7 +308,7 @@ https://github.com/nodeca/pako/blob/main/LICENSE
|
|
|
308
308
|
var p = this.streamFiles && !i.file.dir, o = h(i, p, !0, this.currentSourceOffset, this.zipPlatform, this.encodeFileName);
|
|
309
309
|
if (this.dirRecords.push(o.dirRecord), p)
|
|
310
310
|
this.push({ data: function(d) {
|
|
311
|
-
return
|
|
311
|
+
return _.DATA_DESCRIPTOR + a(d.crc32, 4) + a(d.compressedSize, 4) + a(d.uncompressedSize, 4);
|
|
312
312
|
}(i), meta: { percent: 100 } });
|
|
313
313
|
else
|
|
314
314
|
for (this.push({ data: o.fileRecord, meta: { percent: 0 } }); this.contentBuffer.length; )
|
|
@@ -317,9 +317,9 @@ https://github.com/nodeca/pako/blob/main/LICENSE
|
|
|
317
317
|
}, v.prototype.flush = function() {
|
|
318
318
|
for (var i = this.bytesWritten, p = 0; p < this.dirRecords.length; p++)
|
|
319
319
|
this.push({ data: this.dirRecords[p], meta: { percent: 100 } });
|
|
320
|
-
var o = this.bytesWritten - i, d = function(u,
|
|
320
|
+
var o = this.bytesWritten - i, d = function(u, g, x, A, k) {
|
|
321
321
|
var O = r.transformTo("string", k(A));
|
|
322
|
-
return
|
|
322
|
+
return _.CENTRAL_DIRECTORY_END + "\0\0\0\0" + a(u, 2) + a(u, 2) + a(g, 4) + a(x, 4) + a(O.length, 2) + O;
|
|
323
323
|
}(this.dirRecords.length, o, i, this.zipComment, this.encodeFileName);
|
|
324
324
|
this.push({ data: d, meta: { percent: 100 } });
|
|
325
325
|
}, v.prototype.prepareNextSource = function() {
|
|
@@ -354,18 +354,18 @@ https://github.com/nodeca/pako/blob/main/LICENSE
|
|
|
354
354
|
}, { "../crc32": 4, "../signature": 23, "../stream/GenericWorker": 28, "../utf8": 31, "../utils": 32 }], 9: [function(s, C, l) {
|
|
355
355
|
var a = s("../compressions"), h = s("./ZipFileWorker");
|
|
356
356
|
l.generateWorker = function(r, c, b) {
|
|
357
|
-
var y = new h(c.streamFiles, b, c.platform, c.encodeFileName),
|
|
357
|
+
var y = new h(c.streamFiles, b, c.platform, c.encodeFileName), _ = 0;
|
|
358
358
|
try {
|
|
359
359
|
r.forEach(function(v, i) {
|
|
360
|
-
|
|
361
|
-
var p = function(
|
|
362
|
-
var A =
|
|
360
|
+
_++;
|
|
361
|
+
var p = function(g, x) {
|
|
362
|
+
var A = g || x, k = a[A];
|
|
363
363
|
if (!k)
|
|
364
364
|
throw new Error(A + " is not a valid compression method !");
|
|
365
365
|
return k;
|
|
366
366
|
}(i.options.compression, c.compression), o = i.options.compressionOptions || c.compressionOptions || {}, d = i.dir, u = i.date;
|
|
367
367
|
i._compressWorker(p, o).withStreamInfo("file", { name: v, dir: d, date: u, comment: i.comment || "", unixPermissions: i.unixPermissions, dosPermissions: i.dosPermissions }).pipe(y);
|
|
368
|
-
}), y.entriesCount =
|
|
368
|
+
}), y.entriesCount = _;
|
|
369
369
|
} catch (v) {
|
|
370
370
|
y.error(v);
|
|
371
371
|
}
|
|
@@ -389,7 +389,7 @@ https://github.com/nodeca/pako/blob/main/LICENSE
|
|
|
389
389
|
}, a.external = s("./external"), C.exports = a;
|
|
390
390
|
}, { "./defaults": 5, "./external": 6, "./load": 11, "./object": 15, "./support": 30 }], 11: [function(s, C, l) {
|
|
391
391
|
var a = s("./utils"), h = s("./external"), r = s("./utf8"), c = s("./zipEntries"), b = s("./stream/Crc32Probe"), y = s("./nodejsUtils");
|
|
392
|
-
function
|
|
392
|
+
function _(v) {
|
|
393
393
|
return new h.Promise(function(i, p) {
|
|
394
394
|
var o = v.decompressed.getContentWorker().pipe(new b());
|
|
395
395
|
o.on("error", function(d) {
|
|
@@ -407,12 +407,12 @@ https://github.com/nodeca/pako/blob/main/LICENSE
|
|
|
407
407
|
}).then(function(o) {
|
|
408
408
|
var d = [h.Promise.resolve(o)], u = o.files;
|
|
409
409
|
if (i.checkCRC32)
|
|
410
|
-
for (var
|
|
411
|
-
d.push(
|
|
410
|
+
for (var g = 0; g < u.length; g++)
|
|
411
|
+
d.push(_(u[g]));
|
|
412
412
|
return h.Promise.all(d);
|
|
413
413
|
}).then(function(o) {
|
|
414
|
-
for (var d = o.shift(), u = d.files,
|
|
415
|
-
var x = u[
|
|
414
|
+
for (var d = o.shift(), u = d.files, g = 0; g < u.length; g++) {
|
|
415
|
+
var x = u[g], A = x.fileNameStr, k = a.resolve(x.fileNameStr);
|
|
416
416
|
p.file(k, x.decompressed, { binary: !0, optimizedBinaryString: !0, date: x.date, dir: x.dir, comment: x.fileCommentStr.length ? x.fileCommentStr : null, unixPermissions: x.unixPermissions, dosPermissions: x.dosPermissions, createFolders: i.createFolders }), x.dir || (p.file(k).unsafeOriginalName = A);
|
|
417
417
|
}
|
|
418
418
|
return d.zipComment.length && (p.comment = d.zipComment), p;
|
|
@@ -442,10 +442,10 @@ https://github.com/nodeca/pako/blob/main/LICENSE
|
|
|
442
442
|
function h(r, c, b) {
|
|
443
443
|
a.call(this, c), this._helper = r;
|
|
444
444
|
var y = this;
|
|
445
|
-
r.on("data", function(
|
|
446
|
-
y.push(
|
|
447
|
-
}).on("error", function(
|
|
448
|
-
y.emit("error",
|
|
445
|
+
r.on("data", function(_, v) {
|
|
446
|
+
y.push(_) || y._helper.pause(), b && b(v);
|
|
447
|
+
}).on("error", function(_) {
|
|
448
|
+
y.emit("error", _);
|
|
449
449
|
}).on("end", function() {
|
|
450
450
|
y.push(null);
|
|
451
451
|
});
|
|
@@ -473,21 +473,21 @@ https://github.com/nodeca/pako/blob/main/LICENSE
|
|
|
473
473
|
}, {}], 15: [function(s, C, l) {
|
|
474
474
|
function a(k, O, P) {
|
|
475
475
|
var F, I = r.getTypeOf(O), H = r.extend(P || {}, y);
|
|
476
|
-
H.date = H.date || /* @__PURE__ */ new Date(), H.compression !== null && (H.compression = H.compression.toUpperCase()), typeof H.unixPermissions == "string" && (H.unixPermissions = parseInt(H.unixPermissions, 8)), H.unixPermissions && 16384 & H.unixPermissions && (H.dir = !0), H.dosPermissions && 16 & H.dosPermissions && (H.dir = !0), H.dir && (k = u(k)), H.createFolders && (F = d(k)) &&
|
|
476
|
+
H.date = H.date || /* @__PURE__ */ new Date(), H.compression !== null && (H.compression = H.compression.toUpperCase()), typeof H.unixPermissions == "string" && (H.unixPermissions = parseInt(H.unixPermissions, 8)), H.unixPermissions && 16384 & H.unixPermissions && (H.dir = !0), H.dosPermissions && 16 & H.dosPermissions && (H.dir = !0), H.dir && (k = u(k)), H.createFolders && (F = d(k)) && g.call(this, F, !0);
|
|
477
477
|
var tt = I === "string" && H.binary === !1 && H.base64 === !1;
|
|
478
|
-
P && P.binary !== void 0 || (H.binary = !tt), (O instanceof
|
|
478
|
+
P && P.binary !== void 0 || (H.binary = !tt), (O instanceof _ && O.uncompressedSize === 0 || H.dir || !O || O.length === 0) && (H.base64 = !1, H.binary = !0, O = "", H.compression = "STORE", I = "string");
|
|
479
479
|
var w = null;
|
|
480
|
-
w = O instanceof
|
|
480
|
+
w = O instanceof _ || O instanceof c ? O : p.isNode && p.isStream(O) ? new o(k, O) : r.prepareContent(k, O, H.binary, H.optimizedBinaryString, H.base64);
|
|
481
481
|
var L = new v(k, w, H);
|
|
482
482
|
this.files[k] = L;
|
|
483
483
|
}
|
|
484
|
-
var h = s("./utf8"), r = s("./utils"), c = s("./stream/GenericWorker"), b = s("./stream/StreamHelper"), y = s("./defaults"),
|
|
484
|
+
var h = s("./utf8"), r = s("./utils"), c = s("./stream/GenericWorker"), b = s("./stream/StreamHelper"), y = s("./defaults"), _ = s("./compressedObject"), v = s("./zipObject"), i = s("./generate"), p = s("./nodejsUtils"), o = s("./nodejs/NodejsStreamInputAdapter"), d = function(k) {
|
|
485
485
|
k.slice(-1) === "/" && (k = k.substring(0, k.length - 1));
|
|
486
486
|
var O = k.lastIndexOf("/");
|
|
487
487
|
return 0 < O ? k.substring(0, O) : "";
|
|
488
488
|
}, u = function(k) {
|
|
489
489
|
return k.slice(-1) !== "/" && (k += "/"), k;
|
|
490
|
-
},
|
|
490
|
+
}, g = function(k, O) {
|
|
491
491
|
return O = O !== void 0 ? O : y.createFolders, k = u(k), this.files[k] || a.call(this, k, null, { dir: !0, createFolders: O }), this.files[k];
|
|
492
492
|
};
|
|
493
493
|
function x(k) {
|
|
@@ -522,7 +522,7 @@ https://github.com/nodeca/pako/blob/main/LICENSE
|
|
|
522
522
|
return this.filter(function(I, H) {
|
|
523
523
|
return H.dir && k.test(I);
|
|
524
524
|
});
|
|
525
|
-
var O = this.root + k, P =
|
|
525
|
+
var O = this.root + k, P = g.call(this, O), F = this.clone();
|
|
526
526
|
return F.root = P.name, F;
|
|
527
527
|
}, remove: function(k) {
|
|
528
528
|
k = this.root + k;
|
|
@@ -567,13 +567,13 @@ https://github.com/nodeca/pako/blob/main/LICENSE
|
|
|
567
567
|
s("../utils").inherits(h, a), h.prototype.byteAt = function(r) {
|
|
568
568
|
return this.data[this.zero + r];
|
|
569
569
|
}, h.prototype.lastIndexOfSignature = function(r) {
|
|
570
|
-
for (var c = r.charCodeAt(0), b = r.charCodeAt(1), y = r.charCodeAt(2),
|
|
571
|
-
if (this.data[v] === c && this.data[v + 1] === b && this.data[v + 2] === y && this.data[v + 3] ===
|
|
570
|
+
for (var c = r.charCodeAt(0), b = r.charCodeAt(1), y = r.charCodeAt(2), _ = r.charCodeAt(3), v = this.length - 4; 0 <= v; --v)
|
|
571
|
+
if (this.data[v] === c && this.data[v + 1] === b && this.data[v + 2] === y && this.data[v + 3] === _)
|
|
572
572
|
return v - this.zero;
|
|
573
573
|
return -1;
|
|
574
574
|
}, h.prototype.readAndCheckSignature = function(r) {
|
|
575
|
-
var c = r.charCodeAt(0), b = r.charCodeAt(1), y = r.charCodeAt(2),
|
|
576
|
-
return c === v[0] && b === v[1] && y === v[2] &&
|
|
575
|
+
var c = r.charCodeAt(0), b = r.charCodeAt(1), y = r.charCodeAt(2), _ = r.charCodeAt(3), v = this.readData(4);
|
|
576
|
+
return c === v[0] && b === v[1] && y === v[2] && _ === v[3];
|
|
577
577
|
}, h.prototype.readData = function(r) {
|
|
578
578
|
if (this.checkOffset(r), r === 0)
|
|
579
579
|
return [];
|
|
@@ -648,9 +648,9 @@ https://github.com/nodeca/pako/blob/main/LICENSE
|
|
|
648
648
|
}, C.exports = h;
|
|
649
649
|
}, { "../utils": 32, "./ArrayReader": 17 }], 22: [function(s, C, l) {
|
|
650
650
|
var a = s("../utils"), h = s("../support"), r = s("./ArrayReader"), c = s("./StringReader"), b = s("./NodeBufferReader"), y = s("./Uint8ArrayReader");
|
|
651
|
-
C.exports = function(
|
|
652
|
-
var v = a.getTypeOf(
|
|
653
|
-
return a.checkSupport(v), v !== "string" || h.uint8array ? v === "nodebuffer" ? new b(
|
|
651
|
+
C.exports = function(_) {
|
|
652
|
+
var v = a.getTypeOf(_);
|
|
653
|
+
return a.checkSupport(v), v !== "string" || h.uint8array ? v === "nodebuffer" ? new b(_) : h.uint8array ? new y(a.transformTo("uint8array", _)) : new r(a.transformTo("array", _)) : new c(_);
|
|
654
654
|
};
|
|
655
655
|
}, { "../support": 30, "../utils": 32, "./ArrayReader": 17, "./NodeBufferReader": 19, "./StringReader": 20, "./Uint8ArrayReader": 21 }], 23: [function(s, C, l) {
|
|
656
656
|
l.LOCAL_FILE_HEADER = "PK", l.CENTRAL_FILE_HEADER = "PK", l.CENTRAL_DIRECTORY_END = "PK", l.ZIP64_CENTRAL_DIRECTORY_LOCATOR = "PK\x07", l.ZIP64_CENTRAL_DIRECTORY_END = "PK", l.DATA_DESCRIPTOR = "PK\x07\b";
|
|
@@ -782,19 +782,19 @@ https://github.com/nodeca/pako/blob/main/LICENSE
|
|
|
782
782
|
return this.previous ? this.previous + " -> " + h : h;
|
|
783
783
|
} }, C.exports = a;
|
|
784
784
|
}, {}], 29: [function(s, C, l) {
|
|
785
|
-
var a = s("../utils"), h = s("./ConvertWorker"), r = s("./GenericWorker"), c = s("../base64"), b = s("../support"), y = s("../external"),
|
|
785
|
+
var a = s("../utils"), h = s("./ConvertWorker"), r = s("./GenericWorker"), c = s("../base64"), b = s("../support"), y = s("../external"), _ = null;
|
|
786
786
|
if (b.nodestream)
|
|
787
787
|
try {
|
|
788
|
-
|
|
788
|
+
_ = s("../nodejs/NodejsStreamOutputAdapter");
|
|
789
789
|
} catch {
|
|
790
790
|
}
|
|
791
791
|
function v(p, o) {
|
|
792
792
|
return new y.Promise(function(d, u) {
|
|
793
|
-
var
|
|
793
|
+
var g = [], x = p._internalType, A = p._outputType, k = p._mimeType;
|
|
794
794
|
p.on("data", function(O, P) {
|
|
795
|
-
|
|
795
|
+
g.push(O), o && o(P);
|
|
796
796
|
}).on("error", function(O) {
|
|
797
|
-
|
|
797
|
+
g = [], u(O);
|
|
798
798
|
}).on("end", function() {
|
|
799
799
|
try {
|
|
800
800
|
var O = function(P, F, I) {
|
|
@@ -824,12 +824,12 @@ https://github.com/nodeca/pako/blob/main/LICENSE
|
|
|
824
824
|
default:
|
|
825
825
|
throw new Error("concat : unsupported type '" + P + "'");
|
|
826
826
|
}
|
|
827
|
-
}(x,
|
|
827
|
+
}(x, g), k);
|
|
828
828
|
d(O);
|
|
829
829
|
} catch (P) {
|
|
830
830
|
u(P);
|
|
831
831
|
}
|
|
832
|
-
|
|
832
|
+
g = [];
|
|
833
833
|
}).resume();
|
|
834
834
|
});
|
|
835
835
|
}
|
|
@@ -845,8 +845,8 @@ https://github.com/nodeca/pako/blob/main/LICENSE
|
|
|
845
845
|
}
|
|
846
846
|
try {
|
|
847
847
|
this._internalType = u, this._outputType = o, this._mimeType = d, a.checkSupport(u), this._worker = p.pipe(new h(u)), p.lock();
|
|
848
|
-
} catch (
|
|
849
|
-
this._worker = new r("error"), this._worker.error(
|
|
848
|
+
} catch (g) {
|
|
849
|
+
this._worker = new r("error"), this._worker.error(g);
|
|
850
850
|
}
|
|
851
851
|
}
|
|
852
852
|
i.prototype = { accumulate: function(p) {
|
|
@@ -865,7 +865,7 @@ https://github.com/nodeca/pako/blob/main/LICENSE
|
|
|
865
865
|
}, toNodejsStream: function(p) {
|
|
866
866
|
if (a.checkSupport("nodestream"), this._outputType !== "nodebuffer")
|
|
867
867
|
throw new Error(this._outputType + " is not supported by this method");
|
|
868
|
-
return new
|
|
868
|
+
return new _(this, { objectMode: this._outputType !== "nodebuffer" }, p);
|
|
869
869
|
} }, C.exports = i;
|
|
870
870
|
}, { "../base64": 1, "../external": 6, "../nodejs/NodejsStreamOutputAdapter": 13, "../support": 30, "../utils": 32, "./ConvertWorker": 24, "./GenericWorker": 28 }], 30: [function(s, C, l) {
|
|
871
871
|
if (l.base64 = !0, l.array = !0, l.string = !0, l.arraybuffer = typeof ArrayBuffer < "u" && typeof Uint8Array < "u", l.nodebuffer = typeof Buffer < "u", l.uint8array = typeof Uint8Array < "u", typeof ArrayBuffer > "u")
|
|
@@ -892,7 +892,7 @@ https://github.com/nodeca/pako/blob/main/LICENSE
|
|
|
892
892
|
for (var a = s("./utils"), h = s("./support"), r = s("./nodejsUtils"), c = s("./stream/GenericWorker"), b = new Array(256), y = 0; y < 256; y++)
|
|
893
893
|
b[y] = 252 <= y ? 6 : 248 <= y ? 5 : 240 <= y ? 4 : 224 <= y ? 3 : 192 <= y ? 2 : 1;
|
|
894
894
|
b[254] = b[254] = 1;
|
|
895
|
-
function
|
|
895
|
+
function _() {
|
|
896
896
|
c.call(this, "utf-8 decode"), this.leftOver = null;
|
|
897
897
|
}
|
|
898
898
|
function v() {
|
|
@@ -900,29 +900,29 @@ https://github.com/nodeca/pako/blob/main/LICENSE
|
|
|
900
900
|
}
|
|
901
901
|
l.utf8encode = function(i) {
|
|
902
902
|
return h.nodebuffer ? r.newBufferFrom(i, "utf-8") : function(p) {
|
|
903
|
-
var o, d, u,
|
|
904
|
-
for (
|
|
905
|
-
(64512 & (d = p.charCodeAt(
|
|
906
|
-
for (o = h.uint8array ? new Uint8Array(k) : new Array(k),
|
|
907
|
-
(64512 & (d = p.charCodeAt(
|
|
903
|
+
var o, d, u, g, x, A = p.length, k = 0;
|
|
904
|
+
for (g = 0; g < A; g++)
|
|
905
|
+
(64512 & (d = p.charCodeAt(g))) == 55296 && g + 1 < A && (64512 & (u = p.charCodeAt(g + 1))) == 56320 && (d = 65536 + (d - 55296 << 10) + (u - 56320), g++), k += d < 128 ? 1 : d < 2048 ? 2 : d < 65536 ? 3 : 4;
|
|
906
|
+
for (o = h.uint8array ? new Uint8Array(k) : new Array(k), g = x = 0; x < k; g++)
|
|
907
|
+
(64512 & (d = p.charCodeAt(g))) == 55296 && g + 1 < A && (64512 & (u = p.charCodeAt(g + 1))) == 56320 && (d = 65536 + (d - 55296 << 10) + (u - 56320), g++), d < 128 ? o[x++] = d : (d < 2048 ? o[x++] = 192 | d >>> 6 : (d < 65536 ? o[x++] = 224 | d >>> 12 : (o[x++] = 240 | d >>> 18, o[x++] = 128 | d >>> 12 & 63), o[x++] = 128 | d >>> 6 & 63), o[x++] = 128 | 63 & d);
|
|
908
908
|
return o;
|
|
909
909
|
}(i);
|
|
910
910
|
}, l.utf8decode = function(i) {
|
|
911
911
|
return h.nodebuffer ? a.transformTo("nodebuffer", i).toString("utf-8") : function(p) {
|
|
912
|
-
var o, d, u,
|
|
912
|
+
var o, d, u, g, x = p.length, A = new Array(2 * x);
|
|
913
913
|
for (o = d = 0; o < x; )
|
|
914
914
|
if ((u = p[o++]) < 128)
|
|
915
915
|
A[d++] = u;
|
|
916
|
-
else if (4 < (
|
|
917
|
-
A[d++] = 65533, o +=
|
|
916
|
+
else if (4 < (g = b[u]))
|
|
917
|
+
A[d++] = 65533, o += g - 1;
|
|
918
918
|
else {
|
|
919
|
-
for (u &=
|
|
920
|
-
u = u << 6 | 63 & p[o++],
|
|
921
|
-
1 <
|
|
919
|
+
for (u &= g === 2 ? 31 : g === 3 ? 15 : 7; 1 < g && o < x; )
|
|
920
|
+
u = u << 6 | 63 & p[o++], g--;
|
|
921
|
+
1 < g ? A[d++] = 65533 : u < 65536 ? A[d++] = u : (u -= 65536, A[d++] = 55296 | u >> 10 & 1023, A[d++] = 56320 | 1023 & u);
|
|
922
922
|
}
|
|
923
923
|
return A.length !== d && (A.subarray ? A = A.subarray(0, d) : A.length = d), a.applyFromCharCode(A);
|
|
924
924
|
}(i = a.transformTo(h.uint8array ? "uint8array" : "array", i));
|
|
925
|
-
}, a.inherits(
|
|
925
|
+
}, a.inherits(_, c), _.prototype.processChunk = function(i) {
|
|
926
926
|
var p = a.transformTo(h.uint8array ? "uint8array" : "array", i.data);
|
|
927
927
|
if (this.leftOver && this.leftOver.length) {
|
|
928
928
|
if (h.uint8array) {
|
|
@@ -932,16 +932,16 @@ https://github.com/nodeca/pako/blob/main/LICENSE
|
|
|
932
932
|
p = this.leftOver.concat(p);
|
|
933
933
|
this.leftOver = null;
|
|
934
934
|
}
|
|
935
|
-
var d = function(
|
|
935
|
+
var d = function(g, x) {
|
|
936
936
|
var A;
|
|
937
|
-
for ((x = x ||
|
|
937
|
+
for ((x = x || g.length) > g.length && (x = g.length), A = x - 1; 0 <= A && (192 & g[A]) == 128; )
|
|
938
938
|
A--;
|
|
939
|
-
return A < 0 || A === 0 ? x : A + b[
|
|
939
|
+
return A < 0 || A === 0 ? x : A + b[g[A]] > x ? A : x;
|
|
940
940
|
}(p), u = p;
|
|
941
941
|
d !== p.length && (h.uint8array ? (u = p.subarray(0, d), this.leftOver = p.subarray(d, p.length)) : (u = p.slice(0, d), this.leftOver = p.slice(d, p.length))), this.push({ data: l.utf8decode(u), meta: i.meta });
|
|
942
|
-
},
|
|
942
|
+
}, _.prototype.flush = function() {
|
|
943
943
|
this.leftOver && this.leftOver.length && (this.push({ data: l.utf8decode(this.leftOver), meta: {} }), this.leftOver = null);
|
|
944
|
-
}, l.Utf8DecodeWorker =
|
|
944
|
+
}, l.Utf8DecodeWorker = _, a.inherits(v, c), v.prototype.processChunk = function(i) {
|
|
945
945
|
this.push({ data: l.utf8encode(i.data), meta: i.meta });
|
|
946
946
|
}, l.Utf8EncodeWorker = v;
|
|
947
947
|
}, { "./nodejsUtils": 14, "./stream/GenericWorker": 28, "./support": 30, "./utils": 32 }], 32: [function(s, C, l) {
|
|
@@ -967,13 +967,13 @@ https://github.com/nodeca/pako/blob/main/LICENSE
|
|
|
967
967
|
}
|
|
968
968
|
}
|
|
969
969
|
};
|
|
970
|
-
var
|
|
971
|
-
var
|
|
970
|
+
var _ = { stringifyByChunk: function(o, d, u) {
|
|
971
|
+
var g = [], x = 0, A = o.length;
|
|
972
972
|
if (A <= u)
|
|
973
973
|
return String.fromCharCode.apply(null, o);
|
|
974
974
|
for (; x < A; )
|
|
975
|
-
d === "array" || d === "nodebuffer" ?
|
|
976
|
-
return
|
|
975
|
+
d === "array" || d === "nodebuffer" ? g.push(String.fromCharCode.apply(null, o.slice(x, Math.min(x + u, A)))) : g.push(String.fromCharCode.apply(null, o.subarray(x, Math.min(x + u, A)))), x += u;
|
|
976
|
+
return g.join("");
|
|
977
977
|
}, stringifyByChar: function(o) {
|
|
978
978
|
for (var d = "", u = 0; u < o.length; u++)
|
|
979
979
|
d += String.fromCharCode(o[u]);
|
|
@@ -992,15 +992,15 @@ https://github.com/nodeca/pako/blob/main/LICENSE
|
|
|
992
992
|
}
|
|
993
993
|
}() } };
|
|
994
994
|
function v(o) {
|
|
995
|
-
var d = 65536, u = l.getTypeOf(o),
|
|
996
|
-
if (u === "uint8array" ?
|
|
995
|
+
var d = 65536, u = l.getTypeOf(o), g = !0;
|
|
996
|
+
if (u === "uint8array" ? g = _.applyCanBeUsed.uint8array : u === "nodebuffer" && (g = _.applyCanBeUsed.nodebuffer), g)
|
|
997
997
|
for (; 1 < d; )
|
|
998
998
|
try {
|
|
999
|
-
return
|
|
999
|
+
return _.stringifyByChunk(o, u, d);
|
|
1000
1000
|
} catch {
|
|
1001
1001
|
d = Math.floor(d / 2);
|
|
1002
1002
|
}
|
|
1003
|
-
return
|
|
1003
|
+
return _.stringifyByChar(o);
|
|
1004
1004
|
}
|
|
1005
1005
|
function i(o, d) {
|
|
1006
1006
|
for (var u = 0; u < o.length; u++)
|
|
@@ -1050,9 +1050,9 @@ https://github.com/nodeca/pako/blob/main/LICENSE
|
|
|
1050
1050
|
var u = l.getTypeOf(d);
|
|
1051
1051
|
return p[u][o](d);
|
|
1052
1052
|
}, l.resolve = function(o) {
|
|
1053
|
-
for (var d = o.split("/"), u = [],
|
|
1054
|
-
var x = d[
|
|
1055
|
-
x === "." || x === "" &&
|
|
1053
|
+
for (var d = o.split("/"), u = [], g = 0; g < d.length; g++) {
|
|
1054
|
+
var x = d[g];
|
|
1055
|
+
x === "." || x === "" && g !== 0 && g !== d.length - 1 || (x === ".." ? u.pop() : u.push(x));
|
|
1056
1056
|
}
|
|
1057
1057
|
return u.join("/");
|
|
1058
1058
|
}, l.getTypeOf = function(o) {
|
|
@@ -1061,10 +1061,10 @@ https://github.com/nodeca/pako/blob/main/LICENSE
|
|
|
1061
1061
|
if (!a[o.toLowerCase()])
|
|
1062
1062
|
throw new Error(o + " is not supported by this platform");
|
|
1063
1063
|
}, l.MAX_VALUE_16BITS = 65535, l.MAX_VALUE_32BITS = -1, l.pretty = function(o) {
|
|
1064
|
-
var d, u,
|
|
1064
|
+
var d, u, g = "";
|
|
1065
1065
|
for (u = 0; u < (o || "").length; u++)
|
|
1066
|
-
|
|
1067
|
-
return
|
|
1066
|
+
g += "\\x" + ((d = o.charCodeAt(u)) < 16 ? "0" : "") + d.toString(16).toUpperCase();
|
|
1067
|
+
return g;
|
|
1068
1068
|
}, l.delay = function(o, d, u) {
|
|
1069
1069
|
setImmediate(function() {
|
|
1070
1070
|
o.apply(u || null, d || []);
|
|
@@ -1079,7 +1079,7 @@ https://github.com/nodeca/pako/blob/main/LICENSE
|
|
|
1079
1079
|
for (d in arguments[o])
|
|
1080
1080
|
Object.prototype.hasOwnProperty.call(arguments[o], d) && u[d] === void 0 && (u[d] = arguments[o][d]);
|
|
1081
1081
|
return u;
|
|
1082
|
-
}, l.prepareContent = function(o, d, u,
|
|
1082
|
+
}, l.prepareContent = function(o, d, u, g, x) {
|
|
1083
1083
|
return c.Promise.resolve(d).then(function(A) {
|
|
1084
1084
|
return a.blob && (A instanceof Blob || ["[object File]", "[object Blob]"].indexOf(Object.prototype.toString.call(A)) !== -1) && typeof FileReader < "u" ? new c.Promise(function(k, O) {
|
|
1085
1085
|
var P = new FileReader();
|
|
@@ -1091,58 +1091,58 @@ https://github.com/nodeca/pako/blob/main/LICENSE
|
|
|
1091
1091
|
}) : A;
|
|
1092
1092
|
}).then(function(A) {
|
|
1093
1093
|
var k = l.getTypeOf(A);
|
|
1094
|
-
return k ? (k === "arraybuffer" ? A = l.transformTo("uint8array", A) : k === "string" && (x ? A = h.decode(A) : u &&
|
|
1094
|
+
return k ? (k === "arraybuffer" ? A = l.transformTo("uint8array", A) : k === "string" && (x ? A = h.decode(A) : u && g !== !0 && (A = function(O) {
|
|
1095
1095
|
return y(O, a.uint8array ? new Uint8Array(O.length) : new Array(O.length));
|
|
1096
1096
|
}(A))), A) : c.Promise.reject(new Error("Can't read the data of '" + o + "'. Is it in a supported JavaScript type (String, Blob, ArrayBuffer, etc) ?"));
|
|
1097
1097
|
});
|
|
1098
1098
|
};
|
|
1099
1099
|
}, { "./base64": 1, "./external": 6, "./nodejsUtils": 14, "./support": 30, setimmediate: 54 }], 33: [function(s, C, l) {
|
|
1100
1100
|
var a = s("./reader/readerFor"), h = s("./utils"), r = s("./signature"), c = s("./zipEntry"), b = s("./support");
|
|
1101
|
-
function y(
|
|
1102
|
-
this.files = [], this.loadOptions =
|
|
1101
|
+
function y(_) {
|
|
1102
|
+
this.files = [], this.loadOptions = _;
|
|
1103
1103
|
}
|
|
1104
|
-
y.prototype = { checkSignature: function(
|
|
1105
|
-
if (!this.reader.readAndCheckSignature(
|
|
1104
|
+
y.prototype = { checkSignature: function(_) {
|
|
1105
|
+
if (!this.reader.readAndCheckSignature(_)) {
|
|
1106
1106
|
this.reader.index -= 4;
|
|
1107
1107
|
var v = this.reader.readString(4);
|
|
1108
|
-
throw new Error("Corrupted zip or bug: unexpected signature (" + h.pretty(v) + ", expected " + h.pretty(
|
|
1108
|
+
throw new Error("Corrupted zip or bug: unexpected signature (" + h.pretty(v) + ", expected " + h.pretty(_) + ")");
|
|
1109
1109
|
}
|
|
1110
|
-
}, isSignature: function(
|
|
1110
|
+
}, isSignature: function(_, v) {
|
|
1111
1111
|
var i = this.reader.index;
|
|
1112
|
-
this.reader.setIndex(
|
|
1112
|
+
this.reader.setIndex(_);
|
|
1113
1113
|
var p = this.reader.readString(4) === v;
|
|
1114
1114
|
return this.reader.setIndex(i), p;
|
|
1115
1115
|
}, readBlockEndOfCentral: function() {
|
|
1116
1116
|
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);
|
|
1117
|
-
var
|
|
1117
|
+
var _ = this.reader.readData(this.zipCommentLength), v = b.uint8array ? "uint8array" : "array", i = h.transformTo(v, _);
|
|
1118
1118
|
this.zipComment = this.loadOptions.decodeFileName(i);
|
|
1119
1119
|
}, readBlockZip64EndOfCentral: function() {
|
|
1120
1120
|
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 = {};
|
|
1121
|
-
for (var
|
|
1122
|
-
|
|
1121
|
+
for (var _, v, i, p = this.zip64EndOfCentralSize - 44; 0 < p; )
|
|
1122
|
+
_ = this.reader.readInt(2), v = this.reader.readInt(4), i = this.reader.readData(v), this.zip64ExtensibleData[_] = { id: _, length: v, value: i };
|
|
1123
1123
|
}, readBlockZip64EndOfCentralLocator: function() {
|
|
1124
1124
|
if (this.diskWithZip64CentralDirStart = this.reader.readInt(4), this.relativeOffsetEndOfZip64CentralDir = this.reader.readInt(8), this.disksCount = this.reader.readInt(4), 1 < this.disksCount)
|
|
1125
1125
|
throw new Error("Multi-volumes zip are not supported");
|
|
1126
1126
|
}, readLocalFiles: function() {
|
|
1127
|
-
var
|
|
1128
|
-
for (
|
|
1129
|
-
v = this.files[
|
|
1127
|
+
var _, v;
|
|
1128
|
+
for (_ = 0; _ < this.files.length; _++)
|
|
1129
|
+
v = this.files[_], this.reader.setIndex(v.localHeaderOffset), this.checkSignature(r.LOCAL_FILE_HEADER), v.readLocalPart(this.reader), v.handleUTF8(), v.processAttributes();
|
|
1130
1130
|
}, readCentralDir: function() {
|
|
1131
|
-
var
|
|
1131
|
+
var _;
|
|
1132
1132
|
for (this.reader.setIndex(this.centralDirOffset); this.reader.readAndCheckSignature(r.CENTRAL_FILE_HEADER); )
|
|
1133
|
-
(
|
|
1133
|
+
(_ = new c({ zip64: this.zip64 }, this.loadOptions)).readCentralPart(this.reader), this.files.push(_);
|
|
1134
1134
|
if (this.centralDirRecords !== this.files.length && this.centralDirRecords !== 0 && this.files.length === 0)
|
|
1135
1135
|
throw new Error("Corrupted zip or bug: expected " + this.centralDirRecords + " records in central dir, got " + this.files.length);
|
|
1136
1136
|
}, readEndOfCentral: function() {
|
|
1137
|
-
var
|
|
1138
|
-
if (
|
|
1137
|
+
var _ = this.reader.lastIndexOfSignature(r.CENTRAL_DIRECTORY_END);
|
|
1138
|
+
if (_ < 0)
|
|
1139
1139
|
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");
|
|
1140
|
-
this.reader.setIndex(
|
|
1141
|
-
var v =
|
|
1140
|
+
this.reader.setIndex(_);
|
|
1141
|
+
var v = _;
|
|
1142
1142
|
if (this.checkSignature(r.CENTRAL_DIRECTORY_END), this.readBlockEndOfCentral(), this.diskNumber === h.MAX_VALUE_16BITS || this.diskWithCentralDirStart === h.MAX_VALUE_16BITS || this.centralDirRecordsOnThisDisk === h.MAX_VALUE_16BITS || this.centralDirRecords === h.MAX_VALUE_16BITS || this.centralDirSize === h.MAX_VALUE_32BITS || this.centralDirOffset === h.MAX_VALUE_32BITS) {
|
|
1143
|
-
if (this.zip64 = !0, (
|
|
1143
|
+
if (this.zip64 = !0, (_ = this.reader.lastIndexOfSignature(r.ZIP64_CENTRAL_DIRECTORY_LOCATOR)) < 0)
|
|
1144
1144
|
throw new Error("Corrupted zip: can't find the ZIP64 end of central directory locator");
|
|
1145
|
-
if (this.reader.setIndex(
|
|
1145
|
+
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))
|
|
1146
1146
|
throw new Error("Corrupted zip: can't find the ZIP64 end of central directory");
|
|
1147
1147
|
this.reader.setIndex(this.relativeOffsetEndOfZip64CentralDir), this.checkSignature(r.ZIP64_CENTRAL_DIRECTORY_END), this.readBlockZip64EndOfCentral();
|
|
1148
1148
|
}
|
|
@@ -1153,13 +1153,13 @@ https://github.com/nodeca/pako/blob/main/LICENSE
|
|
|
1153
1153
|
this.isSignature(v, r.CENTRAL_FILE_HEADER) || (this.reader.zero = p);
|
|
1154
1154
|
else if (p < 0)
|
|
1155
1155
|
throw new Error("Corrupted zip: missing " + Math.abs(p) + " bytes.");
|
|
1156
|
-
}, prepareReader: function(
|
|
1157
|
-
this.reader = a(
|
|
1158
|
-
}, load: function(
|
|
1159
|
-
this.prepareReader(
|
|
1156
|
+
}, prepareReader: function(_) {
|
|
1157
|
+
this.reader = a(_);
|
|
1158
|
+
}, load: function(_) {
|
|
1159
|
+
this.prepareReader(_), this.readEndOfCentral(), this.readCentralDir(), this.readLocalFiles();
|
|
1160
1160
|
} }, C.exports = y;
|
|
1161
1161
|
}, { "./reader/readerFor": 22, "./signature": 23, "./support": 30, "./utils": 32, "./zipEntry": 34 }], 34: [function(s, C, l) {
|
|
1162
|
-
var a = s("./reader/readerFor"), h = s("./utils"), r = s("./compressedObject"), c = s("./crc32"), b = s("./utf8"), y = s("./compressions"),
|
|
1162
|
+
var a = s("./reader/readerFor"), h = s("./utils"), r = s("./compressedObject"), c = s("./crc32"), b = s("./utf8"), y = s("./compressions"), _ = s("./support");
|
|
1163
1163
|
function v(i, p) {
|
|
1164
1164
|
this.options = i, this.loadOptions = p;
|
|
1165
1165
|
}
|
|
@@ -1200,7 +1200,7 @@ https://github.com/nodeca/pako/blob/main/LICENSE
|
|
|
1200
1200
|
p = i.readInt(2), o = i.readInt(2), d = i.readData(o), this.extraFields[p] = { id: p, length: o, value: d };
|
|
1201
1201
|
i.setIndex(u);
|
|
1202
1202
|
}, handleUTF8: function() {
|
|
1203
|
-
var i =
|
|
1203
|
+
var i = _.uint8array ? "uint8array" : "array";
|
|
1204
1204
|
if (this.useUTF8())
|
|
1205
1205
|
this.fileNameStr = b.utf8decode(this.fileName), this.fileCommentStr = b.utf8decode(this.fileComment);
|
|
1206
1206
|
else {
|
|
@@ -1246,8 +1246,8 @@ https://github.com/nodeca/pako/blob/main/LICENSE
|
|
|
1246
1246
|
throw new Error("No output type specified.");
|
|
1247
1247
|
var u = (d = p.toLowerCase()) === "string" || d === "text";
|
|
1248
1248
|
d !== "binarystring" && d !== "text" || (d = "string"), o = this._decompressWorker();
|
|
1249
|
-
var
|
|
1250
|
-
|
|
1249
|
+
var g = !this._dataBinary;
|
|
1250
|
+
g && !u && (o = o.pipe(new c.Utf8EncodeWorker())), !g && u && (o = o.pipe(new c.Utf8DecodeWorker()));
|
|
1251
1251
|
} catch (x) {
|
|
1252
1252
|
(o = new y("error")).error(x);
|
|
1253
1253
|
}
|
|
@@ -1264,18 +1264,18 @@ https://github.com/nodeca/pako/blob/main/LICENSE
|
|
|
1264
1264
|
}, _decompressWorker: function() {
|
|
1265
1265
|
return this._data instanceof b ? this._data.getContentWorker() : this._data instanceof y ? this._data : new r(this._data);
|
|
1266
1266
|
} };
|
|
1267
|
-
for (var
|
|
1267
|
+
for (var _ = ["asText", "asBinary", "asNodeBuffer", "asUint8Array", "asArrayBuffer"], v = function() {
|
|
1268
1268
|
throw new Error("This method has been removed in JSZip 3.0, please check the upgrade guide.");
|
|
1269
|
-
}, i = 0; i <
|
|
1270
|
-
a.prototype[
|
|
1269
|
+
}, i = 0; i < _.length; i++)
|
|
1270
|
+
a.prototype[_[i]] = v;
|
|
1271
1271
|
C.exports = a;
|
|
1272
1272
|
}, { "./compressedObject": 2, "./stream/DataWorker": 27, "./stream/GenericWorker": 28, "./stream/StreamHelper": 29, "./utf8": 31 }], 36: [function(s, C, l) {
|
|
1273
1273
|
(function(a) {
|
|
1274
1274
|
var h, r, c = a.MutationObserver || a.WebKitMutationObserver;
|
|
1275
1275
|
if (c) {
|
|
1276
|
-
var b = 0, y = new c(p),
|
|
1277
|
-
y.observe(
|
|
1278
|
-
|
|
1276
|
+
var b = 0, y = new c(p), _ = a.document.createTextNode("");
|
|
1277
|
+
y.observe(_, { characterData: !0 }), h = function() {
|
|
1278
|
+
_.data = b = ++b % 2;
|
|
1279
1279
|
};
|
|
1280
1280
|
} else if (a.setImmediate || a.MessageChannel === void 0)
|
|
1281
1281
|
h = "document" in a && "onreadystatechange" in a.document.createElement("script") ? function() {
|
|
@@ -1306,25 +1306,25 @@ https://github.com/nodeca/pako/blob/main/LICENSE
|
|
|
1306
1306
|
C.exports = function(o) {
|
|
1307
1307
|
i.push(o) !== 1 || r || h();
|
|
1308
1308
|
};
|
|
1309
|
-
}).call(this, typeof
|
|
1309
|
+
}).call(this, typeof qt < "u" ? qt : typeof self < "u" ? self : typeof window < "u" ? window : {});
|
|
1310
1310
|
}, {}], 37: [function(s, C, l) {
|
|
1311
1311
|
var a = s("immediate");
|
|
1312
1312
|
function h() {
|
|
1313
1313
|
}
|
|
1314
1314
|
var r = {}, c = ["REJECTED"], b = ["FULFILLED"], y = ["PENDING"];
|
|
1315
|
-
function
|
|
1315
|
+
function _(u) {
|
|
1316
1316
|
if (typeof u != "function")
|
|
1317
1317
|
throw new TypeError("resolver must be a function");
|
|
1318
1318
|
this.state = y, this.queue = [], this.outcome = void 0, u !== h && o(this, u);
|
|
1319
1319
|
}
|
|
1320
|
-
function v(u,
|
|
1321
|
-
this.promise = u, typeof
|
|
1320
|
+
function v(u, g, x) {
|
|
1321
|
+
this.promise = u, typeof g == "function" && (this.onFulfilled = g, this.callFulfilled = this.otherCallFulfilled), typeof x == "function" && (this.onRejected = x, this.callRejected = this.otherCallRejected);
|
|
1322
1322
|
}
|
|
1323
|
-
function i(u,
|
|
1323
|
+
function i(u, g, x) {
|
|
1324
1324
|
a(function() {
|
|
1325
1325
|
var A;
|
|
1326
1326
|
try {
|
|
1327
|
-
A =
|
|
1327
|
+
A = g(x);
|
|
1328
1328
|
} catch (k) {
|
|
1329
1329
|
return r.reject(u, k);
|
|
1330
1330
|
}
|
|
@@ -1332,13 +1332,13 @@ https://github.com/nodeca/pako/blob/main/LICENSE
|
|
|
1332
1332
|
});
|
|
1333
1333
|
}
|
|
1334
1334
|
function p(u) {
|
|
1335
|
-
var
|
|
1336
|
-
if (u && (typeof u == "object" || typeof u == "function") && typeof
|
|
1335
|
+
var g = u && u.then;
|
|
1336
|
+
if (u && (typeof u == "object" || typeof u == "function") && typeof g == "function")
|
|
1337
1337
|
return function() {
|
|
1338
|
-
|
|
1338
|
+
g.apply(u, arguments);
|
|
1339
1339
|
};
|
|
1340
1340
|
}
|
|
1341
|
-
function o(u,
|
|
1341
|
+
function o(u, g) {
|
|
1342
1342
|
var x = !1;
|
|
1343
1343
|
function A(P) {
|
|
1344
1344
|
x || (x = !0, r.reject(u, P));
|
|
@@ -1347,39 +1347,39 @@ https://github.com/nodeca/pako/blob/main/LICENSE
|
|
|
1347
1347
|
x || (x = !0, r.resolve(u, P));
|
|
1348
1348
|
}
|
|
1349
1349
|
var O = d(function() {
|
|
1350
|
-
|
|
1350
|
+
g(k, A);
|
|
1351
1351
|
});
|
|
1352
1352
|
O.status === "error" && A(O.value);
|
|
1353
1353
|
}
|
|
1354
|
-
function d(u,
|
|
1354
|
+
function d(u, g) {
|
|
1355
1355
|
var x = {};
|
|
1356
1356
|
try {
|
|
1357
|
-
x.value = u(
|
|
1357
|
+
x.value = u(g), x.status = "success";
|
|
1358
1358
|
} catch (A) {
|
|
1359
1359
|
x.status = "error", x.value = A;
|
|
1360
1360
|
}
|
|
1361
1361
|
return x;
|
|
1362
1362
|
}
|
|
1363
|
-
(C.exports =
|
|
1363
|
+
(C.exports = _).prototype.finally = function(u) {
|
|
1364
1364
|
if (typeof u != "function")
|
|
1365
1365
|
return this;
|
|
1366
|
-
var
|
|
1366
|
+
var g = this.constructor;
|
|
1367
1367
|
return this.then(function(x) {
|
|
1368
|
-
return
|
|
1368
|
+
return g.resolve(u()).then(function() {
|
|
1369
1369
|
return x;
|
|
1370
1370
|
});
|
|
1371
1371
|
}, function(x) {
|
|
1372
|
-
return
|
|
1372
|
+
return g.resolve(u()).then(function() {
|
|
1373
1373
|
throw x;
|
|
1374
1374
|
});
|
|
1375
1375
|
});
|
|
1376
|
-
},
|
|
1376
|
+
}, _.prototype.catch = function(u) {
|
|
1377
1377
|
return this.then(null, u);
|
|
1378
|
-
},
|
|
1379
|
-
if (typeof u != "function" && this.state === b || typeof
|
|
1378
|
+
}, _.prototype.then = function(u, g) {
|
|
1379
|
+
if (typeof u != "function" && this.state === b || typeof g != "function" && this.state === c)
|
|
1380
1380
|
return this;
|
|
1381
1381
|
var x = new this.constructor(h);
|
|
1382
|
-
return this.state !== y ? i(x, this.state === b ? u :
|
|
1382
|
+
return this.state !== y ? i(x, this.state === b ? u : g, this.outcome) : this.queue.push(new v(x, u, g)), x;
|
|
1383
1383
|
}, v.prototype.callFulfilled = function(u) {
|
|
1384
1384
|
r.resolve(this.promise, u);
|
|
1385
1385
|
}, v.prototype.otherCallFulfilled = function(u) {
|
|
@@ -1388,31 +1388,31 @@ https://github.com/nodeca/pako/blob/main/LICENSE
|
|
|
1388
1388
|
r.reject(this.promise, u);
|
|
1389
1389
|
}, v.prototype.otherCallRejected = function(u) {
|
|
1390
1390
|
i(this.promise, this.onRejected, u);
|
|
1391
|
-
}, r.resolve = function(u,
|
|
1392
|
-
var x = d(p,
|
|
1391
|
+
}, r.resolve = function(u, g) {
|
|
1392
|
+
var x = d(p, g);
|
|
1393
1393
|
if (x.status === "error")
|
|
1394
1394
|
return r.reject(u, x.value);
|
|
1395
1395
|
var A = x.value;
|
|
1396
1396
|
if (A)
|
|
1397
1397
|
o(u, A);
|
|
1398
1398
|
else {
|
|
1399
|
-
u.state = b, u.outcome =
|
|
1399
|
+
u.state = b, u.outcome = g;
|
|
1400
1400
|
for (var k = -1, O = u.queue.length; ++k < O; )
|
|
1401
|
-
u.queue[k].callFulfilled(
|
|
1401
|
+
u.queue[k].callFulfilled(g);
|
|
1402
1402
|
}
|
|
1403
1403
|
return u;
|
|
1404
|
-
}, r.reject = function(u,
|
|
1405
|
-
u.state = c, u.outcome =
|
|
1404
|
+
}, r.reject = function(u, g) {
|
|
1405
|
+
u.state = c, u.outcome = g;
|
|
1406
1406
|
for (var x = -1, A = u.queue.length; ++x < A; )
|
|
1407
|
-
u.queue[x].callRejected(
|
|
1407
|
+
u.queue[x].callRejected(g);
|
|
1408
1408
|
return u;
|
|
1409
|
-
},
|
|
1409
|
+
}, _.resolve = function(u) {
|
|
1410
1410
|
return u instanceof this ? u : r.resolve(new this(h), u);
|
|
1411
|
-
},
|
|
1412
|
-
var
|
|
1413
|
-
return r.reject(
|
|
1414
|
-
},
|
|
1415
|
-
var
|
|
1411
|
+
}, _.reject = function(u) {
|
|
1412
|
+
var g = new this(h);
|
|
1413
|
+
return r.reject(g, u);
|
|
1414
|
+
}, _.all = function(u) {
|
|
1415
|
+
var g = this;
|
|
1416
1416
|
if (Object.prototype.toString.call(u) !== "[object Array]")
|
|
1417
1417
|
return this.reject(new TypeError("must be an array"));
|
|
1418
1418
|
var x = u.length, A = !1;
|
|
@@ -1422,21 +1422,21 @@ https://github.com/nodeca/pako/blob/main/LICENSE
|
|
|
1422
1422
|
I(u[P], P);
|
|
1423
1423
|
return F;
|
|
1424
1424
|
function I(H, tt) {
|
|
1425
|
-
|
|
1425
|
+
g.resolve(H).then(function(w) {
|
|
1426
1426
|
k[tt] = w, ++O !== x || A || (A = !0, r.resolve(F, k));
|
|
1427
1427
|
}, function(w) {
|
|
1428
1428
|
A || (A = !0, r.reject(F, w));
|
|
1429
1429
|
});
|
|
1430
1430
|
}
|
|
1431
|
-
},
|
|
1432
|
-
var
|
|
1431
|
+
}, _.race = function(u) {
|
|
1432
|
+
var g = this;
|
|
1433
1433
|
if (Object.prototype.toString.call(u) !== "[object Array]")
|
|
1434
1434
|
return this.reject(new TypeError("must be an array"));
|
|
1435
1435
|
var x = u.length, A = !1;
|
|
1436
1436
|
if (!x)
|
|
1437
1437
|
return this.resolve([]);
|
|
1438
1438
|
for (var k = -1, O = new this(h); ++k < x; )
|
|
1439
|
-
P = u[k],
|
|
1439
|
+
P = u[k], g.resolve(P).then(function(F) {
|
|
1440
1440
|
A || (A = !0, r.resolve(O, F));
|
|
1441
1441
|
}, function(F) {
|
|
1442
1442
|
A || (A = !0, r.reject(O, F));
|
|
@@ -1448,51 +1448,51 @@ https://github.com/nodeca/pako/blob/main/LICENSE
|
|
|
1448
1448
|
var a = {};
|
|
1449
1449
|
(0, s("./lib/utils/common").assign)(a, s("./lib/deflate"), s("./lib/inflate"), s("./lib/zlib/constants")), C.exports = a;
|
|
1450
1450
|
}, { "./lib/deflate": 39, "./lib/inflate": 40, "./lib/utils/common": 41, "./lib/zlib/constants": 44 }], 39: [function(s, C, l) {
|
|
1451
|
-
var a = s("./zlib/deflate"), h = s("./utils/common"), r = s("./utils/strings"), c = s("./zlib/messages"), b = s("./zlib/zstream"), y = Object.prototype.toString,
|
|
1451
|
+
var a = s("./zlib/deflate"), h = s("./utils/common"), r = s("./utils/strings"), c = s("./zlib/messages"), b = s("./zlib/zstream"), y = Object.prototype.toString, _ = 0, v = -1, i = 0, p = 8;
|
|
1452
1452
|
function o(u) {
|
|
1453
1453
|
if (!(this instanceof o))
|
|
1454
1454
|
return new o(u);
|
|
1455
1455
|
this.options = h.assign({ level: v, method: p, chunkSize: 16384, windowBits: 15, memLevel: 8, strategy: i, to: "" }, u || {});
|
|
1456
|
-
var
|
|
1457
|
-
|
|
1458
|
-
var x = a.deflateInit2(this.strm,
|
|
1459
|
-
if (x !==
|
|
1456
|
+
var g = this.options;
|
|
1457
|
+
g.raw && 0 < g.windowBits ? g.windowBits = -g.windowBits : g.gzip && 0 < g.windowBits && g.windowBits < 16 && (g.windowBits += 16), this.err = 0, this.msg = "", this.ended = !1, this.chunks = [], this.strm = new b(), this.strm.avail_out = 0;
|
|
1458
|
+
var x = a.deflateInit2(this.strm, g.level, g.method, g.windowBits, g.memLevel, g.strategy);
|
|
1459
|
+
if (x !== _)
|
|
1460
1460
|
throw new Error(c[x]);
|
|
1461
|
-
if (
|
|
1461
|
+
if (g.header && a.deflateSetHeader(this.strm, g.header), g.dictionary) {
|
|
1462
1462
|
var A;
|
|
1463
|
-
if (A = typeof
|
|
1463
|
+
if (A = typeof g.dictionary == "string" ? r.string2buf(g.dictionary) : y.call(g.dictionary) === "[object ArrayBuffer]" ? new Uint8Array(g.dictionary) : g.dictionary, (x = a.deflateSetDictionary(this.strm, A)) !== _)
|
|
1464
1464
|
throw new Error(c[x]);
|
|
1465
1465
|
this._dict_set = !0;
|
|
1466
1466
|
}
|
|
1467
1467
|
}
|
|
1468
|
-
function d(u,
|
|
1469
|
-
var x = new o(
|
|
1468
|
+
function d(u, g) {
|
|
1469
|
+
var x = new o(g);
|
|
1470
1470
|
if (x.push(u, !0), x.err)
|
|
1471
1471
|
throw x.msg || c[x.err];
|
|
1472
1472
|
return x.result;
|
|
1473
1473
|
}
|
|
1474
|
-
o.prototype.push = function(u,
|
|
1474
|
+
o.prototype.push = function(u, g) {
|
|
1475
1475
|
var x, A, k = this.strm, O = this.options.chunkSize;
|
|
1476
1476
|
if (this.ended)
|
|
1477
1477
|
return !1;
|
|
1478
|
-
A =
|
|
1478
|
+
A = g === ~~g ? g : g === !0 ? 4 : 0, typeof u == "string" ? k.input = r.string2buf(u) : y.call(u) === "[object ArrayBuffer]" ? k.input = new Uint8Array(u) : k.input = u, k.next_in = 0, k.avail_in = k.input.length;
|
|
1479
1479
|
do {
|
|
1480
|
-
if (k.avail_out === 0 && (k.output = new h.Buf8(O), k.next_out = 0, k.avail_out = O), (x = a.deflate(k, A)) !== 1 && x !==
|
|
1480
|
+
if (k.avail_out === 0 && (k.output = new h.Buf8(O), k.next_out = 0, k.avail_out = O), (x = a.deflate(k, A)) !== 1 && x !== _)
|
|
1481
1481
|
return this.onEnd(x), !(this.ended = !0);
|
|
1482
1482
|
k.avail_out !== 0 && (k.avail_in !== 0 || A !== 4 && A !== 2) || (this.options.to === "string" ? this.onData(r.buf2binstring(h.shrinkBuf(k.output, k.next_out))) : this.onData(h.shrinkBuf(k.output, k.next_out)));
|
|
1483
1483
|
} while ((0 < k.avail_in || k.avail_out === 0) && x !== 1);
|
|
1484
|
-
return A === 4 ? (x = a.deflateEnd(this.strm), this.onEnd(x), this.ended = !0, x ===
|
|
1484
|
+
return A === 4 ? (x = a.deflateEnd(this.strm), this.onEnd(x), this.ended = !0, x === _) : A !== 2 || (this.onEnd(_), !(k.avail_out = 0));
|
|
1485
1485
|
}, o.prototype.onData = function(u) {
|
|
1486
1486
|
this.chunks.push(u);
|
|
1487
1487
|
}, o.prototype.onEnd = function(u) {
|
|
1488
|
-
u ===
|
|
1489
|
-
}, l.Deflate = o, l.deflate = d, l.deflateRaw = function(u,
|
|
1490
|
-
return (
|
|
1491
|
-
}, l.gzip = function(u,
|
|
1492
|
-
return (
|
|
1488
|
+
u === _ && (this.options.to === "string" ? this.result = this.chunks.join("") : this.result = h.flattenChunks(this.chunks)), this.chunks = [], this.err = u, this.msg = this.strm.msg;
|
|
1489
|
+
}, l.Deflate = o, l.deflate = d, l.deflateRaw = function(u, g) {
|
|
1490
|
+
return (g = g || {}).raw = !0, d(u, g);
|
|
1491
|
+
}, l.gzip = function(u, g) {
|
|
1492
|
+
return (g = g || {}).gzip = !0, d(u, g);
|
|
1493
1493
|
};
|
|
1494
1494
|
}, { "./utils/common": 41, "./utils/strings": 42, "./zlib/deflate": 46, "./zlib/messages": 51, "./zlib/zstream": 53 }], 40: [function(s, C, l) {
|
|
1495
|
-
var a = s("./zlib/inflate"), h = s("./utils/common"), r = s("./utils/strings"), c = s("./zlib/constants"), b = s("./zlib/messages"), y = s("./zlib/zstream"),
|
|
1495
|
+
var a = s("./zlib/inflate"), h = s("./utils/common"), r = s("./utils/strings"), c = s("./zlib/constants"), b = s("./zlib/messages"), y = s("./zlib/zstream"), _ = s("./zlib/gzheader"), v = Object.prototype.toString;
|
|
1496
1496
|
function i(o) {
|
|
1497
1497
|
if (!(this instanceof i))
|
|
1498
1498
|
return new i(o);
|
|
@@ -1502,7 +1502,7 @@ https://github.com/nodeca/pako/blob/main/LICENSE
|
|
|
1502
1502
|
var u = a.inflateInit2(this.strm, d.windowBits);
|
|
1503
1503
|
if (u !== c.Z_OK)
|
|
1504
1504
|
throw new Error(b[u]);
|
|
1505
|
-
this.header = new
|
|
1505
|
+
this.header = new _(), a.inflateGetHeader(this.strm, this.header);
|
|
1506
1506
|
}
|
|
1507
1507
|
function p(o, d) {
|
|
1508
1508
|
var u = new i(d);
|
|
@@ -1511,16 +1511,16 @@ https://github.com/nodeca/pako/blob/main/LICENSE
|
|
|
1511
1511
|
return u.result;
|
|
1512
1512
|
}
|
|
1513
1513
|
i.prototype.push = function(o, d) {
|
|
1514
|
-
var u,
|
|
1514
|
+
var u, g, x, A, k, O, P = this.strm, F = this.options.chunkSize, I = this.options.dictionary, H = !1;
|
|
1515
1515
|
if (this.ended)
|
|
1516
1516
|
return !1;
|
|
1517
|
-
|
|
1517
|
+
g = d === ~~d ? d : d === !0 ? c.Z_FINISH : c.Z_NO_FLUSH, typeof o == "string" ? P.input = r.binstring2buf(o) : v.call(o) === "[object ArrayBuffer]" ? P.input = new Uint8Array(o) : P.input = o, P.next_in = 0, P.avail_in = P.input.length;
|
|
1518
1518
|
do {
|
|
1519
1519
|
if (P.avail_out === 0 && (P.output = new h.Buf8(F), P.next_out = 0, P.avail_out = F), (u = a.inflate(P, c.Z_NO_FLUSH)) === c.Z_NEED_DICT && I && (O = typeof I == "string" ? r.string2buf(I) : v.call(I) === "[object ArrayBuffer]" ? new Uint8Array(I) : I, u = a.inflateSetDictionary(this.strm, O)), u === c.Z_BUF_ERROR && H === !0 && (u = c.Z_OK, H = !1), u !== c.Z_STREAM_END && u !== c.Z_OK)
|
|
1520
1520
|
return this.onEnd(u), !(this.ended = !0);
|
|
1521
|
-
P.next_out && (P.avail_out !== 0 && u !== c.Z_STREAM_END && (P.avail_in !== 0 ||
|
|
1521
|
+
P.next_out && (P.avail_out !== 0 && u !== c.Z_STREAM_END && (P.avail_in !== 0 || g !== c.Z_FINISH && g !== c.Z_SYNC_FLUSH) || (this.options.to === "string" ? (x = r.utf8border(P.output, P.next_out), A = P.next_out - x, k = r.buf2string(P.output, x), P.next_out = A, P.avail_out = F - A, A && h.arraySet(P.output, P.output, x, A, 0), this.onData(k)) : this.onData(h.shrinkBuf(P.output, P.next_out)))), P.avail_in === 0 && P.avail_out === 0 && (H = !0);
|
|
1522
1522
|
} while ((0 < P.avail_in || P.avail_out === 0) && u !== c.Z_STREAM_END);
|
|
1523
|
-
return u === c.Z_STREAM_END && (
|
|
1523
|
+
return u === c.Z_STREAM_END && (g = c.Z_FINISH), g === c.Z_FINISH ? (u = a.inflateEnd(this.strm), this.onEnd(u), this.ended = !0, u === c.Z_OK) : g !== c.Z_SYNC_FLUSH || (this.onEnd(c.Z_OK), !(P.avail_out = 0));
|
|
1524
1524
|
}, i.prototype.onData = function(o) {
|
|
1525
1525
|
this.chunks.push(o);
|
|
1526
1526
|
}, i.prototype.onEnd = function(o) {
|
|
@@ -1536,29 +1536,29 @@ https://github.com/nodeca/pako/blob/main/LICENSE
|
|
|
1536
1536
|
if (y) {
|
|
1537
1537
|
if (typeof y != "object")
|
|
1538
1538
|
throw new TypeError(y + "must be non-object");
|
|
1539
|
-
for (var
|
|
1540
|
-
y.hasOwnProperty(
|
|
1539
|
+
for (var _ in y)
|
|
1540
|
+
y.hasOwnProperty(_) && (c[_] = y[_]);
|
|
1541
1541
|
}
|
|
1542
1542
|
}
|
|
1543
1543
|
return c;
|
|
1544
1544
|
}, l.shrinkBuf = function(c, b) {
|
|
1545
1545
|
return c.length === b ? c : c.subarray ? c.subarray(0, b) : (c.length = b, c);
|
|
1546
1546
|
};
|
|
1547
|
-
var h = { arraySet: function(c, b, y,
|
|
1547
|
+
var h = { arraySet: function(c, b, y, _, v) {
|
|
1548
1548
|
if (b.subarray && c.subarray)
|
|
1549
|
-
c.set(b.subarray(y, y +
|
|
1549
|
+
c.set(b.subarray(y, y + _), v);
|
|
1550
1550
|
else
|
|
1551
|
-
for (var i = 0; i <
|
|
1551
|
+
for (var i = 0; i < _; i++)
|
|
1552
1552
|
c[v + i] = b[y + i];
|
|
1553
1553
|
}, flattenChunks: function(c) {
|
|
1554
|
-
var b, y,
|
|
1555
|
-
for (b =
|
|
1556
|
-
|
|
1557
|
-
for (p = new Uint8Array(
|
|
1554
|
+
var b, y, _, v, i, p;
|
|
1555
|
+
for (b = _ = 0, y = c.length; b < y; b++)
|
|
1556
|
+
_ += c[b].length;
|
|
1557
|
+
for (p = new Uint8Array(_), b = v = 0, y = c.length; b < y; b++)
|
|
1558
1558
|
i = c[b], p.set(i, v), v += i.length;
|
|
1559
1559
|
return p;
|
|
1560
|
-
} }, r = { arraySet: function(c, b, y,
|
|
1561
|
-
for (var i = 0; i <
|
|
1560
|
+
} }, r = { arraySet: function(c, b, y, _, v) {
|
|
1561
|
+
for (var i = 0; i < _; i++)
|
|
1562
1562
|
c[v + i] = b[y + i];
|
|
1563
1563
|
}, flattenChunks: function(c) {
|
|
1564
1564
|
return [].concat.apply([], c);
|
|
@@ -1580,49 +1580,49 @@ https://github.com/nodeca/pako/blob/main/LICENSE
|
|
|
1580
1580
|
}
|
|
1581
1581
|
for (var c = new a.Buf8(256), b = 0; b < 256; b++)
|
|
1582
1582
|
c[b] = 252 <= b ? 6 : 248 <= b ? 5 : 240 <= b ? 4 : 224 <= b ? 3 : 192 <= b ? 2 : 1;
|
|
1583
|
-
function y(
|
|
1584
|
-
if (v < 65537 && (
|
|
1585
|
-
return String.fromCharCode.apply(null, a.shrinkBuf(
|
|
1583
|
+
function y(_, v) {
|
|
1584
|
+
if (v < 65537 && (_.subarray && r || !_.subarray && h))
|
|
1585
|
+
return String.fromCharCode.apply(null, a.shrinkBuf(_, v));
|
|
1586
1586
|
for (var i = "", p = 0; p < v; p++)
|
|
1587
|
-
i += String.fromCharCode(
|
|
1587
|
+
i += String.fromCharCode(_[p]);
|
|
1588
1588
|
return i;
|
|
1589
1589
|
}
|
|
1590
|
-
c[254] = c[254] = 1, l.string2buf = function(
|
|
1591
|
-
var v, i, p, o, d, u =
|
|
1590
|
+
c[254] = c[254] = 1, l.string2buf = function(_) {
|
|
1591
|
+
var v, i, p, o, d, u = _.length, g = 0;
|
|
1592
1592
|
for (o = 0; o < u; o++)
|
|
1593
|
-
(64512 & (i =
|
|
1594
|
-
for (v = new a.Buf8(
|
|
1595
|
-
(64512 & (i =
|
|
1593
|
+
(64512 & (i = _.charCodeAt(o))) == 55296 && o + 1 < u && (64512 & (p = _.charCodeAt(o + 1))) == 56320 && (i = 65536 + (i - 55296 << 10) + (p - 56320), o++), g += i < 128 ? 1 : i < 2048 ? 2 : i < 65536 ? 3 : 4;
|
|
1594
|
+
for (v = new a.Buf8(g), o = d = 0; d < g; o++)
|
|
1595
|
+
(64512 & (i = _.charCodeAt(o))) == 55296 && o + 1 < u && (64512 & (p = _.charCodeAt(o + 1))) == 56320 && (i = 65536 + (i - 55296 << 10) + (p - 56320), o++), i < 128 ? v[d++] = i : (i < 2048 ? v[d++] = 192 | i >>> 6 : (i < 65536 ? v[d++] = 224 | i >>> 12 : (v[d++] = 240 | i >>> 18, v[d++] = 128 | i >>> 12 & 63), v[d++] = 128 | i >>> 6 & 63), v[d++] = 128 | 63 & i);
|
|
1596
1596
|
return v;
|
|
1597
|
-
}, l.buf2binstring = function(
|
|
1598
|
-
return y(
|
|
1599
|
-
}, l.binstring2buf = function(
|
|
1600
|
-
for (var v = new a.Buf8(
|
|
1601
|
-
v[i] =
|
|
1597
|
+
}, l.buf2binstring = function(_) {
|
|
1598
|
+
return y(_, _.length);
|
|
1599
|
+
}, l.binstring2buf = function(_) {
|
|
1600
|
+
for (var v = new a.Buf8(_.length), i = 0, p = v.length; i < p; i++)
|
|
1601
|
+
v[i] = _.charCodeAt(i);
|
|
1602
1602
|
return v;
|
|
1603
|
-
}, l.buf2string = function(
|
|
1604
|
-
var i, p, o, d, u = v ||
|
|
1603
|
+
}, l.buf2string = function(_, v) {
|
|
1604
|
+
var i, p, o, d, u = v || _.length, g = new Array(2 * u);
|
|
1605
1605
|
for (i = p = 0; i < u; )
|
|
1606
|
-
if ((o =
|
|
1607
|
-
|
|
1606
|
+
if ((o = _[i++]) < 128)
|
|
1607
|
+
g[p++] = o;
|
|
1608
1608
|
else if (4 < (d = c[o]))
|
|
1609
|
-
|
|
1609
|
+
g[p++] = 65533, i += d - 1;
|
|
1610
1610
|
else {
|
|
1611
1611
|
for (o &= d === 2 ? 31 : d === 3 ? 15 : 7; 1 < d && i < u; )
|
|
1612
|
-
o = o << 6 | 63 &
|
|
1613
|
-
1 < d ?
|
|
1612
|
+
o = o << 6 | 63 & _[i++], d--;
|
|
1613
|
+
1 < d ? g[p++] = 65533 : o < 65536 ? g[p++] = o : (o -= 65536, g[p++] = 55296 | o >> 10 & 1023, g[p++] = 56320 | 1023 & o);
|
|
1614
1614
|
}
|
|
1615
|
-
return y(
|
|
1616
|
-
}, l.utf8border = function(
|
|
1615
|
+
return y(g, p);
|
|
1616
|
+
}, l.utf8border = function(_, v) {
|
|
1617
1617
|
var i;
|
|
1618
|
-
for ((v = v ||
|
|
1618
|
+
for ((v = v || _.length) > _.length && (v = _.length), i = v - 1; 0 <= i && (192 & _[i]) == 128; )
|
|
1619
1619
|
i--;
|
|
1620
|
-
return i < 0 || i === 0 ? v : i + c[
|
|
1620
|
+
return i < 0 || i === 0 ? v : i + c[_[i]] > v ? i : v;
|
|
1621
1621
|
};
|
|
1622
1622
|
}, { "./common": 41 }], 43: [function(s, C, l) {
|
|
1623
1623
|
C.exports = function(a, h, r, c) {
|
|
1624
|
-
for (var b = 65535 & a | 0, y = a >>> 16 & 65535 | 0,
|
|
1625
|
-
for (r -=
|
|
1624
|
+
for (var b = 65535 & a | 0, y = a >>> 16 & 65535 | 0, _ = 0; r !== 0; ) {
|
|
1625
|
+
for (r -= _ = 2e3 < r ? 2e3 : r; y = y + (b = b + h[c++] | 0) | 0, --_; )
|
|
1626
1626
|
;
|
|
1627
1627
|
b %= 65521, y %= 65521;
|
|
1628
1628
|
}
|
|
@@ -1641,14 +1641,14 @@ https://github.com/nodeca/pako/blob/main/LICENSE
|
|
|
1641
1641
|
return r;
|
|
1642
1642
|
}();
|
|
1643
1643
|
C.exports = function(h, r, c, b) {
|
|
1644
|
-
var y = a,
|
|
1644
|
+
var y = a, _ = b + c;
|
|
1645
1645
|
h ^= -1;
|
|
1646
|
-
for (var v = b; v <
|
|
1646
|
+
for (var v = b; v < _; v++)
|
|
1647
1647
|
h = h >>> 8 ^ y[255 & (h ^ r[v])];
|
|
1648
1648
|
return -1 ^ h;
|
|
1649
1649
|
};
|
|
1650
1650
|
}, {}], 46: [function(s, C, l) {
|
|
1651
|
-
var a, h = s("../utils/common"), r = s("./trees"), c = s("./adler32"), b = s("./crc32"), y = s("./messages"),
|
|
1651
|
+
var a, h = s("../utils/common"), r = s("./trees"), c = s("./adler32"), b = s("./crc32"), y = s("./messages"), _ = 0, v = 4, i = 0, p = -2, o = -1, d = 4, u = 2, g = 8, x = 9, A = 286, k = 30, O = 19, P = 2 * A + 1, F = 15, I = 3, H = 258, tt = H + I + 1, w = 42, L = 113, n = 1, T = 2, V = 3, M = 4;
|
|
1652
1652
|
function et(e, j) {
|
|
1653
1653
|
return e.msg = y[j], j;
|
|
1654
1654
|
}
|
|
@@ -1672,26 +1672,26 @@ https://github.com/nodeca/pako/blob/main/LICENSE
|
|
|
1672
1672
|
function Y(e, j) {
|
|
1673
1673
|
e.pending_buf[e.pending++] = j >>> 8 & 255, e.pending_buf[e.pending++] = 255 & j;
|
|
1674
1674
|
}
|
|
1675
|
-
function
|
|
1676
|
-
var U, m, f = e.max_chain_length, S = e.strstart,
|
|
1675
|
+
function q(e, j) {
|
|
1676
|
+
var U, m, f = e.max_chain_length, S = e.strstart, Z = e.prev_length, G = e.nice_match, B = e.strstart > e.w_size - tt ? e.strstart - (e.w_size - tt) : 0, J = e.window, ot = e.w_mask, X = e.prev, lt = e.strstart + H, wt = J[S + Z - 1], gt = J[S + Z];
|
|
1677
1677
|
e.prev_length >= e.good_match && (f >>= 2), G > e.lookahead && (G = e.lookahead);
|
|
1678
1678
|
do
|
|
1679
|
-
if (J[(U = j) +
|
|
1679
|
+
if (J[(U = j) + Z] === gt && J[U + Z - 1] === wt && J[U] === J[S] && J[++U] === J[S + 1]) {
|
|
1680
1680
|
S += 2, U++;
|
|
1681
1681
|
do
|
|
1682
1682
|
;
|
|
1683
1683
|
while (J[++S] === J[++U] && J[++S] === J[++U] && J[++S] === J[++U] && J[++S] === J[++U] && J[++S] === J[++U] && J[++S] === J[++U] && J[++S] === J[++U] && J[++S] === J[++U] && S < lt);
|
|
1684
|
-
if (m = H - (lt - S), S = lt - H,
|
|
1685
|
-
if (e.match_start = j, G <= (
|
|
1684
|
+
if (m = H - (lt - S), S = lt - H, Z < m) {
|
|
1685
|
+
if (e.match_start = j, G <= (Z = m))
|
|
1686
1686
|
break;
|
|
1687
|
-
wt = J[S +
|
|
1687
|
+
wt = J[S + Z - 1], gt = J[S + Z];
|
|
1688
1688
|
}
|
|
1689
1689
|
}
|
|
1690
1690
|
while ((j = X[j & ot]) > B && --f != 0);
|
|
1691
|
-
return
|
|
1691
|
+
return Z <= e.lookahead ? Z : e.lookahead;
|
|
1692
1692
|
}
|
|
1693
1693
|
function ht(e) {
|
|
1694
|
-
var j, U, m, f, S,
|
|
1694
|
+
var j, U, m, f, S, Z, G, B, J, ot, X = e.w_size;
|
|
1695
1695
|
do {
|
|
1696
1696
|
if (f = e.window_size - e.lookahead - e.strstart, e.strstart >= X + (X - tt)) {
|
|
1697
1697
|
for (h.arraySet(e.window, e.window, X, X, 0), e.match_start -= X, e.strstart -= X, e.block_start -= X, j = U = e.hash_size; m = e.head[--j], e.head[j] = X <= m ? m - X : 0, --U; )
|
|
@@ -1702,7 +1702,7 @@ https://github.com/nodeca/pako/blob/main/LICENSE
|
|
|
1702
1702
|
}
|
|
1703
1703
|
if (e.strm.avail_in === 0)
|
|
1704
1704
|
break;
|
|
1705
|
-
if (
|
|
1705
|
+
if (Z = e.strm, G = e.window, B = e.strstart + e.lookahead, J = f, ot = void 0, ot = Z.avail_in, J < ot && (ot = J), U = ot === 0 ? 0 : (Z.avail_in -= ot, h.arraySet(G, Z.input, Z.next_in, ot, B), Z.state.wrap === 1 ? Z.adler = c(Z.adler, G, ot, B) : Z.state.wrap === 2 && (Z.adler = b(Z.adler, G, ot, B)), Z.next_in += ot, Z.total_in += ot, ot), e.lookahead += U, e.lookahead + e.insert >= I)
|
|
1706
1706
|
for (S = e.strstart - e.insert, e.ins_h = e.window[S], e.ins_h = (e.ins_h << e.hash_shift ^ e.window[S + 1]) & e.hash_mask; e.insert && (e.ins_h = (e.ins_h << e.hash_shift ^ e.window[S + I - 1]) & e.hash_mask, e.prev[S & e.w_mask] = e.head[e.ins_h], e.head[e.ins_h] = S, S++, e.insert--, !(e.lookahead + e.insert < I)); )
|
|
1707
1707
|
;
|
|
1708
1708
|
} while (e.lookahead < tt && e.strm.avail_in !== 0);
|
|
@@ -1710,12 +1710,12 @@ https://github.com/nodeca/pako/blob/main/LICENSE
|
|
|
1710
1710
|
function mt(e, j) {
|
|
1711
1711
|
for (var U, m; ; ) {
|
|
1712
1712
|
if (e.lookahead < tt) {
|
|
1713
|
-
if (ht(e), e.lookahead < tt && j ===
|
|
1713
|
+
if (ht(e), e.lookahead < tt && j === _)
|
|
1714
1714
|
return n;
|
|
1715
1715
|
if (e.lookahead === 0)
|
|
1716
1716
|
break;
|
|
1717
1717
|
}
|
|
1718
|
-
if (U = 0, e.lookahead >= I && (e.ins_h = (e.ins_h << e.hash_shift ^ e.window[e.strstart + I - 1]) & e.hash_mask, U = e.prev[e.strstart & e.w_mask] = e.head[e.ins_h], e.head[e.ins_h] = e.strstart), U !== 0 && e.strstart - U <= e.w_size - tt && (e.match_length =
|
|
1718
|
+
if (U = 0, e.lookahead >= I && (e.ins_h = (e.ins_h << e.hash_shift ^ e.window[e.strstart + I - 1]) & e.hash_mask, U = e.prev[e.strstart & e.w_mask] = e.head[e.ins_h], e.head[e.ins_h] = e.strstart), U !== 0 && e.strstart - U <= e.w_size - tt && (e.match_length = q(e, U)), e.match_length >= I)
|
|
1719
1719
|
if (m = r._tr_tally(e, e.strstart - e.match_start, e.match_length - I), e.lookahead -= e.match_length, e.match_length <= e.max_lazy_match && e.lookahead >= I) {
|
|
1720
1720
|
for (e.match_length--; e.strstart++, e.ins_h = (e.ins_h << e.hash_shift ^ e.window[e.strstart + I - 1]) & e.hash_mask, U = e.prev[e.strstart & e.w_mask] = e.head[e.ins_h], e.head[e.ins_h] = e.strstart, --e.match_length != 0; )
|
|
1721
1721
|
;
|
|
@@ -1732,12 +1732,12 @@ https://github.com/nodeca/pako/blob/main/LICENSE
|
|
|
1732
1732
|
function at(e, j) {
|
|
1733
1733
|
for (var U, m, f; ; ) {
|
|
1734
1734
|
if (e.lookahead < tt) {
|
|
1735
|
-
if (ht(e), e.lookahead < tt && j ===
|
|
1735
|
+
if (ht(e), e.lookahead < tt && j === _)
|
|
1736
1736
|
return n;
|
|
1737
1737
|
if (e.lookahead === 0)
|
|
1738
1738
|
break;
|
|
1739
1739
|
}
|
|
1740
|
-
if (U = 0, e.lookahead >= I && (e.ins_h = (e.ins_h << e.hash_shift ^ e.window[e.strstart + I - 1]) & e.hash_mask, U = e.prev[e.strstart & e.w_mask] = e.head[e.ins_h], e.head[e.ins_h] = e.strstart), e.prev_length = e.match_length, e.prev_match = e.match_start, e.match_length = I - 1, U !== 0 && e.prev_length < e.max_lazy_match && e.strstart - U <= e.w_size - tt && (e.match_length =
|
|
1740
|
+
if (U = 0, e.lookahead >= I && (e.ins_h = (e.ins_h << e.hash_shift ^ e.window[e.strstart + I - 1]) & e.hash_mask, U = e.prev[e.strstart & e.w_mask] = e.head[e.ins_h], e.head[e.ins_h] = e.strstart), e.prev_length = e.match_length, e.prev_match = e.match_start, e.match_length = I - 1, U !== 0 && e.prev_length < e.max_lazy_match && e.strstart - U <= e.w_size - tt && (e.match_length = q(e, U), e.match_length <= 5 && (e.strategy === 1 || e.match_length === I && 4096 < e.strstart - e.match_start) && (e.match_length = I - 1)), e.prev_length >= I && e.match_length <= e.prev_length) {
|
|
1741
1741
|
for (f = e.strstart + e.lookahead - I, m = r._tr_tally(e, e.strstart - 1 - e.prev_match, e.prev_length - I), e.lookahead -= e.prev_length - 1, e.prev_length -= 2; ++e.strstart <= f && (e.ins_h = (e.ins_h << e.hash_shift ^ e.window[e.strstart + I - 1]) & e.hash_mask, U = e.prev[e.strstart & e.w_mask] = e.head[e.ins_h], e.head[e.ins_h] = e.strstart), --e.prev_length != 0; )
|
|
1742
1742
|
;
|
|
1743
1743
|
if (e.match_available = 0, e.match_length = I - 1, e.strstart++, m && (N(e, !1), e.strm.avail_out === 0))
|
|
@@ -1754,11 +1754,11 @@ https://github.com/nodeca/pako/blob/main/LICENSE
|
|
|
1754
1754
|
this.good_length = e, this.max_lazy = j, this.nice_length = U, this.max_chain = m, this.func = f;
|
|
1755
1755
|
}
|
|
1756
1756
|
function pt() {
|
|
1757
|
-
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 =
|
|
1757
|
+
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 = g, 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 h.Buf16(2 * P), this.dyn_dtree = new h.Buf16(2 * (2 * k + 1)), this.bl_tree = new h.Buf16(2 * (2 * O + 1)), K(this.dyn_ltree), K(this.dyn_dtree), K(this.bl_tree), this.l_desc = null, this.d_desc = null, this.bl_desc = null, this.bl_count = new h.Buf16(F + 1), this.heap = new h.Buf16(2 * A + 1), K(this.heap), this.heap_len = 0, this.heap_max = 0, this.depth = new h.Buf16(2 * A + 1), K(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;
|
|
1758
1758
|
}
|
|
1759
1759
|
function dt(e) {
|
|
1760
1760
|
var j;
|
|
1761
|
-
return e && e.state ? (e.total_in = e.total_out = 0, e.data_type = u, (j = e.state).pending = 0, j.pending_out = 0, j.wrap < 0 && (j.wrap = -j.wrap), j.status = j.wrap ? w : L, e.adler = j.wrap === 2 ? 0 : 1, j.last_flush =
|
|
1761
|
+
return e && e.state ? (e.total_in = e.total_out = 0, e.data_type = u, (j = e.state).pending = 0, j.pending_out = 0, j.wrap < 0 && (j.wrap = -j.wrap), j.status = j.wrap ? w : L, e.adler = j.wrap === 2 ? 0 : 1, j.last_flush = _, r._tr_init(j), i) : et(e, p);
|
|
1762
1762
|
}
|
|
1763
1763
|
function St(e) {
|
|
1764
1764
|
var j = dt(e);
|
|
@@ -1769,18 +1769,18 @@ https://github.com/nodeca/pako/blob/main/LICENSE
|
|
|
1769
1769
|
function kt(e, j, U, m, f, S) {
|
|
1770
1770
|
if (!e)
|
|
1771
1771
|
return p;
|
|
1772
|
-
var
|
|
1773
|
-
if (j === o && (j = 6), m < 0 ? (
|
|
1772
|
+
var Z = 1;
|
|
1773
|
+
if (j === o && (j = 6), m < 0 ? (Z = 0, m = -m) : 15 < m && (Z = 2, m -= 16), f < 1 || x < f || U !== g || m < 8 || 15 < m || j < 0 || 9 < j || S < 0 || d < S)
|
|
1774
1774
|
return et(e, p);
|
|
1775
1775
|
m === 8 && (m = 9);
|
|
1776
1776
|
var G = new pt();
|
|
1777
|
-
return (e.state = G).strm = e, G.wrap =
|
|
1777
|
+
return (e.state = G).strm = e, G.wrap = Z, G.gzhead = null, G.w_bits = m, G.w_size = 1 << G.w_bits, G.w_mask = G.w_size - 1, G.hash_bits = f + 7, G.hash_size = 1 << G.hash_bits, G.hash_mask = G.hash_size - 1, G.hash_shift = ~~((G.hash_bits + I - 1) / I), G.window = new h.Buf8(2 * G.w_size), G.head = new h.Buf16(G.hash_size), G.prev = new h.Buf16(G.w_size), G.lit_bufsize = 1 << f + 6, G.pending_buf_size = 4 * G.lit_bufsize, G.pending_buf = new h.Buf8(G.pending_buf_size), G.d_buf = 1 * G.lit_bufsize, G.l_buf = 3 * G.lit_bufsize, G.level = j, G.strategy = S, G.method = U, St(e);
|
|
1778
1778
|
}
|
|
1779
1779
|
a = [new ct(0, 0, 0, 0, function(e, j) {
|
|
1780
1780
|
var U = 65535;
|
|
1781
1781
|
for (U > e.pending_buf_size - 5 && (U = e.pending_buf_size - 5); ; ) {
|
|
1782
1782
|
if (e.lookahead <= 1) {
|
|
1783
|
-
if (ht(e), e.lookahead === 0 && j ===
|
|
1783
|
+
if (ht(e), e.lookahead === 0 && j === _)
|
|
1784
1784
|
return n;
|
|
1785
1785
|
if (e.lookahead === 0)
|
|
1786
1786
|
break;
|
|
@@ -1792,7 +1792,7 @@ https://github.com/nodeca/pako/blob/main/LICENSE
|
|
|
1792
1792
|
}
|
|
1793
1793
|
return e.insert = 0, j === v ? (N(e, !0), e.strm.avail_out === 0 ? V : M) : (e.strstart > e.block_start && (N(e, !1), e.strm.avail_out), n);
|
|
1794
1794
|
}), new ct(4, 4, 8, 4, mt), new ct(4, 5, 16, 8, mt), new ct(4, 6, 32, 32, mt), new ct(4, 4, 16, 16, at), new ct(8, 16, 32, 32, at), new ct(8, 16, 128, 128, at), new ct(8, 32, 128, 256, at), new ct(32, 128, 258, 1024, at), new ct(32, 258, 258, 4096, at)], l.deflateInit = function(e, j) {
|
|
1795
|
-
return kt(e, j,
|
|
1795
|
+
return kt(e, j, g, 15, 8, 0);
|
|
1796
1796
|
}, l.deflateInit2 = kt, l.deflateReset = St, l.deflateResetKeep = dt, l.deflateSetHeader = function(e, j) {
|
|
1797
1797
|
return e && e.state ? e.state.wrap !== 2 ? p : (e.state.gzhead = j, i) : p;
|
|
1798
1798
|
}, l.deflate = function(e, j) {
|
|
@@ -1805,8 +1805,8 @@ https://github.com/nodeca/pako/blob/main/LICENSE
|
|
|
1805
1805
|
if (m.wrap === 2)
|
|
1806
1806
|
e.adler = 0, it(m, 31), it(m, 139), it(m, 8), m.gzhead ? (it(m, (m.gzhead.text ? 1 : 0) + (m.gzhead.hcrc ? 2 : 0) + (m.gzhead.extra ? 4 : 0) + (m.gzhead.name ? 8 : 0) + (m.gzhead.comment ? 16 : 0)), it(m, 255 & m.gzhead.time), it(m, m.gzhead.time >> 8 & 255), it(m, m.gzhead.time >> 16 & 255), it(m, m.gzhead.time >> 24 & 255), it(m, m.level === 9 ? 2 : 2 <= m.strategy || m.level < 2 ? 4 : 0), it(m, 255 & m.gzhead.os), m.gzhead.extra && m.gzhead.extra.length && (it(m, 255 & m.gzhead.extra.length), it(m, m.gzhead.extra.length >> 8 & 255)), m.gzhead.hcrc && (e.adler = b(e.adler, m.pending_buf, m.pending, 0)), m.gzindex = 0, m.status = 69) : (it(m, 0), it(m, 0), it(m, 0), it(m, 0), it(m, 0), it(m, m.level === 9 ? 2 : 2 <= m.strategy || m.level < 2 ? 4 : 0), it(m, 3), m.status = L);
|
|
1807
1807
|
else {
|
|
1808
|
-
var
|
|
1809
|
-
|
|
1808
|
+
var Z = g + (m.w_bits - 8 << 4) << 8;
|
|
1809
|
+
Z |= (2 <= m.strategy || m.level < 2 ? 0 : m.level < 6 ? 1 : m.level === 6 ? 2 : 3) << 6, m.strstart !== 0 && (Z |= 32), Z += 31 - Z % 31, m.status = L, Y(m, Z), m.strstart !== 0 && (Y(m, e.adler >>> 16), Y(m, 65535 & e.adler)), e.adler = 1;
|
|
1810
1810
|
}
|
|
1811
1811
|
if (m.status === 69)
|
|
1812
1812
|
if (m.gzhead.extra) {
|
|
@@ -1848,11 +1848,11 @@ https://github.com/nodeca/pako/blob/main/LICENSE
|
|
|
1848
1848
|
return et(e, -5);
|
|
1849
1849
|
if (m.status === 666 && e.avail_in !== 0)
|
|
1850
1850
|
return et(e, -5);
|
|
1851
|
-
if (e.avail_in !== 0 || m.lookahead !== 0 || j !==
|
|
1851
|
+
if (e.avail_in !== 0 || m.lookahead !== 0 || j !== _ && m.status !== 666) {
|
|
1852
1852
|
var G = m.strategy === 2 ? function(B, J) {
|
|
1853
1853
|
for (var ot; ; ) {
|
|
1854
1854
|
if (B.lookahead === 0 && (ht(B), B.lookahead === 0)) {
|
|
1855
|
-
if (J ===
|
|
1855
|
+
if (J === _)
|
|
1856
1856
|
return n;
|
|
1857
1857
|
break;
|
|
1858
1858
|
}
|
|
@@ -1863,7 +1863,7 @@ https://github.com/nodeca/pako/blob/main/LICENSE
|
|
|
1863
1863
|
}(m, j) : m.strategy === 3 ? function(B, J) {
|
|
1864
1864
|
for (var ot, X, lt, wt, gt = B.window; ; ) {
|
|
1865
1865
|
if (B.lookahead <= H) {
|
|
1866
|
-
if (ht(B), B.lookahead <= H && J ===
|
|
1866
|
+
if (ht(B), B.lookahead <= H && J === _)
|
|
1867
1867
|
return n;
|
|
1868
1868
|
if (B.lookahead === 0)
|
|
1869
1869
|
break;
|
|
@@ -1890,15 +1890,15 @@ https://github.com/nodeca/pako/blob/main/LICENSE
|
|
|
1890
1890
|
var j;
|
|
1891
1891
|
return e && e.state ? (j = e.state.status) !== w && j !== 69 && j !== 73 && j !== 91 && j !== 103 && j !== L && j !== 666 ? et(e, p) : (e.state = null, j === L ? et(e, -3) : i) : p;
|
|
1892
1892
|
}, l.deflateSetDictionary = function(e, j) {
|
|
1893
|
-
var U, m, f, S,
|
|
1893
|
+
var U, m, f, S, Z, G, B, J, ot = j.length;
|
|
1894
1894
|
if (!e || !e.state || (S = (U = e.state).wrap) === 2 || S === 1 && U.status !== w || U.lookahead)
|
|
1895
1895
|
return p;
|
|
1896
|
-
for (S === 1 && (e.adler = c(e.adler, j, ot, 0)), U.wrap = 0, ot >= U.w_size && (S === 0 && (K(U.head), U.strstart = 0, U.block_start = 0, U.insert = 0), J = new h.Buf8(U.w_size), h.arraySet(J, j, ot - U.w_size, U.w_size, 0), j = J, ot = U.w_size),
|
|
1896
|
+
for (S === 1 && (e.adler = c(e.adler, j, ot, 0)), U.wrap = 0, ot >= U.w_size && (S === 0 && (K(U.head), U.strstart = 0, U.block_start = 0, U.insert = 0), J = new h.Buf8(U.w_size), h.arraySet(J, j, ot - U.w_size, U.w_size, 0), j = J, ot = U.w_size), Z = e.avail_in, G = e.next_in, B = e.input, e.avail_in = ot, e.next_in = 0, e.input = j, ht(U); U.lookahead >= I; ) {
|
|
1897
1897
|
for (m = U.strstart, f = U.lookahead - (I - 1); U.ins_h = (U.ins_h << U.hash_shift ^ U.window[m + I - 1]) & U.hash_mask, U.prev[m & U.w_mask] = U.head[U.ins_h], U.head[U.ins_h] = m, m++, --f; )
|
|
1898
1898
|
;
|
|
1899
1899
|
U.strstart = m, U.lookahead = I - 1, ht(U);
|
|
1900
1900
|
}
|
|
1901
|
-
return U.strstart += U.lookahead, U.block_start = U.strstart, U.insert = U.lookahead, U.lookahead = 0, U.match_length = U.prev_length = I - 1, U.match_available = 0, e.next_in = G, e.input = B, e.avail_in =
|
|
1901
|
+
return U.strstart += U.lookahead, U.block_start = U.strstart, U.insert = U.lookahead, U.lookahead = 0, U.match_length = U.prev_length = I - 1, U.match_available = 0, e.next_in = G, e.input = B, e.avail_in = Z, U.wrap = S, i;
|
|
1902
1902
|
}, l.deflateInfo = "pako deflate (from Nodeca project)";
|
|
1903
1903
|
}, { "../utils/common": 41, "./adler32": 43, "./crc32": 45, "./messages": 51, "./trees": 52 }], 47: [function(s, C, l) {
|
|
1904
1904
|
C.exports = function() {
|
|
@@ -1906,19 +1906,19 @@ https://github.com/nodeca/pako/blob/main/LICENSE
|
|
|
1906
1906
|
};
|
|
1907
1907
|
}, {}], 48: [function(s, C, l) {
|
|
1908
1908
|
C.exports = function(a, h) {
|
|
1909
|
-
var r, c, b, y,
|
|
1910
|
-
r = a.state, c = a.next_in, n = a.input, b = c + (a.avail_in - 5), y = a.next_out, T = a.output,
|
|
1909
|
+
var r, c, b, y, _, v, i, p, o, d, u, g, x, A, k, O, P, F, I, H, tt, w, L, n, T;
|
|
1910
|
+
r = a.state, c = a.next_in, n = a.input, b = c + (a.avail_in - 5), y = a.next_out, T = a.output, _ = y - (h - a.avail_out), v = y + (a.avail_out - 257), i = r.dmax, p = r.wsize, o = r.whave, d = r.wnext, u = r.window, g = r.hold, x = r.bits, A = r.lencode, k = r.distcode, O = (1 << r.lenbits) - 1, P = (1 << r.distbits) - 1;
|
|
1911
1911
|
t:
|
|
1912
1912
|
do {
|
|
1913
|
-
x < 15 && (
|
|
1913
|
+
x < 15 && (g += n[c++] << x, x += 8, g += n[c++] << x, x += 8), F = A[g & O];
|
|
1914
1914
|
e:
|
|
1915
1915
|
for (; ; ) {
|
|
1916
|
-
if (
|
|
1916
|
+
if (g >>>= I = F >>> 24, x -= I, (I = F >>> 16 & 255) === 0)
|
|
1917
1917
|
T[y++] = 65535 & F;
|
|
1918
1918
|
else {
|
|
1919
1919
|
if (!(16 & I)) {
|
|
1920
1920
|
if (!(64 & I)) {
|
|
1921
|
-
F = A[(65535 & F) + (
|
|
1921
|
+
F = A[(65535 & F) + (g & (1 << I) - 1)];
|
|
1922
1922
|
continue e;
|
|
1923
1923
|
}
|
|
1924
1924
|
if (32 & I) {
|
|
@@ -1928,22 +1928,22 @@ https://github.com/nodeca/pako/blob/main/LICENSE
|
|
|
1928
1928
|
a.msg = "invalid literal/length code", r.mode = 30;
|
|
1929
1929
|
break t;
|
|
1930
1930
|
}
|
|
1931
|
-
H = 65535 & F, (I &= 15) && (x < I && (
|
|
1931
|
+
H = 65535 & F, (I &= 15) && (x < I && (g += n[c++] << x, x += 8), H += g & (1 << I) - 1, g >>>= I, x -= I), x < 15 && (g += n[c++] << x, x += 8, g += n[c++] << x, x += 8), F = k[g & P];
|
|
1932
1932
|
n:
|
|
1933
1933
|
for (; ; ) {
|
|
1934
|
-
if (
|
|
1934
|
+
if (g >>>= I = F >>> 24, x -= I, !(16 & (I = F >>> 16 & 255))) {
|
|
1935
1935
|
if (!(64 & I)) {
|
|
1936
|
-
F = k[(65535 & F) + (
|
|
1936
|
+
F = k[(65535 & F) + (g & (1 << I) - 1)];
|
|
1937
1937
|
continue n;
|
|
1938
1938
|
}
|
|
1939
1939
|
a.msg = "invalid distance code", r.mode = 30;
|
|
1940
1940
|
break t;
|
|
1941
1941
|
}
|
|
1942
|
-
if (tt = 65535 & F, x < (I &= 15) && (
|
|
1942
|
+
if (tt = 65535 & F, x < (I &= 15) && (g += n[c++] << x, (x += 8) < I && (g += n[c++] << x, x += 8)), i < (tt += g & (1 << I) - 1)) {
|
|
1943
1943
|
a.msg = "invalid distance too far back", r.mode = 30;
|
|
1944
1944
|
break t;
|
|
1945
1945
|
}
|
|
1946
|
-
if (
|
|
1946
|
+
if (g >>>= I, x -= I, (I = y - _) < tt) {
|
|
1947
1947
|
if (o < (I = tt - I) && r.sane) {
|
|
1948
1948
|
a.msg = "invalid distance too far back", r.mode = 30;
|
|
1949
1949
|
break t;
|
|
@@ -1983,14 +1983,14 @@ https://github.com/nodeca/pako/blob/main/LICENSE
|
|
|
1983
1983
|
break;
|
|
1984
1984
|
}
|
|
1985
1985
|
} while (c < b && y < v);
|
|
1986
|
-
c -= H = x >> 3,
|
|
1986
|
+
c -= H = x >> 3, g &= (1 << (x -= H << 3)) - 1, a.next_in = c, a.next_out = y, a.avail_in = c < b ? b - c + 5 : 5 - (c - b), a.avail_out = y < v ? v - y + 257 : 257 - (y - v), r.hold = g, r.bits = x;
|
|
1987
1987
|
};
|
|
1988
1988
|
}, {}], 49: [function(s, C, l) {
|
|
1989
|
-
var a = s("../utils/common"), h = s("./adler32"), r = s("./crc32"), c = s("./inffast"), b = s("./inftrees"), y = 1,
|
|
1989
|
+
var a = s("../utils/common"), h = s("./adler32"), r = s("./crc32"), c = s("./inffast"), b = s("./inftrees"), y = 1, _ = 2, v = 0, i = -2, p = 1, o = 852, d = 592;
|
|
1990
1990
|
function u(w) {
|
|
1991
1991
|
return (w >>> 24 & 255) + (w >>> 8 & 65280) + ((65280 & w) << 8) + ((255 & w) << 24);
|
|
1992
1992
|
}
|
|
1993
|
-
function
|
|
1993
|
+
function g() {
|
|
1994
1994
|
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;
|
|
1995
1995
|
}
|
|
1996
1996
|
function x(w) {
|
|
@@ -2007,7 +2007,7 @@ https://github.com/nodeca/pako/blob/main/LICENSE
|
|
|
2007
2007
|
}
|
|
2008
2008
|
function O(w, L) {
|
|
2009
2009
|
var n, T;
|
|
2010
|
-
return w ? (T = new
|
|
2010
|
+
return w ? (T = new g(), (w.state = T).window = null, (n = k(w, L)) !== v && (w.state = null), n) : i;
|
|
2011
2011
|
}
|
|
2012
2012
|
var P, F, I = !0;
|
|
2013
2013
|
function H(w) {
|
|
@@ -2023,7 +2023,7 @@ https://github.com/nodeca/pako/blob/main/LICENSE
|
|
|
2023
2023
|
w.lens[L++] = 8;
|
|
2024
2024
|
for (b(y, w.lens, 0, 288, P, 0, w.work, { bits: 9 }), L = 0; L < 32; )
|
|
2025
2025
|
w.lens[L++] = 5;
|
|
2026
|
-
b(
|
|
2026
|
+
b(_, w.lens, 0, 32, F, 0, w.work, { bits: 5 }), I = !1;
|
|
2027
2027
|
}
|
|
2028
2028
|
w.lencode = P, w.lenbits = 9, w.distcode = F, w.distbits = 5;
|
|
2029
2029
|
}
|
|
@@ -2034,7 +2034,7 @@ https://github.com/nodeca/pako/blob/main/LICENSE
|
|
|
2034
2034
|
l.inflateReset = A, l.inflateReset2 = k, l.inflateResetKeep = x, l.inflateInit = function(w) {
|
|
2035
2035
|
return O(w, 15);
|
|
2036
2036
|
}, l.inflateInit2 = O, l.inflate = function(w, L) {
|
|
2037
|
-
var n, T, V, M, et, $, K, z, N, it, Y,
|
|
2037
|
+
var n, T, V, M, et, $, K, z, N, it, Y, q, ht, mt, at, ct, pt, dt, St, kt, e, j, U, m, f = 0, S = new a.Buf8(4), Z = [16, 17, 18, 0, 8, 7, 9, 6, 10, 5, 11, 4, 12, 3, 13, 2, 14, 1, 15];
|
|
2038
2038
|
if (!w || !w.state || !w.output || !w.input && w.avail_in !== 0)
|
|
2039
2039
|
return i;
|
|
2040
2040
|
(n = w.state).mode === 12 && (n.mode = 13), et = w.next_out, V = w.output, K = w.avail_out, M = w.next_in, T = w.input, $ = w.avail_in, z = n.hold, N = n.bits, it = $, Y = K, j = v;
|
|
@@ -2112,16 +2112,16 @@ https://github.com/nodeca/pako/blob/main/LICENSE
|
|
|
2112
2112
|
n.head && (n.head.extra = null);
|
|
2113
2113
|
n.mode = 6;
|
|
2114
2114
|
case 6:
|
|
2115
|
-
if (1024 & n.flags && ($ < (
|
|
2115
|
+
if (1024 & n.flags && ($ < (q = n.length) && (q = $), q && (n.head && (e = n.head.extra_len - n.length, n.head.extra || (n.head.extra = new Array(n.head.extra_len)), a.arraySet(n.head.extra, T, M, q, e)), 512 & n.flags && (n.check = r(n.check, T, q, M)), $ -= q, M += q, n.length -= q), n.length))
|
|
2116
2116
|
break t;
|
|
2117
2117
|
n.length = 0, n.mode = 7;
|
|
2118
2118
|
case 7:
|
|
2119
2119
|
if (2048 & n.flags) {
|
|
2120
2120
|
if ($ === 0)
|
|
2121
2121
|
break t;
|
|
2122
|
-
for (
|
|
2122
|
+
for (q = 0; e = T[M + q++], n.head && e && n.length < 65536 && (n.head.name += String.fromCharCode(e)), e && q < $; )
|
|
2123
2123
|
;
|
|
2124
|
-
if (512 & n.flags && (n.check = r(n.check, T,
|
|
2124
|
+
if (512 & n.flags && (n.check = r(n.check, T, q, M)), $ -= q, M += q, e)
|
|
2125
2125
|
break t;
|
|
2126
2126
|
} else
|
|
2127
2127
|
n.head && (n.head.name = null);
|
|
@@ -2130,9 +2130,9 @@ https://github.com/nodeca/pako/blob/main/LICENSE
|
|
|
2130
2130
|
if (4096 & n.flags) {
|
|
2131
2131
|
if ($ === 0)
|
|
2132
2132
|
break t;
|
|
2133
|
-
for (
|
|
2133
|
+
for (q = 0; e = T[M + q++], n.head && e && n.length < 65536 && (n.head.comment += String.fromCharCode(e)), e && q < $; )
|
|
2134
2134
|
;
|
|
2135
|
-
if (512 & n.flags && (n.check = r(n.check, T,
|
|
2135
|
+
if (512 & n.flags && (n.check = r(n.check, T, q, M)), $ -= q, M += q, e)
|
|
2136
2136
|
break t;
|
|
2137
2137
|
} else
|
|
2138
2138
|
n.head && (n.head.comment = null);
|
|
@@ -2208,10 +2208,10 @@ https://github.com/nodeca/pako/blob/main/LICENSE
|
|
|
2208
2208
|
case 15:
|
|
2209
2209
|
n.mode = 16;
|
|
2210
2210
|
case 16:
|
|
2211
|
-
if (
|
|
2212
|
-
if ($ <
|
|
2211
|
+
if (q = n.length) {
|
|
2212
|
+
if ($ < q && (q = $), K < q && (q = K), q === 0)
|
|
2213
2213
|
break t;
|
|
2214
|
-
a.arraySet(V, T, M,
|
|
2214
|
+
a.arraySet(V, T, M, q, et), $ -= q, M += q, K -= q, et += q, n.length -= q;
|
|
2215
2215
|
break;
|
|
2216
2216
|
}
|
|
2217
2217
|
n.mode = 12;
|
|
@@ -2234,10 +2234,10 @@ https://github.com/nodeca/pako/blob/main/LICENSE
|
|
|
2234
2234
|
break t;
|
|
2235
2235
|
$--, z += T[M++] << N, N += 8;
|
|
2236
2236
|
}
|
|
2237
|
-
n.lens[
|
|
2237
|
+
n.lens[Z[n.have++]] = 7 & z, z >>>= 3, N -= 3;
|
|
2238
2238
|
}
|
|
2239
2239
|
for (; n.have < 19; )
|
|
2240
|
-
n.lens[
|
|
2240
|
+
n.lens[Z[n.have++]] = 0;
|
|
2241
2241
|
if (n.lencode = n.lendyn, n.lenbits = 7, U = { bits: n.lenbits }, j = b(0, n.lens, 0, 19, n.lencode, 0, n.work, U), n.lenbits = U.bits, j) {
|
|
2242
2242
|
w.msg = "invalid code lengths set", n.mode = 30;
|
|
2243
2243
|
break;
|
|
@@ -2263,27 +2263,27 @@ https://github.com/nodeca/pako/blob/main/LICENSE
|
|
|
2263
2263
|
w.msg = "invalid bit length repeat", n.mode = 30;
|
|
2264
2264
|
break;
|
|
2265
2265
|
}
|
|
2266
|
-
e = n.lens[n.have - 1],
|
|
2266
|
+
e = n.lens[n.have - 1], q = 3 + (3 & z), z >>>= 2, N -= 2;
|
|
2267
2267
|
} else if (pt === 17) {
|
|
2268
2268
|
for (m = at + 3; N < m; ) {
|
|
2269
2269
|
if ($ === 0)
|
|
2270
2270
|
break t;
|
|
2271
2271
|
$--, z += T[M++] << N, N += 8;
|
|
2272
2272
|
}
|
|
2273
|
-
N -= at, e = 0,
|
|
2273
|
+
N -= at, e = 0, q = 3 + (7 & (z >>>= at)), z >>>= 3, N -= 3;
|
|
2274
2274
|
} else {
|
|
2275
2275
|
for (m = at + 7; N < m; ) {
|
|
2276
2276
|
if ($ === 0)
|
|
2277
2277
|
break t;
|
|
2278
2278
|
$--, z += T[M++] << N, N += 8;
|
|
2279
2279
|
}
|
|
2280
|
-
N -= at, e = 0,
|
|
2280
|
+
N -= at, e = 0, q = 11 + (127 & (z >>>= at)), z >>>= 7, N -= 7;
|
|
2281
2281
|
}
|
|
2282
|
-
if (n.have +
|
|
2282
|
+
if (n.have + q > n.nlen + n.ndist) {
|
|
2283
2283
|
w.msg = "invalid bit length repeat", n.mode = 30;
|
|
2284
2284
|
break;
|
|
2285
2285
|
}
|
|
2286
|
-
for (;
|
|
2286
|
+
for (; q--; )
|
|
2287
2287
|
n.lens[n.have++] = e;
|
|
2288
2288
|
}
|
|
2289
2289
|
}
|
|
@@ -2297,7 +2297,7 @@ https://github.com/nodeca/pako/blob/main/LICENSE
|
|
|
2297
2297
|
w.msg = "invalid literal/lengths set", n.mode = 30;
|
|
2298
2298
|
break;
|
|
2299
2299
|
}
|
|
2300
|
-
if (n.distbits = 6, n.distcode = n.distdyn, U = { bits: n.distbits }, j = b(
|
|
2300
|
+
if (n.distbits = 6, n.distcode = n.distdyn, U = { bits: n.distbits }, j = b(_, n.lens, n.nlen, n.ndist, n.distcode, 0, n.work, U), n.distbits = U.bits, j) {
|
|
2301
2301
|
w.msg = "invalid distances set", n.mode = 30;
|
|
2302
2302
|
break;
|
|
2303
2303
|
}
|
|
@@ -2382,15 +2382,15 @@ https://github.com/nodeca/pako/blob/main/LICENSE
|
|
|
2382
2382
|
case 25:
|
|
2383
2383
|
if (K === 0)
|
|
2384
2384
|
break t;
|
|
2385
|
-
if (
|
|
2386
|
-
if ((
|
|
2385
|
+
if (q = Y - K, n.offset > q) {
|
|
2386
|
+
if ((q = n.offset - q) > n.whave && n.sane) {
|
|
2387
2387
|
w.msg = "invalid distance too far back", n.mode = 30;
|
|
2388
2388
|
break;
|
|
2389
2389
|
}
|
|
2390
|
-
ht =
|
|
2390
|
+
ht = q > n.wnext ? (q -= n.wnext, n.wsize - q) : n.wnext - q, q > n.length && (q = n.length), mt = n.window;
|
|
2391
2391
|
} else
|
|
2392
|
-
mt = V, ht = et - n.offset,
|
|
2393
|
-
for (K <
|
|
2392
|
+
mt = V, ht = et - n.offset, q = n.length;
|
|
2393
|
+
for (K < q && (q = K), K -= q, n.length -= q; V[et++] = mt[ht++], --q; )
|
|
2394
2394
|
;
|
|
2395
2395
|
n.length === 0 && (n.mode = 21);
|
|
2396
2396
|
break;
|
|
@@ -2454,12 +2454,12 @@ https://github.com/nodeca/pako/blob/main/LICENSE
|
|
|
2454
2454
|
}, l.inflateInfo = "pako inflate (from Nodeca project)";
|
|
2455
2455
|
}, { "../utils/common": 41, "./adler32": 43, "./crc32": 45, "./inffast": 48, "./inftrees": 50 }], 50: [function(s, C, l) {
|
|
2456
2456
|
var a = s("../utils/common"), h = [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], c = [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], b = [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];
|
|
2457
|
-
C.exports = function(y,
|
|
2458
|
-
var
|
|
2457
|
+
C.exports = function(y, _, v, i, p, o, d, u) {
|
|
2458
|
+
var g, x, A, k, O, P, F, I, H, tt = u.bits, w = 0, L = 0, n = 0, T = 0, V = 0, M = 0, et = 0, $ = 0, K = 0, z = 0, N = null, it = 0, Y = new a.Buf16(16), q = new a.Buf16(16), ht = null, mt = 0;
|
|
2459
2459
|
for (w = 0; w <= 15; w++)
|
|
2460
2460
|
Y[w] = 0;
|
|
2461
2461
|
for (L = 0; L < i; L++)
|
|
2462
|
-
Y[
|
|
2462
|
+
Y[_[v + L]]++;
|
|
2463
2463
|
for (V = tt, T = 15; 1 <= T && Y[T] === 0; T--)
|
|
2464
2464
|
;
|
|
2465
2465
|
if (T < V && (V = T), T === 0)
|
|
@@ -2471,21 +2471,21 @@ https://github.com/nodeca/pako/blob/main/LICENSE
|
|
|
2471
2471
|
return -1;
|
|
2472
2472
|
if (0 < $ && (y === 0 || T !== 1))
|
|
2473
2473
|
return -1;
|
|
2474
|
-
for (
|
|
2475
|
-
|
|
2474
|
+
for (q[1] = 0, w = 1; w < 15; w++)
|
|
2475
|
+
q[w + 1] = q[w] + Y[w];
|
|
2476
2476
|
for (L = 0; L < i; L++)
|
|
2477
|
-
|
|
2477
|
+
_[v + L] !== 0 && (d[q[_[v + L]]++] = L);
|
|
2478
2478
|
if (P = y === 0 ? (N = ht = d, 19) : y === 1 ? (N = h, it -= 257, ht = r, mt -= 257, 256) : (N = c, ht = b, -1), w = n, O = o, et = L = z = 0, A = -1, k = (K = 1 << (M = V)) - 1, y === 1 && 852 < K || y === 2 && 592 < K)
|
|
2479
2479
|
return 1;
|
|
2480
2480
|
for (; ; ) {
|
|
2481
|
-
for (F = w - et, H = d[L] < P ? (I = 0, d[L]) : d[L] > P ? (I = ht[mt + d[L]], N[it + d[L]]) : (I = 96, 0),
|
|
2481
|
+
for (F = w - et, H = d[L] < P ? (I = 0, d[L]) : d[L] > P ? (I = ht[mt + d[L]], N[it + d[L]]) : (I = 96, 0), g = 1 << w - et, n = x = 1 << M; p[O + (z >> et) + (x -= g)] = F << 24 | I << 16 | H | 0, x !== 0; )
|
|
2482
2482
|
;
|
|
2483
|
-
for (
|
|
2484
|
-
|
|
2485
|
-
if (
|
|
2483
|
+
for (g = 1 << w - 1; z & g; )
|
|
2484
|
+
g >>= 1;
|
|
2485
|
+
if (g !== 0 ? (z &= g - 1, z += g) : z = 0, L++, --Y[w] == 0) {
|
|
2486
2486
|
if (w === T)
|
|
2487
2487
|
break;
|
|
2488
|
-
w =
|
|
2488
|
+
w = _[v + d[L]];
|
|
2489
2489
|
}
|
|
2490
2490
|
if (V < w && (z & k) !== A) {
|
|
2491
2491
|
for (et === 0 && (et = V), O += n, $ = 1 << (M = w - et); M + et < T && !(($ -= Y[M + et]) <= 0); )
|
|
@@ -2505,7 +2505,7 @@ https://github.com/nodeca/pako/blob/main/LICENSE
|
|
|
2505
2505
|
for (var S = f.length; 0 <= --S; )
|
|
2506
2506
|
f[S] = 0;
|
|
2507
2507
|
}
|
|
2508
|
-
var b = 0, y = 29,
|
|
2508
|
+
var b = 0, y = 29, _ = 256, v = _ + 1 + y, i = 30, p = 19, o = 2 * v + 1, d = 15, u = 16, g = 7, x = 256, A = 16, k = 17, O = 18, P = [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], F = [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], I = [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 2, 3, 7], H = [16, 17, 18, 0, 8, 7, 9, 6, 10, 5, 11, 4, 12, 3, 13, 2, 14, 1, 15], tt = new Array(2 * (v + 2));
|
|
2509
2509
|
c(tt);
|
|
2510
2510
|
var w = new Array(2 * i);
|
|
2511
2511
|
c(w);
|
|
@@ -2516,8 +2516,8 @@ https://github.com/nodeca/pako/blob/main/LICENSE
|
|
|
2516
2516
|
var T = new Array(y);
|
|
2517
2517
|
c(T);
|
|
2518
2518
|
var V, M, et, $ = new Array(i);
|
|
2519
|
-
function K(f, S,
|
|
2520
|
-
this.static_tree = f, this.extra_bits = S, this.extra_base =
|
|
2519
|
+
function K(f, S, Z, G, B) {
|
|
2520
|
+
this.static_tree = f, this.extra_bits = S, this.extra_base = Z, this.elems = G, this.max_length = B, this.has_stree = f && f.length;
|
|
2521
2521
|
}
|
|
2522
2522
|
function z(f, S) {
|
|
2523
2523
|
this.dyn_tree = f, this.max_code = 0, this.stat_desc = S;
|
|
@@ -2528,21 +2528,21 @@ https://github.com/nodeca/pako/blob/main/LICENSE
|
|
|
2528
2528
|
function it(f, S) {
|
|
2529
2529
|
f.pending_buf[f.pending++] = 255 & S, f.pending_buf[f.pending++] = S >>> 8 & 255;
|
|
2530
2530
|
}
|
|
2531
|
-
function Y(f, S,
|
|
2532
|
-
f.bi_valid > u -
|
|
2531
|
+
function Y(f, S, Z) {
|
|
2532
|
+
f.bi_valid > u - Z ? (f.bi_buf |= S << f.bi_valid & 65535, it(f, f.bi_buf), f.bi_buf = S >> u - f.bi_valid, f.bi_valid += Z - u) : (f.bi_buf |= S << f.bi_valid & 65535, f.bi_valid += Z);
|
|
2533
2533
|
}
|
|
2534
|
-
function
|
|
2535
|
-
Y(f,
|
|
2534
|
+
function q(f, S, Z) {
|
|
2535
|
+
Y(f, Z[2 * S], Z[2 * S + 1]);
|
|
2536
2536
|
}
|
|
2537
2537
|
function ht(f, S) {
|
|
2538
|
-
for (var
|
|
2538
|
+
for (var Z = 0; Z |= 1 & f, f >>>= 1, Z <<= 1, 0 < --S; )
|
|
2539
2539
|
;
|
|
2540
|
-
return
|
|
2540
|
+
return Z >>> 1;
|
|
2541
2541
|
}
|
|
2542
|
-
function mt(f, S,
|
|
2542
|
+
function mt(f, S, Z) {
|
|
2543
2543
|
var G, B, J = new Array(d + 1), ot = 0;
|
|
2544
2544
|
for (G = 1; G <= d; G++)
|
|
2545
|
-
J[G] = ot = ot +
|
|
2545
|
+
J[G] = ot = ot + Z[G - 1] << 1;
|
|
2546
2546
|
for (B = 0; B <= S; B++) {
|
|
2547
2547
|
var X = f[2 * B + 1];
|
|
2548
2548
|
X !== 0 && (f[2 * B] = ht(J[X]++, X));
|
|
@@ -2561,31 +2561,31 @@ https://github.com/nodeca/pako/blob/main/LICENSE
|
|
|
2561
2561
|
function ct(f) {
|
|
2562
2562
|
8 < f.bi_valid ? it(f, f.bi_buf) : 0 < f.bi_valid && (f.pending_buf[f.pending++] = f.bi_buf), f.bi_buf = 0, f.bi_valid = 0;
|
|
2563
2563
|
}
|
|
2564
|
-
function pt(f, S,
|
|
2565
|
-
var B = 2 * S, J = 2 *
|
|
2566
|
-
return f[B] < f[J] || f[B] === f[J] && G[S] <= G[
|
|
2564
|
+
function pt(f, S, Z, G) {
|
|
2565
|
+
var B = 2 * S, J = 2 * Z;
|
|
2566
|
+
return f[B] < f[J] || f[B] === f[J] && G[S] <= G[Z];
|
|
2567
2567
|
}
|
|
2568
|
-
function dt(f, S,
|
|
2569
|
-
for (var G = f.heap[
|
|
2570
|
-
f.heap[
|
|
2571
|
-
f.heap[
|
|
2568
|
+
function dt(f, S, Z) {
|
|
2569
|
+
for (var G = f.heap[Z], B = Z << 1; B <= f.heap_len && (B < f.heap_len && pt(S, f.heap[B + 1], f.heap[B], f.depth) && B++, !pt(S, G, f.heap[B], f.depth)); )
|
|
2570
|
+
f.heap[Z] = f.heap[B], Z = B, B <<= 1;
|
|
2571
|
+
f.heap[Z] = G;
|
|
2572
2572
|
}
|
|
2573
|
-
function St(f, S,
|
|
2573
|
+
function St(f, S, Z) {
|
|
2574
2574
|
var G, B, J, ot, X = 0;
|
|
2575
2575
|
if (f.last_lit !== 0)
|
|
2576
|
-
for (; G = f.pending_buf[f.d_buf + 2 * X] << 8 | f.pending_buf[f.d_buf + 2 * X + 1], B = f.pending_buf[f.l_buf + X], X++, G === 0 ?
|
|
2576
|
+
for (; G = f.pending_buf[f.d_buf + 2 * X] << 8 | f.pending_buf[f.d_buf + 2 * X + 1], B = f.pending_buf[f.l_buf + X], X++, G === 0 ? q(f, B, S) : (q(f, (J = n[B]) + _ + 1, S), (ot = P[J]) !== 0 && Y(f, B -= T[J], ot), q(f, J = N(--G), Z), (ot = F[J]) !== 0 && Y(f, G -= $[J], ot)), X < f.last_lit; )
|
|
2577
2577
|
;
|
|
2578
|
-
|
|
2578
|
+
q(f, x, S);
|
|
2579
2579
|
}
|
|
2580
2580
|
function kt(f, S) {
|
|
2581
|
-
var
|
|
2582
|
-
for (f.heap_len = 0, f.heap_max = o,
|
|
2583
|
-
J[2 *
|
|
2581
|
+
var Z, G, B, J = S.dyn_tree, ot = S.stat_desc.static_tree, X = S.stat_desc.has_stree, lt = S.stat_desc.elems, wt = -1;
|
|
2582
|
+
for (f.heap_len = 0, f.heap_max = o, Z = 0; Z < lt; Z++)
|
|
2583
|
+
J[2 * Z] !== 0 ? (f.heap[++f.heap_len] = wt = Z, f.depth[Z] = 0) : J[2 * Z + 1] = 0;
|
|
2584
2584
|
for (; f.heap_len < 2; )
|
|
2585
2585
|
J[2 * (B = f.heap[++f.heap_len] = wt < 2 ? ++wt : 0)] = 1, f.depth[B] = 0, f.opt_len--, X && (f.static_len -= ot[2 * B + 1]);
|
|
2586
|
-
for (S.max_code = wt,
|
|
2587
|
-
dt(f, J,
|
|
2588
|
-
for (B = lt;
|
|
2586
|
+
for (S.max_code = wt, Z = f.heap_len >> 1; 1 <= Z; Z--)
|
|
2587
|
+
dt(f, J, Z);
|
|
2588
|
+
for (B = lt; Z = f.heap[1], f.heap[1] = f.heap[f.heap_len--], dt(f, J, 1), G = f.heap[1], f.heap[--f.heap_max] = Z, f.heap[--f.heap_max] = G, J[2 * B] = J[2 * Z] + J[2 * G], f.depth[B] = (f.depth[Z] >= f.depth[G] ? f.depth[Z] : f.depth[G]) + 1, J[2 * Z + 1] = J[2 * G + 1] = B, f.heap[1] = B++, dt(f, J, 1), 2 <= f.heap_len; )
|
|
2589
2589
|
;
|
|
2590
2590
|
f.heap[--f.heap_max] = f.heap[1], function(gt, Ct) {
|
|
2591
2591
|
var st, R, D, W, nt, rt, ut = Ct.dyn_tree, ft = Ct.max_code, _t = Ct.stat_desc.static_tree, Tt = Ct.stat_desc.has_stree, xt = Ct.stat_desc.extra_bits, Ot = Ct.stat_desc.extra_base, Pt = Ct.stat_desc.max_length, Lt = 0;
|
|
@@ -2605,33 +2605,33 @@ https://github.com/nodeca/pako/blob/main/LICENSE
|
|
|
2605
2605
|
}
|
|
2606
2606
|
}(f, S), mt(J, wt, f.bl_count);
|
|
2607
2607
|
}
|
|
2608
|
-
function e(f, S,
|
|
2608
|
+
function e(f, S, Z) {
|
|
2609
2609
|
var G, B, J = -1, ot = S[1], X = 0, lt = 7, wt = 4;
|
|
2610
|
-
for (ot === 0 && (lt = 138, wt = 3), S[2 * (
|
|
2610
|
+
for (ot === 0 && (lt = 138, wt = 3), S[2 * (Z + 1) + 1] = 65535, G = 0; G <= Z; G++)
|
|
2611
2611
|
B = ot, ot = S[2 * (G + 1) + 1], ++X < lt && B === ot || (X < wt ? f.bl_tree[2 * B] += X : B !== 0 ? (B !== J && f.bl_tree[2 * B]++, f.bl_tree[2 * A]++) : X <= 10 ? f.bl_tree[2 * k]++ : f.bl_tree[2 * O]++, J = B, wt = (X = 0) === ot ? (lt = 138, 3) : B === ot ? (lt = 6, 3) : (lt = 7, 4));
|
|
2612
2612
|
}
|
|
2613
|
-
function j(f, S,
|
|
2613
|
+
function j(f, S, Z) {
|
|
2614
2614
|
var G, B, J = -1, ot = S[1], X = 0, lt = 7, wt = 4;
|
|
2615
|
-
for (ot === 0 && (lt = 138, wt = 3), G = 0; G <=
|
|
2615
|
+
for (ot === 0 && (lt = 138, wt = 3), G = 0; G <= Z; G++)
|
|
2616
2616
|
if (B = ot, ot = S[2 * (G + 1) + 1], !(++X < lt && B === ot)) {
|
|
2617
2617
|
if (X < wt)
|
|
2618
|
-
for (;
|
|
2618
|
+
for (; q(f, B, f.bl_tree), --X != 0; )
|
|
2619
2619
|
;
|
|
2620
2620
|
else
|
|
2621
|
-
B !== 0 ? (B !== J && (
|
|
2621
|
+
B !== 0 ? (B !== J && (q(f, B, f.bl_tree), X--), q(f, A, f.bl_tree), Y(f, X - 3, 2)) : X <= 10 ? (q(f, k, f.bl_tree), Y(f, X - 3, 3)) : (q(f, O, f.bl_tree), Y(f, X - 11, 7));
|
|
2622
2622
|
J = B, wt = (X = 0) === ot ? (lt = 138, 3) : B === ot ? (lt = 6, 3) : (lt = 7, 4);
|
|
2623
2623
|
}
|
|
2624
2624
|
}
|
|
2625
2625
|
c($);
|
|
2626
2626
|
var U = !1;
|
|
2627
|
-
function m(f, S,
|
|
2627
|
+
function m(f, S, Z, G) {
|
|
2628
2628
|
Y(f, (b << 1) + (G ? 1 : 0), 3), function(B, J, ot, X) {
|
|
2629
2629
|
ct(B), X && (it(B, ot), it(B, ~ot)), a.arraySet(B.pending_buf, B.window, J, ot, B.pending), B.pending += ot;
|
|
2630
|
-
}(f, S,
|
|
2630
|
+
}(f, S, Z, !0);
|
|
2631
2631
|
}
|
|
2632
2632
|
l._tr_init = function(f) {
|
|
2633
2633
|
U || (function() {
|
|
2634
|
-
var S,
|
|
2634
|
+
var S, Z, G, B, J, ot = new Array(d + 1);
|
|
2635
2635
|
for (B = G = 0; B < y - 1; B++)
|
|
2636
2636
|
for (T[B] = G, S = 0; S < 1 << P[B]; S++)
|
|
2637
2637
|
n[G++] = B;
|
|
@@ -2641,8 +2641,8 @@ https://github.com/nodeca/pako/blob/main/LICENSE
|
|
|
2641
2641
|
for (J >>= 7; B < i; B++)
|
|
2642
2642
|
for ($[B] = J << 7, S = 0; S < 1 << F[B] - 7; S++)
|
|
2643
2643
|
L[256 + J++] = B;
|
|
2644
|
-
for (
|
|
2645
|
-
ot[
|
|
2644
|
+
for (Z = 0; Z <= d; Z++)
|
|
2645
|
+
ot[Z] = 0;
|
|
2646
2646
|
for (S = 0; S <= 143; )
|
|
2647
2647
|
tt[2 * S + 1] = 8, S++, ot[8]++;
|
|
2648
2648
|
for (; S <= 255; )
|
|
@@ -2653,9 +2653,9 @@ https://github.com/nodeca/pako/blob/main/LICENSE
|
|
|
2653
2653
|
tt[2 * S + 1] = 8, S++, ot[8]++;
|
|
2654
2654
|
for (mt(tt, v + 1, ot), S = 0; S < i; S++)
|
|
2655
2655
|
w[2 * S + 1] = 5, w[2 * S] = ht(S, 5);
|
|
2656
|
-
V = new K(tt, P,
|
|
2656
|
+
V = new K(tt, P, _ + 1, v, d), M = new K(w, F, 0, i, d), et = new K(new Array(0), I, 0, p, g);
|
|
2657
2657
|
}(), U = !0), f.l_desc = new z(f.dyn_ltree, V), f.d_desc = new z(f.dyn_dtree, M), f.bl_desc = new z(f.bl_tree, et), f.bi_buf = 0, f.bi_valid = 0, at(f);
|
|
2658
|
-
}, l._tr_stored_block = m, l._tr_flush_block = function(f, S,
|
|
2658
|
+
}, l._tr_stored_block = m, l._tr_flush_block = function(f, S, Z, G) {
|
|
2659
2659
|
var B, J, ot = 0;
|
|
2660
2660
|
0 < f.level ? (f.strm.data_type === 2 && (f.strm.data_type = function(X) {
|
|
2661
2661
|
var lt, wt = 4093624447;
|
|
@@ -2664,7 +2664,7 @@ https://github.com/nodeca/pako/blob/main/LICENSE
|
|
|
2664
2664
|
return h;
|
|
2665
2665
|
if (X.dyn_ltree[18] !== 0 || X.dyn_ltree[20] !== 0 || X.dyn_ltree[26] !== 0)
|
|
2666
2666
|
return r;
|
|
2667
|
-
for (lt = 32; lt <
|
|
2667
|
+
for (lt = 32; lt < _; lt++)
|
|
2668
2668
|
if (X.dyn_ltree[2 * lt] !== 0)
|
|
2669
2669
|
return r;
|
|
2670
2670
|
return h;
|
|
@@ -2673,16 +2673,16 @@ https://github.com/nodeca/pako/blob/main/LICENSE
|
|
|
2673
2673
|
for (e(X, X.dyn_ltree, X.l_desc.max_code), e(X, X.dyn_dtree, X.d_desc.max_code), kt(X, X.bl_desc), lt = p - 1; 3 <= lt && X.bl_tree[2 * H[lt] + 1] === 0; lt--)
|
|
2674
2674
|
;
|
|
2675
2675
|
return X.opt_len += 3 * (lt + 1) + 5 + 5 + 4, lt;
|
|
2676
|
-
}(f), B = f.opt_len + 3 + 7 >>> 3, (J = f.static_len + 3 + 7 >>> 3) <= B && (B = J)) : B = J =
|
|
2676
|
+
}(f), B = f.opt_len + 3 + 7 >>> 3, (J = f.static_len + 3 + 7 >>> 3) <= B && (B = J)) : B = J = Z + 5, Z + 4 <= B && S !== -1 ? m(f, S, Z, G) : f.strategy === 4 || J === B ? (Y(f, 2 + (G ? 1 : 0), 3), St(f, tt, w)) : (Y(f, 4 + (G ? 1 : 0), 3), function(X, lt, wt, gt) {
|
|
2677
2677
|
var Ct;
|
|
2678
2678
|
for (Y(X, lt - 257, 5), Y(X, wt - 1, 5), Y(X, gt - 4, 4), Ct = 0; Ct < gt; Ct++)
|
|
2679
2679
|
Y(X, X.bl_tree[2 * H[Ct] + 1], 3);
|
|
2680
2680
|
j(X, X.dyn_ltree, lt - 1), j(X, X.dyn_dtree, wt - 1);
|
|
2681
2681
|
}(f, f.l_desc.max_code + 1, f.d_desc.max_code + 1, ot + 1), St(f, f.dyn_ltree, f.dyn_dtree)), at(f), G && ct(f);
|
|
2682
|
-
}, l._tr_tally = function(f, S,
|
|
2683
|
-
return f.pending_buf[f.d_buf + 2 * f.last_lit] = S >>> 8 & 255, f.pending_buf[f.d_buf + 2 * f.last_lit + 1] = 255 & S, f.pending_buf[f.l_buf + f.last_lit] = 255 &
|
|
2682
|
+
}, l._tr_tally = function(f, S, Z) {
|
|
2683
|
+
return f.pending_buf[f.d_buf + 2 * f.last_lit] = S >>> 8 & 255, f.pending_buf[f.d_buf + 2 * f.last_lit + 1] = 255 & S, f.pending_buf[f.l_buf + f.last_lit] = 255 & Z, f.last_lit++, S === 0 ? f.dyn_ltree[2 * Z]++ : (f.matches++, S--, f.dyn_ltree[2 * (n[Z] + _ + 1)]++, f.dyn_dtree[2 * N(S)]++), f.last_lit === f.lit_bufsize - 1;
|
|
2684
2684
|
}, l._tr_align = function(f) {
|
|
2685
|
-
Y(f, 2, 3),
|
|
2685
|
+
Y(f, 2, 3), q(f, x, tt), function(S) {
|
|
2686
2686
|
S.bi_valid === 16 ? (it(S, S.bi_buf), S.bi_buf = 0, S.bi_valid = 0) : 8 <= S.bi_valid && (S.pending_buf[S.pending++] = 255 & S.bi_buf, S.bi_buf >>= 8, S.bi_valid -= 8);
|
|
2687
2687
|
}(f);
|
|
2688
2688
|
};
|
|
@@ -2694,10 +2694,10 @@ https://github.com/nodeca/pako/blob/main/LICENSE
|
|
|
2694
2694
|
(function(a) {
|
|
2695
2695
|
(function(h, r) {
|
|
2696
2696
|
if (!h.setImmediate) {
|
|
2697
|
-
var c, b, y,
|
|
2697
|
+
var c, b, y, _, v = 1, i = {}, p = !1, o = h.document, d = Object.getPrototypeOf && Object.getPrototypeOf(h);
|
|
2698
2698
|
d = d && d.setTimeout ? d : h, c = {}.toString.call(h.process) === "[object process]" ? function(A) {
|
|
2699
2699
|
process.nextTick(function() {
|
|
2700
|
-
|
|
2700
|
+
g(A);
|
|
2701
2701
|
});
|
|
2702
2702
|
} : function() {
|
|
2703
2703
|
if (h.postMessage && !h.importScripts) {
|
|
@@ -2706,19 +2706,19 @@ https://github.com/nodeca/pako/blob/main/LICENSE
|
|
|
2706
2706
|
A = !1;
|
|
2707
2707
|
}, h.postMessage("", "*"), h.onmessage = k, A;
|
|
2708
2708
|
}
|
|
2709
|
-
}() ? (
|
|
2710
|
-
h.postMessage(
|
|
2709
|
+
}() ? (_ = "setImmediate$" + Math.random() + "$", h.addEventListener ? h.addEventListener("message", x, !1) : h.attachEvent("onmessage", x), function(A) {
|
|
2710
|
+
h.postMessage(_ + A, "*");
|
|
2711
2711
|
}) : h.MessageChannel ? ((y = new MessageChannel()).port1.onmessage = function(A) {
|
|
2712
|
-
|
|
2712
|
+
g(A.data);
|
|
2713
2713
|
}, function(A) {
|
|
2714
2714
|
y.port2.postMessage(A);
|
|
2715
2715
|
}) : o && "onreadystatechange" in o.createElement("script") ? (b = o.documentElement, function(A) {
|
|
2716
2716
|
var k = o.createElement("script");
|
|
2717
2717
|
k.onreadystatechange = function() {
|
|
2718
|
-
|
|
2718
|
+
g(A), k.onreadystatechange = null, b.removeChild(k), k = null;
|
|
2719
2719
|
}, b.appendChild(k);
|
|
2720
2720
|
}) : function(A) {
|
|
2721
|
-
setTimeout(
|
|
2721
|
+
setTimeout(g, 0, A);
|
|
2722
2722
|
}, d.setImmediate = function(A) {
|
|
2723
2723
|
typeof A != "function" && (A = new Function("" + A));
|
|
2724
2724
|
for (var k = new Array(arguments.length - 1), O = 0; O < k.length; O++)
|
|
@@ -2730,9 +2730,9 @@ https://github.com/nodeca/pako/blob/main/LICENSE
|
|
|
2730
2730
|
function u(A) {
|
|
2731
2731
|
delete i[A];
|
|
2732
2732
|
}
|
|
2733
|
-
function
|
|
2733
|
+
function g(A) {
|
|
2734
2734
|
if (p)
|
|
2735
|
-
setTimeout(
|
|
2735
|
+
setTimeout(g, 0, A);
|
|
2736
2736
|
else {
|
|
2737
2737
|
var k = i[A];
|
|
2738
2738
|
if (k) {
|
|
@@ -2764,10 +2764,10 @@ https://github.com/nodeca/pako/blob/main/LICENSE
|
|
|
2764
2764
|
}
|
|
2765
2765
|
}
|
|
2766
2766
|
function x(A) {
|
|
2767
|
-
A.source === h && typeof A.data == "string" && A.data.indexOf(
|
|
2767
|
+
A.source === h && typeof A.data == "string" && A.data.indexOf(_) === 0 && g(+A.data.slice(_.length));
|
|
2768
2768
|
}
|
|
2769
2769
|
})(typeof self > "u" ? a === void 0 ? this : a : self);
|
|
2770
|
-
}).call(this, typeof
|
|
2770
|
+
}).call(this, typeof qt < "u" ? qt : typeof self < "u" ? self : typeof window < "u" ? window : {});
|
|
2771
2771
|
}, {}] }, {}, [10])(10);
|
|
2772
2772
|
});
|
|
2773
2773
|
})(Se);
|
|
@@ -2785,8 +2785,8 @@ function We(E) {
|
|
|
2785
2785
|
const t = E.querySelector("package"), s = ((y = t == null ? void 0 : t.getAttribute("unique-identifier")) == null ? void 0 : y.trim()) ?? "", C = Array.from(E.querySelectorAll("metadata > dc\\:identifier, metadata > identifier"));
|
|
2786
2786
|
let l = "";
|
|
2787
2787
|
if (s) {
|
|
2788
|
-
const
|
|
2789
|
-
l = ne(
|
|
2788
|
+
const _ = C.find((v) => v.getAttribute("id") === s);
|
|
2789
|
+
l = ne(_ == null ? void 0 : _.textContent);
|
|
2790
2790
|
}
|
|
2791
2791
|
if (!l && C.length > 0 && (l = ne(C[0].textContent)), l)
|
|
2792
2792
|
return `id=${l}`;
|
|
@@ -2804,7 +2804,7 @@ async function He(E) {
|
|
|
2804
2804
|
t = (t << 5) + t ^ E.charCodeAt(C);
|
|
2805
2805
|
return (t >>> 0).toString(16).padStart(8, "0");
|
|
2806
2806
|
}
|
|
2807
|
-
async function
|
|
2807
|
+
async function qe(E) {
|
|
2808
2808
|
const t = We(E);
|
|
2809
2809
|
return `bok_${(await He(t)).slice(0, 32)}`;
|
|
2810
2810
|
}
|
|
@@ -2816,10 +2816,10 @@ function he(E, t) {
|
|
|
2816
2816
|
l !== "." && (l === ".." ? s.pop() : s.push(l));
|
|
2817
2817
|
return s.join("/");
|
|
2818
2818
|
}
|
|
2819
|
-
function
|
|
2820
|
-
const [E, t] = Nt(""), [s, C] = Nt(!0), [l, a] = Nt(""), [h, r] = Nt(""), [c, b] = Nt([]), [y,
|
|
2821
|
-
}),
|
|
2822
|
-
C(!0), t(""), b([]), a("Loading..."), r(""),
|
|
2819
|
+
function Ze() {
|
|
2820
|
+
const [E, t] = Nt(""), [s, C] = Nt(!0), [l, a] = Nt(""), [h, r] = Nt(""), [c, b] = Nt([]), [y, _] = Nt(null), v = yt(""), i = yt(""), p = yt(null), o = yt(null), d = yt({}), u = yt(async () => {
|
|
2821
|
+
}), g = At(async (n) => {
|
|
2822
|
+
C(!0), t(""), b([]), a("Loading..."), r(""), _(null), v.current = "", i.current = "", d.current = {}, o.current && (document.head.removeChild(o.current), URL.revokeObjectURL(o.current.href), o.current = null);
|
|
2823
2823
|
try {
|
|
2824
2824
|
let T;
|
|
2825
2825
|
if (typeof n == "string") {
|
|
@@ -2844,13 +2844,13 @@ function qe() {
|
|
|
2844
2844
|
const it = p.current.file(N);
|
|
2845
2845
|
if (!it)
|
|
2846
2846
|
throw new Error(`OPF file not found at path: ${N}`);
|
|
2847
|
-
const Y = await it.async("text"),
|
|
2848
|
-
if (
|
|
2847
|
+
const Y = await it.async("text"), q = $.parseFromString(Y, "application/xml");
|
|
2848
|
+
if (q.querySelector("parsererror"))
|
|
2849
2849
|
throw new Error("Error parsing OPF file.");
|
|
2850
|
-
x(
|
|
2850
|
+
x(q), r(await qe(q)), await u.current(q);
|
|
2851
2851
|
})();
|
|
2852
2852
|
} catch (T) {
|
|
2853
|
-
console.error("Error processing EPUB source:", T),
|
|
2853
|
+
console.error("Error processing EPUB source:", T), _(T instanceof Error ? T.message : "Unknown error"), C(!1);
|
|
2854
2854
|
}
|
|
2855
2855
|
}, []);
|
|
2856
2856
|
function x(n) {
|
|
@@ -2864,12 +2864,12 @@ function qe() {
|
|
|
2864
2864
|
n.querySelectorAll("manifest > item").forEach((K) => {
|
|
2865
2865
|
const z = K.getAttribute("id"), N = K.getAttribute("href"), it = K.getAttribute("media-type"), Y = K.getAttribute("properties");
|
|
2866
2866
|
if (z && N && it) {
|
|
2867
|
-
const
|
|
2867
|
+
const q = decodeURIComponent(N);
|
|
2868
2868
|
T[z] = {
|
|
2869
|
-
href:
|
|
2869
|
+
href: q,
|
|
2870
2870
|
type: it,
|
|
2871
2871
|
properties: Y
|
|
2872
|
-
}, V[
|
|
2872
|
+
}, V[q] = z;
|
|
2873
2873
|
}
|
|
2874
2874
|
}), await k(n, T, V);
|
|
2875
2875
|
const M = Array.from(n.querySelectorAll("spine > itemref")).map((K) => K.getAttribute("idref"));
|
|
@@ -2883,8 +2883,8 @@ function qe() {
|
|
|
2883
2883
|
try {
|
|
2884
2884
|
const N = v.current + z.href, it = p.current.file(N);
|
|
2885
2885
|
if (it) {
|
|
2886
|
-
const Y = await it.async("text"),
|
|
2887
|
-
et += `<div class="bok-chapter" id="${K}">${
|
|
2886
|
+
const Y = await it.async("text"), q = await P(Y, z.type, K, z.href, V);
|
|
2887
|
+
et += `<div class="bok-chapter" id="${K}">${q}</div>`;
|
|
2888
2888
|
}
|
|
2889
2889
|
} catch (N) {
|
|
2890
2890
|
console.warn(`Failed to process spine item ${z.href}:`, N);
|
|
@@ -2927,7 +2927,7 @@ function qe() {
|
|
|
2927
2927
|
if (!z)
|
|
2928
2928
|
return;
|
|
2929
2929
|
const N = await z.async("text"), Y = new DOMParser().parseFromString(N, "application/xml");
|
|
2930
|
-
let
|
|
2930
|
+
let q = [];
|
|
2931
2931
|
if (et.type.includes("ncx")) {
|
|
2932
2932
|
const ht = Array.from(Y.querySelectorAll("navMap > navPoint")), mt = (at) => at.map((ct) => {
|
|
2933
2933
|
var kt, e;
|
|
@@ -2938,7 +2938,7 @@ function qe() {
|
|
|
2938
2938
|
subitems: mt(St)
|
|
2939
2939
|
};
|
|
2940
2940
|
});
|
|
2941
|
-
|
|
2941
|
+
q = mt(ht);
|
|
2942
2942
|
} else {
|
|
2943
2943
|
const ht = Y.querySelector("nav[epub\\:type='toc']") || Y.querySelector("nav"), mt = ht == null ? void 0 : ht.querySelector("ol"), at = (ct) => ct ? Array.from(ct.children).filter((pt) => pt.tagName.toLowerCase() === "li").map((pt) => {
|
|
2944
2944
|
var j;
|
|
@@ -2949,9 +2949,9 @@ function qe() {
|
|
|
2949
2949
|
subitems: at(e)
|
|
2950
2950
|
};
|
|
2951
2951
|
}) : [];
|
|
2952
|
-
mt && (
|
|
2952
|
+
mt && (q = at(mt));
|
|
2953
2953
|
}
|
|
2954
|
-
console.log("Parsed TOC:",
|
|
2954
|
+
console.log("Parsed TOC:", q), b(q);
|
|
2955
2955
|
}
|
|
2956
2956
|
function O(n, T, V) {
|
|
2957
2957
|
if (!n)
|
|
@@ -3053,7 +3053,7 @@ function qe() {
|
|
|
3053
3053
|
toc: c,
|
|
3054
3054
|
isLoading: s,
|
|
3055
3055
|
error: y,
|
|
3056
|
-
loadEpub:
|
|
3056
|
+
loadEpub: g,
|
|
3057
3057
|
setIsLoading: C
|
|
3058
3058
|
};
|
|
3059
3059
|
}
|
|
@@ -3068,7 +3068,7 @@ function $t(E, t) {
|
|
|
3068
3068
|
return console.warn(`Error reading localStorage key "${E}":`, l), t;
|
|
3069
3069
|
}
|
|
3070
3070
|
});
|
|
3071
|
-
return
|
|
3071
|
+
return bt(() => {
|
|
3072
3072
|
try {
|
|
3073
3073
|
s !== void 0 && localStorage.setItem(E, JSON.stringify(s));
|
|
3074
3074
|
} catch (l) {
|
|
@@ -3137,9 +3137,9 @@ function Ee(E) {
|
|
|
3137
3137
|
t[1] !== E ? (a = () => {
|
|
3138
3138
|
const c = E == null ? void 0 : E.current, b = () => {
|
|
3139
3139
|
if (c) {
|
|
3140
|
-
const y = c.getBoundingClientRect(),
|
|
3140
|
+
const y = c.getBoundingClientRect(), _ = y.height < y.width;
|
|
3141
3141
|
l((v) => {
|
|
3142
|
-
const i =
|
|
3142
|
+
const i = _ ? y.width / 2 : y.width, p = y.height, o = _ ? 2 : 1;
|
|
3143
3143
|
return v.width !== i || v.height !== p || v.noOfPages !== o ? {
|
|
3144
3144
|
width: i,
|
|
3145
3145
|
height: p,
|
|
@@ -3160,7 +3160,7 @@ function Ee(E) {
|
|
|
3160
3160
|
y.unobserve(c);
|
|
3161
3161
|
};
|
|
3162
3162
|
}
|
|
3163
|
-
}, h = [E], t[1] = E, t[2] = a, t[3] = h) : (a = t[2], h = t[3]),
|
|
3163
|
+
}, h = [E], t[1] = E, t[2] = a, t[3] = h) : (a = t[2], h = t[3]), bt(a, h);
|
|
3164
3164
|
let r;
|
|
3165
3165
|
return t[4] !== C.height || t[5] !== C.noOfPages || t[6] !== C.width ? (r = [C.width, C.height, C.noOfPages], t[4] = C.height, t[5] = C.noOfPages, t[6] = C.width, t[7] = r) : r = t[7], r;
|
|
3166
3166
|
}
|
|
@@ -3169,8 +3169,8 @@ function Ye(E) {
|
|
|
3169
3169
|
let l;
|
|
3170
3170
|
t[0] !== E ? (l = () => {
|
|
3171
3171
|
if (E.current) {
|
|
3172
|
-
const b = E.current.scrollWidth, y = E.current.scrollLeft,
|
|
3173
|
-
C(
|
|
3172
|
+
const b = E.current.scrollWidth, y = E.current.scrollLeft, _ = b > 0 ? y / b : 0;
|
|
3173
|
+
C(_);
|
|
3174
3174
|
}
|
|
3175
3175
|
}, t[0] = E, t[1] = l) : l = t[1];
|
|
3176
3176
|
const a = l;
|
|
@@ -3180,24 +3180,24 @@ function Ye(E) {
|
|
|
3180
3180
|
if (!b)
|
|
3181
3181
|
return;
|
|
3182
3182
|
let y = null;
|
|
3183
|
-
const
|
|
3183
|
+
const _ = () => {
|
|
3184
3184
|
y && clearTimeout(y), y = setTimeout(() => {
|
|
3185
3185
|
a();
|
|
3186
3186
|
}, 100);
|
|
3187
3187
|
};
|
|
3188
|
-
return b.addEventListener("scroll",
|
|
3189
|
-
y && clearTimeout(y), b.removeEventListener("scroll",
|
|
3188
|
+
return b.addEventListener("scroll", _), a(), () => {
|
|
3189
|
+
y && clearTimeout(y), b.removeEventListener("scroll", _);
|
|
3190
3190
|
};
|
|
3191
|
-
}, r = [a, E], t[2] = E, t[3] = a, t[4] = h, t[5] = r) : (h = t[4], r = t[5]),
|
|
3191
|
+
}, r = [a, E], t[2] = E, t[3] = a, t[4] = h, t[5] = r) : (h = t[4], r = t[5]), bt(h, r);
|
|
3192
3192
|
let c;
|
|
3193
3193
|
return t[6] !== s ? (c = [s, C], t[6] = s, t[7] = c) : c = t[7], c;
|
|
3194
3194
|
}
|
|
3195
3195
|
const Ve = (E, t, s, C) => {
|
|
3196
|
-
const l = Bt.c(21), [a, h] = Ee(s), r =
|
|
3196
|
+
const l = Bt.c(21), [a, h] = Ee(s), r = yt(null), c = yt(""), b = yt(!1), y = yt(!1), _ = yt(0), v = yt(0), i = yt(null);
|
|
3197
3197
|
let p;
|
|
3198
3198
|
l[0] !== E || l[1] !== t || l[2] !== h || l[3] !== a || l[4] !== C ? (p = (O, P) => {
|
|
3199
3199
|
const F = window.getSelection(), I = b.current || !!(F && F.rangeCount > 0 && !F.isCollapsed);
|
|
3200
|
-
if (Date.now() < v.current || !I &&
|
|
3200
|
+
if (Date.now() < v.current || !I && _.current > 0 && Date.now() - _.current < 500 || I)
|
|
3201
3201
|
return !1;
|
|
3202
3202
|
if (!t && !C) {
|
|
3203
3203
|
if (O / a <= 0.4 && P / h < 0.8)
|
|
@@ -3212,14 +3212,14 @@ const Ve = (E, t, s, C) => {
|
|
|
3212
3212
|
l[6] === Symbol.for("react.memo_cache_sentinel") ? (d = () => {
|
|
3213
3213
|
const O = () => {
|
|
3214
3214
|
const P = window.getSelection(), F = !!(P && P.rangeCount > 0 && !P.isCollapsed);
|
|
3215
|
-
!F && b.current && (
|
|
3215
|
+
!F && b.current && (_.current = Date.now()), b.current = F, F || (y.current = !1), c.current = F ? (P == null ? void 0 : P.toString()) ?? "" : "", F ? v.current = Date.now() + 1500 : _.current && (v.current = Date.now() + 500);
|
|
3216
3216
|
};
|
|
3217
3217
|
return document.addEventListener("selectionchange", O), () => {
|
|
3218
3218
|
document.removeEventListener("selectionchange", O);
|
|
3219
3219
|
};
|
|
3220
|
-
}, u = [], l[6] = d, l[7] = u) : (d = l[6], u = l[7]),
|
|
3221
|
-
let
|
|
3222
|
-
l[8] !== o ? (
|
|
3220
|
+
}, u = [], l[6] = d, l[7] = u) : (d = l[6], u = l[7]), bt(d, u);
|
|
3221
|
+
let g;
|
|
3222
|
+
l[8] !== o ? (g = () => {
|
|
3223
3223
|
const O = (F) => {
|
|
3224
3224
|
const I = window.getSelection();
|
|
3225
3225
|
y.current = b.current || !!(I && I.rangeCount > 0 && !I.isCollapsed);
|
|
@@ -3239,7 +3239,7 @@ const Ve = (E, t, s, C) => {
|
|
|
3239
3239
|
y.current = !1;
|
|
3240
3240
|
return;
|
|
3241
3241
|
}
|
|
3242
|
-
const w = !tt &&
|
|
3242
|
+
const w = !tt && _.current > 0 && Date.now() - _.current < 500;
|
|
3243
3243
|
if (y.current = !1, r.current && !tt && !w) {
|
|
3244
3244
|
clearTimeout(r.current), r.current = null;
|
|
3245
3245
|
const L = F.changedTouches[0] || F.touches[0];
|
|
@@ -3263,9 +3263,9 @@ const Ve = (E, t, s, C) => {
|
|
|
3263
3263
|
}), () => {
|
|
3264
3264
|
window.removeEventListener("touchstart", O), window.removeEventListener("touchend", P);
|
|
3265
3265
|
};
|
|
3266
|
-
}, l[8] = o, l[9] =
|
|
3266
|
+
}, l[8] = o, l[9] = g) : g = l[9];
|
|
3267
3267
|
let x;
|
|
3268
|
-
l[10] !== o || l[11] !== a ? (x = [a, o], l[10] = o, l[11] = a, l[12] = x) : x = l[12],
|
|
3268
|
+
l[10] !== o || l[11] !== a ? (x = [a, o], l[10] = o, l[11] = a, l[12] = x) : x = l[12], bt(g, x);
|
|
3269
3269
|
let A;
|
|
3270
3270
|
l[13] !== s || l[14] !== o ? (A = () => {
|
|
3271
3271
|
const O = s.current, P = () => {
|
|
@@ -3280,7 +3280,7 @@ const Ve = (E, t, s, C) => {
|
|
|
3280
3280
|
y.current = !1;
|
|
3281
3281
|
return;
|
|
3282
3282
|
}
|
|
3283
|
-
const L = !w &&
|
|
3283
|
+
const L = !w && _.current > 0 && Date.now() - _.current < 500;
|
|
3284
3284
|
y.current = !1, r.current && !w && !L && (clearTimeout(r.current), r.current = null, o(I.clientX, I.clientY));
|
|
3285
3285
|
};
|
|
3286
3286
|
return O == null || O.addEventListener("mousedown", P), O == null || O.addEventListener("mouseup", F), () => {
|
|
@@ -3288,7 +3288,7 @@ const Ve = (E, t, s, C) => {
|
|
|
3288
3288
|
};
|
|
3289
3289
|
}, l[13] = s, l[14] = o, l[15] = A) : A = l[15];
|
|
3290
3290
|
let k;
|
|
3291
|
-
l[16] !== s || l[17] !== o || l[18] !== t || l[19] !== a ? (k = [a, t, o, s], l[16] = s, l[17] = o, l[18] = t, l[19] = a, l[20] = k) : k = l[20],
|
|
3291
|
+
l[16] !== s || l[17] !== o || l[18] !== t || l[19] !== a ? (k = [a, t, o, s], l[16] = s, l[17] = o, l[18] = t, l[19] = a, l[20] = k) : k = l[20], bt(A, k);
|
|
3292
3292
|
};
|
|
3293
3293
|
function Je() {
|
|
3294
3294
|
}
|
|
@@ -3370,21 +3370,21 @@ const Qe = "_toast_1nwn7_1", tn = "_visible_1nwn7_19", pe = {
|
|
|
3370
3370
|
containerElementRef: c,
|
|
3371
3371
|
showTutorial: b,
|
|
3372
3372
|
onPageChange: y,
|
|
3373
|
-
onPageCountChange:
|
|
3373
|
+
onPageCountChange: _,
|
|
3374
3374
|
onProgressChange: v,
|
|
3375
3375
|
highlights: i,
|
|
3376
3376
|
onAddHighlight: p,
|
|
3377
3377
|
onRemoveHighlight: o,
|
|
3378
3378
|
onUpdateHighlightColor: d
|
|
3379
3379
|
}, u) => {
|
|
3380
|
-
const
|
|
3381
|
-
|
|
3382
|
-
|
|
3383
|
-
}, [
|
|
3380
|
+
const g = yt(null), x = yt(!1), A = yt(null), k = yt(0), O = yt(0), P = yt(0), F = yt(null), I = yt(null), H = yt(null), [tt, w] = Nt(null), [L, n] = Nt(null), [T, V] = Nt(!1), M = yt(null), [et, $, K] = Ee(c), [z, N] = Ye(g), [it, Y] = Nt(1), [q, ht] = Nt(0), mt = yt(!1), at = s ? `bok_progress_${s}` : "", ct = t && t !== "Loading..." ? `bok_progress_${t}` : "", pt = yt(z), dt = yt(null);
|
|
3381
|
+
bt(() => {
|
|
3382
|
+
_ && _(q);
|
|
3383
|
+
}, [q, _]), bt(() => {
|
|
3384
3384
|
y && y(it);
|
|
3385
|
-
}, [it, y]),
|
|
3385
|
+
}, [it, y]), bt(() => {
|
|
3386
3386
|
pt.current = z;
|
|
3387
|
-
}, [z]),
|
|
3387
|
+
}, [z]), bt(() => {
|
|
3388
3388
|
if (!at)
|
|
3389
3389
|
return;
|
|
3390
3390
|
let R = 0;
|
|
@@ -3408,18 +3408,18 @@ const Qe = "_toast_1nwn7_1", tn = "_visible_1nwn7_19", pe = {
|
|
|
3408
3408
|
mt.current = !1;
|
|
3409
3409
|
}, 0);
|
|
3410
3410
|
return () => clearTimeout(D);
|
|
3411
|
-
}, [ct, at, N]),
|
|
3411
|
+
}, [ct, at, N]), bt(() => {
|
|
3412
3412
|
if (at && !mt.current)
|
|
3413
3413
|
try {
|
|
3414
3414
|
localStorage.setItem(at, JSON.stringify(z));
|
|
3415
3415
|
} catch (R) {
|
|
3416
3416
|
console.warn(`Error saving progress for "${at}":`, R);
|
|
3417
3417
|
}
|
|
3418
|
-
}, [z, at]),
|
|
3418
|
+
}, [z, at]), bt(() => {
|
|
3419
3419
|
v && v(z);
|
|
3420
3420
|
}, [v, z]);
|
|
3421
3421
|
const St = At((R) => {
|
|
3422
|
-
const D =
|
|
3422
|
+
const D = g.current;
|
|
3423
3423
|
if (!D)
|
|
3424
3424
|
return;
|
|
3425
3425
|
dt.current && cancelAnimationFrame(dt.current);
|
|
@@ -3434,19 +3434,19 @@ const Qe = "_toast_1nwn7_1", tn = "_visible_1nwn7_19", pe = {
|
|
|
3434
3434
|
dt.current = requestAnimationFrame(_t);
|
|
3435
3435
|
}, [et, K]), kt = At((R) => {
|
|
3436
3436
|
let D = R;
|
|
3437
|
-
D < 0 && (D = 0), D >=
|
|
3438
|
-
}, [
|
|
3437
|
+
D < 0 && (D = 0), D >= q && (D = q - 1), Y(D), St(D);
|
|
3438
|
+
}, [q, St]), e = At((R) => {
|
|
3439
3439
|
const D = Math.max(0, Math.min(1, R));
|
|
3440
|
-
if (N(D),
|
|
3440
|
+
if (N(D), q <= 0)
|
|
3441
3441
|
return;
|
|
3442
|
-
let W = Math.round(
|
|
3443
|
-
W = Math.max(0, Math.min(
|
|
3444
|
-
}, [
|
|
3442
|
+
let W = Math.round(q * D);
|
|
3443
|
+
W = Math.max(0, Math.min(q - 1, W)), Y(W), St(W);
|
|
3444
|
+
}, [q, St, N]), j = At((R) => {
|
|
3445
3445
|
Y((D) => {
|
|
3446
3446
|
let W = D + R;
|
|
3447
|
-
return W < 0 && (W = 0), W >=
|
|
3447
|
+
return W < 0 && (W = 0), W >= q && (W = q - 1), St(W), W;
|
|
3448
3448
|
});
|
|
3449
|
-
}, [
|
|
3449
|
+
}, [q, St]);
|
|
3450
3450
|
ke(u, () => ({
|
|
3451
3451
|
goToPage: kt,
|
|
3452
3452
|
setProgress: e,
|
|
@@ -3475,7 +3475,7 @@ const Qe = "_toast_1nwn7_1", tn = "_visible_1nwn7_19", pe = {
|
|
|
3475
3475
|
const nt = W.tagName.toLowerCase();
|
|
3476
3476
|
return nt === "script" || nt === "style" ? NodeFilter.FILTER_REJECT : NodeFilter.FILTER_ACCEPT;
|
|
3477
3477
|
}
|
|
3478
|
-
}), []),
|
|
3478
|
+
}), []), Z = At((R) => {
|
|
3479
3479
|
const D = S(R), W = [];
|
|
3480
3480
|
let nt = D.nextNode();
|
|
3481
3481
|
for (; nt; )
|
|
@@ -3518,7 +3518,7 @@ const Qe = "_toast_1nwn7_1", tn = "_visible_1nwn7_19", pe = {
|
|
|
3518
3518
|
}, []), J = At((R, D) => {
|
|
3519
3519
|
if (D.end <= D.start)
|
|
3520
3520
|
return;
|
|
3521
|
-
const W =
|
|
3521
|
+
const W = Z(R);
|
|
3522
3522
|
let nt = 0;
|
|
3523
3523
|
for (const rt of W) {
|
|
3524
3524
|
const ut = rt.length, ft = nt, _t = nt + ut;
|
|
@@ -3531,8 +3531,8 @@ const Qe = "_toast_1nwn7_1", tn = "_visible_1nwn7_19", pe = {
|
|
|
3531
3531
|
const Tt = Math.max(D.start, ft) - ft, xt = Math.min(D.end, _t) - ft;
|
|
3532
3532
|
B(rt, Tt, xt, D), nt += ut;
|
|
3533
3533
|
}
|
|
3534
|
-
}, [
|
|
3535
|
-
const R =
|
|
3534
|
+
}, [Z, B]), ot = At(() => {
|
|
3535
|
+
const R = g.current;
|
|
3536
3536
|
if (!(!R || (R.querySelectorAll("span[data-highlight-id]").forEach((nt) => {
|
|
3537
3537
|
const rt = nt.parentNode;
|
|
3538
3538
|
if (rt) {
|
|
@@ -3556,7 +3556,7 @@ const Qe = "_toast_1nwn7_1", tn = "_visible_1nwn7_19", pe = {
|
|
|
3556
3556
|
w(null), A.current = null;
|
|
3557
3557
|
return;
|
|
3558
3558
|
}
|
|
3559
|
-
const D = R.getRangeAt(0), W =
|
|
3559
|
+
const D = R.getRangeAt(0), W = g.current;
|
|
3560
3560
|
if (!W || !W.contains(D.commonAncestorContainer)) {
|
|
3561
3561
|
w(null), A.current = null;
|
|
3562
3562
|
return;
|
|
@@ -3628,13 +3628,13 @@ const Qe = "_toast_1nwn7_1", tn = "_visible_1nwn7_19", pe = {
|
|
|
3628
3628
|
}, [f, G, p]), wt = At((R) => {
|
|
3629
3629
|
if (R.text)
|
|
3630
3630
|
return R.text;
|
|
3631
|
-
const D =
|
|
3631
|
+
const D = g.current;
|
|
3632
3632
|
if (!D)
|
|
3633
3633
|
return "";
|
|
3634
3634
|
const W = D.querySelector(`#${m(R.chapterId)}`);
|
|
3635
3635
|
if (!W || R.end <= R.start)
|
|
3636
3636
|
return "";
|
|
3637
|
-
const nt =
|
|
3637
|
+
const nt = Z(W);
|
|
3638
3638
|
let rt = 0, ut = "";
|
|
3639
3639
|
for (const ft of nt) {
|
|
3640
3640
|
const _t = ft.length, Tt = rt, xt = rt + _t;
|
|
@@ -3648,7 +3648,7 @@ const Qe = "_toast_1nwn7_1", tn = "_visible_1nwn7_19", pe = {
|
|
|
3648
3648
|
ut += ft.data.slice(Ot, Pt), rt += _t;
|
|
3649
3649
|
}
|
|
3650
3650
|
return ut;
|
|
3651
|
-
}, [m,
|
|
3651
|
+
}, [m, Z]), gt = At(async (R) => {
|
|
3652
3652
|
var W;
|
|
3653
3653
|
if (!R)
|
|
3654
3654
|
return;
|
|
@@ -3669,10 +3669,10 @@ const Qe = "_toast_1nwn7_1", tn = "_visible_1nwn7_19", pe = {
|
|
|
3669
3669
|
document.body.removeChild(D);
|
|
3670
3670
|
}
|
|
3671
3671
|
}, []);
|
|
3672
|
-
|
|
3672
|
+
bt(() => {
|
|
3673
3673
|
ot();
|
|
3674
|
-
}, [ot, E]),
|
|
3675
|
-
const R =
|
|
3674
|
+
}, [ot, E]), bt(() => {
|
|
3675
|
+
const R = g.current;
|
|
3676
3676
|
if (!R)
|
|
3677
3677
|
return;
|
|
3678
3678
|
const D = () => {
|
|
@@ -3684,15 +3684,15 @@ const Qe = "_toast_1nwn7_1", tn = "_visible_1nwn7_19", pe = {
|
|
|
3684
3684
|
return R.addEventListener("mouseup", D), R.addEventListener("touchend", W), () => {
|
|
3685
3685
|
R.removeEventListener("mouseup", D), R.removeEventListener("touchend", W);
|
|
3686
3686
|
};
|
|
3687
|
-
}, [X]),
|
|
3688
|
-
const R =
|
|
3687
|
+
}, [X]), bt(() => {
|
|
3688
|
+
const R = g.current;
|
|
3689
3689
|
if (!R)
|
|
3690
3690
|
return;
|
|
3691
3691
|
const D = (W) => {
|
|
3692
3692
|
W.preventDefault();
|
|
3693
3693
|
};
|
|
3694
3694
|
return R.addEventListener("contextmenu", D), () => R.removeEventListener("contextmenu", D);
|
|
3695
|
-
}, []),
|
|
3695
|
+
}, []), bt(() => {
|
|
3696
3696
|
const R = () => {
|
|
3697
3697
|
var W, nt;
|
|
3698
3698
|
if (Date.now() < O.current)
|
|
@@ -3707,9 +3707,9 @@ const Qe = "_toast_1nwn7_1", tn = "_visible_1nwn7_19", pe = {
|
|
|
3707
3707
|
(!D || D.isCollapsed) && (F.current && (clearTimeout(F.current), F.current = null), w(null), A.current = null);
|
|
3708
3708
|
};
|
|
3709
3709
|
return document.addEventListener("selectionchange", R), () => document.removeEventListener("selectionchange", R);
|
|
3710
|
-
}, [X]),
|
|
3710
|
+
}, [X]), bt(() => () => {
|
|
3711
3711
|
M.current && clearTimeout(M.current), F.current && clearTimeout(F.current);
|
|
3712
|
-
}, []),
|
|
3712
|
+
}, []), bt(() => {
|
|
3713
3713
|
(r || b) && (w(null), A.current = null, n(null));
|
|
3714
3714
|
}, [r, b]), le(() => {
|
|
3715
3715
|
var ft, _t, Tt;
|
|
@@ -3737,8 +3737,8 @@ const Qe = "_toast_1nwn7_1", tn = "_visible_1nwn7_19", pe = {
|
|
|
3737
3737
|
top: nt,
|
|
3738
3738
|
placement: rt
|
|
3739
3739
|
});
|
|
3740
|
-
}, [c, tt]),
|
|
3741
|
-
const R =
|
|
3740
|
+
}, [c, tt]), bt(() => {
|
|
3741
|
+
const R = g.current;
|
|
3742
3742
|
if (!R)
|
|
3743
3743
|
return;
|
|
3744
3744
|
const D = (W) => {
|
|
@@ -3803,7 +3803,15 @@ const Qe = "_toast_1nwn7_1", tn = "_visible_1nwn7_19", pe = {
|
|
|
3803
3803
|
top: nt,
|
|
3804
3804
|
placement: rt
|
|
3805
3805
|
});
|
|
3806
|
-
}, [c, L]),
|
|
3806
|
+
}, [c, L]), bt(() => {
|
|
3807
|
+
const R = g.current;
|
|
3808
|
+
if (!R)
|
|
3809
|
+
return;
|
|
3810
|
+
const D = R.querySelectorAll("span[data-highlight-id]");
|
|
3811
|
+
D.forEach((W) => W.classList.remove("bok-highlight--focused")), L && D.forEach((W) => {
|
|
3812
|
+
W.getAttribute("data-highlight-id") === L.id && W.classList.add("bok-highlight--focused");
|
|
3813
|
+
});
|
|
3814
|
+
}, [L, i]), bt(() => {
|
|
3807
3815
|
const R = (D) => {
|
|
3808
3816
|
if (Date.now() < P.current)
|
|
3809
3817
|
return;
|
|
@@ -3814,8 +3822,8 @@ const Qe = "_toast_1nwn7_1", tn = "_visible_1nwn7_19", pe = {
|
|
|
3814
3822
|
nt && !nt.isCollapsed && tt || Date.now() - k.current < 200 || (w(null), n(null));
|
|
3815
3823
|
};
|
|
3816
3824
|
return document.addEventListener("click", R), () => document.removeEventListener("click", R);
|
|
3817
|
-
}, [tt]),
|
|
3818
|
-
const R =
|
|
3825
|
+
}, [tt]), bt(() => {
|
|
3826
|
+
const R = g.current;
|
|
3819
3827
|
if (!R)
|
|
3820
3828
|
return;
|
|
3821
3829
|
const D = (W) => {
|
|
@@ -3834,8 +3842,8 @@ const Qe = "_toast_1nwn7_1", tn = "_visible_1nwn7_19", pe = {
|
|
|
3834
3842
|
}
|
|
3835
3843
|
};
|
|
3836
3844
|
return R.addEventListener("click", D), () => R.removeEventListener("click", D);
|
|
3837
|
-
}, [kt]),
|
|
3838
|
-
const R =
|
|
3845
|
+
}, [kt]), bt(() => {
|
|
3846
|
+
const R = g.current;
|
|
3839
3847
|
if (!R || et <= 0 || $ <= 0)
|
|
3840
3848
|
return;
|
|
3841
3849
|
C(!0);
|
|
@@ -3857,7 +3865,7 @@ const Qe = "_toast_1nwn7_1", tn = "_visible_1nwn7_19", pe = {
|
|
|
3857
3865
|
return () => {
|
|
3858
3866
|
clearTimeout(D), dt.current && cancelAnimationFrame(dt.current);
|
|
3859
3867
|
};
|
|
3860
|
-
}, [et, $, a, l, h, K, E, t, C]),
|
|
3868
|
+
}, [et, $, a, l, h, K, E, t, C]), bt(() => {
|
|
3861
3869
|
const R = (D) => {
|
|
3862
3870
|
D.key === "ArrowLeft" ? (D.preventDefault(), j(-1)) : D.key === "ArrowRight" && (D.preventDefault(), j(1));
|
|
3863
3871
|
};
|
|
@@ -3869,7 +3877,7 @@ const Qe = "_toast_1nwn7_1", tn = "_visible_1nwn7_19", pe = {
|
|
|
3869
3877
|
}, 1600);
|
|
3870
3878
|
}, []);
|
|
3871
3879
|
return /* @__PURE__ */ vt(Jt, { children: [
|
|
3872
|
-
/* @__PURE__ */ Q(en, { content: E, bookRef:
|
|
3880
|
+
/* @__PURE__ */ Q(en, { content: E, bookRef: g }),
|
|
3873
3881
|
tt && !r && !b && /* @__PURE__ */ vt("div", { ref: I, className: "highlight-menu", "data-placement": tt.placement, style: {
|
|
3874
3882
|
left: `${tt.left}px`,
|
|
3875
3883
|
top: `${tt.top}px`
|
|
@@ -3911,7 +3919,7 @@ const Qe = "_toast_1nwn7_1", tn = "_visible_1nwn7_19", pe = {
|
|
|
3911
3919
|
] })
|
|
3912
3920
|
] }),
|
|
3913
3921
|
/* @__PURE__ */ Q(Ae, { message: "Copied to clipboard", visible: T }),
|
|
3914
|
-
/* @__PURE__ */ Q(Xe, { pages:
|
|
3922
|
+
/* @__PURE__ */ Q(Xe, { pages: q, currentPage: it })
|
|
3915
3923
|
] });
|
|
3916
3924
|
}), on = "_book_1bbsw_30", sn = "_page_1bbsw_69", Ut = {
|
|
3917
3925
|
"loading-screen": "_loading-screen_1bbsw_1",
|
|
@@ -3937,7 +3945,7 @@ function ln() {
|
|
|
3937
3945
|
document.documentElement.requestFullscreen && (document.fullscreenElement ? document.exitFullscreen && document.exitFullscreen() : document.documentElement.requestFullscreen());
|
|
3938
3946
|
}
|
|
3939
3947
|
function se(E, t) {
|
|
3940
|
-
const s = Bt.c(9), C = t === void 0 ? 350 : t, [l, a] = Nt(!1), [h, r] = Nt(!1), c =
|
|
3948
|
+
const s = Bt.c(9), C = t === void 0 ? 350 : t, [l, a] = Nt(!1), [h, r] = Nt(!1), c = yt(null);
|
|
3941
3949
|
let b, y;
|
|
3942
3950
|
s[0] === Symbol.for("react.memo_cache_sentinel") ? (b = () => {
|
|
3943
3951
|
let p = 0, o = 0;
|
|
@@ -3948,16 +3956,16 @@ function se(E, t) {
|
|
|
3948
3956
|
}), () => {
|
|
3949
3957
|
cancelAnimationFrame(p), cancelAnimationFrame(o), c.current !== null && window.clearTimeout(c.current);
|
|
3950
3958
|
};
|
|
3951
|
-
}, y = [], s[0] = b, s[1] = y) : (b = s[0], y = s[1]),
|
|
3952
|
-
let
|
|
3953
|
-
s[2] !== C || s[3] !== E ? (
|
|
3959
|
+
}, y = [], s[0] = b, s[1] = y) : (b = s[0], y = s[1]), bt(b, y);
|
|
3960
|
+
let _;
|
|
3961
|
+
s[2] !== C || s[3] !== E ? (_ = () => {
|
|
3954
3962
|
requestAnimationFrame(() => {
|
|
3955
3963
|
a(!1), r(!0);
|
|
3956
3964
|
}), c.current !== null && window.clearTimeout(c.current), c.current = window.setTimeout(() => {
|
|
3957
3965
|
E();
|
|
3958
3966
|
}, C);
|
|
3959
|
-
}, s[2] = C, s[3] = E, s[4] =
|
|
3960
|
-
const v =
|
|
3967
|
+
}, s[2] = C, s[3] = E, s[4] = _) : _ = s[4];
|
|
3968
|
+
const v = _;
|
|
3961
3969
|
let i;
|
|
3962
3970
|
return s[5] !== v || s[6] !== h || s[7] !== l ? (i = {
|
|
3963
3971
|
isVisible: l,
|
|
@@ -3965,23 +3973,23 @@ function se(E, t) {
|
|
|
3965
3973
|
closeMenu: v
|
|
3966
3974
|
}, s[5] = v, s[6] = h, s[7] = l, s[8] = i) : i = s[8], i;
|
|
3967
3975
|
}
|
|
3968
|
-
const cn = "
|
|
3969
|
-
"options-menu-overlay": "_options-menu-
|
|
3970
|
-
"fade-out": "_fade-
|
|
3971
|
-
"options-menu": "_options-
|
|
3976
|
+
const cn = "_visible_b4848_32 _panelVisible_dwzj9_60", un = "_title_b4848_49", hn = "_select_b4848_173", Et = {
|
|
3977
|
+
"options-menu-overlay": "_options-menu-overlay_b4848_1 _overlay_dwzj9_1",
|
|
3978
|
+
"fade-out": "_fade-out_b4848_7 _overlayFadeOut_dwzj9_34",
|
|
3979
|
+
"options-menu": "_options-menu_b4848_1 _panel_dwzj9_43",
|
|
3972
3980
|
visible: cn,
|
|
3973
|
-
"slide-down": "_slide-
|
|
3981
|
+
"slide-down": "_slide-down_b4848_36 _panelSlideDown_dwzj9_66",
|
|
3974
3982
|
title: un,
|
|
3975
|
-
"close-button": "_close-
|
|
3976
|
-
"options-buttons": "_options-
|
|
3977
|
-
"option-row": "_option-
|
|
3978
|
-
"option-label": "_option-
|
|
3979
|
-
"option-controls": "_option-
|
|
3980
|
-
"stepper-button": "_stepper-
|
|
3981
|
-
"option-value": "_option-
|
|
3982
|
-
"value-changed": "_value-
|
|
3983
|
+
"close-button": "_close-button_b4848_58",
|
|
3984
|
+
"options-buttons": "_options-buttons_b4848_87",
|
|
3985
|
+
"option-row": "_option-row_b4848_93",
|
|
3986
|
+
"option-label": "_option-label_b4848_105",
|
|
3987
|
+
"option-controls": "_option-controls_b4848_113",
|
|
3988
|
+
"stepper-button": "_stepper-button_b4848_119",
|
|
3989
|
+
"option-value": "_option-value_b4848_151",
|
|
3990
|
+
"value-changed": "_value-changed_b4848_168",
|
|
3983
3991
|
select: hn,
|
|
3984
|
-
"fullscreen-button": "_fullscreen-
|
|
3992
|
+
"fullscreen-button": "_fullscreen-button_b4848_221"
|
|
3985
3993
|
};
|
|
3986
3994
|
function dn(E) {
|
|
3987
3995
|
const t = Bt.c(90), {
|
|
@@ -3994,16 +4002,16 @@ function dn(E) {
|
|
|
3994
4002
|
setPadding: c,
|
|
3995
4003
|
setTheme: b,
|
|
3996
4004
|
setFontFamily: y,
|
|
3997
|
-
supportedFonts:
|
|
4005
|
+
supportedFonts: _,
|
|
3998
4006
|
allThemes: v
|
|
3999
4007
|
} = E;
|
|
4000
4008
|
let i;
|
|
4001
|
-
t[0] !==
|
|
4009
|
+
t[0] !== _ ? (i = _ === void 0 ? [] : _, t[0] = _, t[1] = i) : i = t[1];
|
|
4002
4010
|
const p = i, {
|
|
4003
4011
|
isVisible: o,
|
|
4004
4012
|
isClosing: d,
|
|
4005
4013
|
closeMenu: u
|
|
4006
|
-
} = se(s),
|
|
4014
|
+
} = se(s), g = yt(null), x = yt(null);
|
|
4007
4015
|
let A, k, O;
|
|
4008
4016
|
t[2] === Symbol.for("react.memo_cache_sentinel") ? (A = {
|
|
4009
4017
|
displayName: "Literata",
|
|
@@ -4043,12 +4051,12 @@ function dn(E) {
|
|
|
4043
4051
|
const $ = et;
|
|
4044
4052
|
let K;
|
|
4045
4053
|
t[18] !== C || t[19] !== r ? (K = () => {
|
|
4046
|
-
C < 3 && (r(gn), T(
|
|
4054
|
+
C < 3 && (r(gn), T(g));
|
|
4047
4055
|
}, t[18] = C, t[19] = r, t[20] = K) : K = t[20];
|
|
4048
4056
|
const z = K;
|
|
4049
4057
|
let N;
|
|
4050
4058
|
t[21] !== C || t[22] !== r ? (N = () => {
|
|
4051
|
-
C - 0.2 > 0.6 && (r(mn), T(
|
|
4059
|
+
C - 0.2 > 0.6 && (r(mn), T(g));
|
|
4052
4060
|
}, t[21] = C, t[22] = r, t[23] = N) : N = t[23];
|
|
4053
4061
|
const it = N;
|
|
4054
4062
|
let Y;
|
|
@@ -4056,13 +4064,13 @@ function dn(E) {
|
|
|
4056
4064
|
const rt = [Et["options-menu"]];
|
|
4057
4065
|
return o && rt.push(Et.visible), d && rt.push(Et["slide-down"]), rt.join(" ");
|
|
4058
4066
|
}, t[24] = d, t[25] = o, t[26] = Y) : Y = t[26];
|
|
4059
|
-
const
|
|
4067
|
+
const q = Y;
|
|
4060
4068
|
let ht;
|
|
4061
4069
|
t[27] !== d ? (ht = () => {
|
|
4062
4070
|
const rt = [Et["options-menu-overlay"]];
|
|
4063
4071
|
return d && rt.push(Et["fade-out"]), rt.join(" ");
|
|
4064
4072
|
}, t[27] = d, t[28] = ht) : ht = t[28];
|
|
4065
|
-
const at = ht(), ct =
|
|
4073
|
+
const at = ht(), ct = q();
|
|
4066
4074
|
let pt;
|
|
4067
4075
|
t[29] !== u ? (pt = /* @__PURE__ */ Q("button", { onClick: u, className: Et["close-button"], "aria-label": "Close menu", children: "✕" }), t[29] = u, t[30] = pt) : pt = t[30];
|
|
4068
4076
|
let dt;
|
|
@@ -4095,8 +4103,8 @@ function dn(E) {
|
|
|
4095
4103
|
U,
|
|
4096
4104
|
/* @__PURE__ */ Q("select", { className: Et.select, value: h, onChange: m, children: f })
|
|
4097
4105
|
] }), t[48] = m, t[49] = f, t[50] = h, t[51] = S) : S = t[51];
|
|
4098
|
-
let
|
|
4099
|
-
t[52] === Symbol.for("react.memo_cache_sentinel") ? (
|
|
4106
|
+
let Z;
|
|
4107
|
+
t[52] === Symbol.for("react.memo_cache_sentinel") ? (Z = /* @__PURE__ */ Q("div", { className: Et["option-label"], children: "Side padding" }), t[52] = Z) : Z = t[52];
|
|
4100
4108
|
let G;
|
|
4101
4109
|
t[53] !== $ ? (G = /* @__PURE__ */ Q("button", { className: Et["stepper-button"], onClick: $, children: "-" }), t[53] = $, t[54] = G) : G = t[54];
|
|
4102
4110
|
let B;
|
|
@@ -4105,7 +4113,7 @@ function dn(E) {
|
|
|
4105
4113
|
t[57] !== M ? (J = /* @__PURE__ */ Q("button", { className: Et["stepper-button"], onClick: M, children: "+" }), t[57] = M, t[58] = J) : J = t[58];
|
|
4106
4114
|
let ot;
|
|
4107
4115
|
t[59] !== G || t[60] !== B || t[61] !== J ? (ot = /* @__PURE__ */ vt("div", { className: Et["option-row"], children: [
|
|
4108
|
-
|
|
4116
|
+
Z,
|
|
4109
4117
|
/* @__PURE__ */ vt("div", { className: Et["option-controls"], children: [
|
|
4110
4118
|
G,
|
|
4111
4119
|
B,
|
|
@@ -4119,7 +4127,7 @@ function dn(E) {
|
|
|
4119
4127
|
let wt;
|
|
4120
4128
|
t[66] !== C ? (wt = Math.round(C * 10), t[66] = C, t[67] = wt) : wt = t[67];
|
|
4121
4129
|
let gt;
|
|
4122
|
-
t[68] !== wt ? (gt = /* @__PURE__ */ Q("span", { ref:
|
|
4130
|
+
t[68] !== wt ? (gt = /* @__PURE__ */ Q("span", { ref: g, className: Et["option-value"], children: wt }), t[68] = wt, t[69] = gt) : gt = t[69];
|
|
4123
4131
|
let Ct;
|
|
4124
4132
|
t[70] !== z ? (Ct = /* @__PURE__ */ Q("button", { className: Et["stepper-button"], onClick: z, children: "+" }), t[70] = z, t[71] = Ct) : Ct = t[71];
|
|
4125
4133
|
let st;
|
|
@@ -4177,24 +4185,24 @@ function yn(E) {
|
|
|
4177
4185
|
function vn(E) {
|
|
4178
4186
|
E.stopPropagation();
|
|
4179
4187
|
}
|
|
4180
|
-
const wn = "
|
|
4181
|
-
"nav-menu-overlay": "_nav-menu-
|
|
4182
|
-
"fade-out": "_fade-
|
|
4183
|
-
"nav-menu": "_nav-
|
|
4188
|
+
const wn = "_visible_98txv_32 _panelVisible_dwzj9_60", zt = {
|
|
4189
|
+
"nav-menu-overlay": "_nav-menu-overlay_98txv_1 _overlay_dwzj9_1",
|
|
4190
|
+
"fade-out": "_fade-out_98txv_7 _overlayFadeOut_dwzj9_34",
|
|
4191
|
+
"nav-menu": "_nav-menu_98txv_1 _panel_dwzj9_43",
|
|
4184
4192
|
visible: wn,
|
|
4185
|
-
"slide-down": "_slide-
|
|
4186
|
-
"nav-header": "_nav-
|
|
4187
|
-
"close-
|
|
4188
|
-
"toc-container": "_toc-
|
|
4189
|
-
"toc-list": "_toc-
|
|
4190
|
-
"toc-item": "_toc-
|
|
4191
|
-
"toc-page-num": "_toc-page-
|
|
4192
|
-
"toc-sublist": "_toc-
|
|
4193
|
-
"page-jumper": "_page-
|
|
4194
|
-
"jumper-controls": "_jumper-
|
|
4195
|
-
"jumper-input": "_jumper-
|
|
4196
|
-
"total-pages": "_total-
|
|
4197
|
-
"go-btn": "_go-
|
|
4193
|
+
"slide-down": "_slide-down_98txv_36 _panelSlideDown_dwzj9_66",
|
|
4194
|
+
"nav-header": "_nav-header_98txv_43",
|
|
4195
|
+
"close-button": "_close-button_98txv_58",
|
|
4196
|
+
"toc-container": "_toc-container_98txv_86",
|
|
4197
|
+
"toc-list": "_toc-list_98txv_94",
|
|
4198
|
+
"toc-item": "_toc-item_98txv_100",
|
|
4199
|
+
"toc-page-num": "_toc-page-num_98txv_123",
|
|
4200
|
+
"toc-sublist": "_toc-sublist_98txv_130",
|
|
4201
|
+
"page-jumper": "_page-jumper_98txv_140",
|
|
4202
|
+
"jumper-controls": "_jumper-controls_98txv_149",
|
|
4203
|
+
"jumper-input": "_jumper-input_98txv_156",
|
|
4204
|
+
"total-pages": "_total-pages_98txv_179",
|
|
4205
|
+
"go-btn": "_go-btn_98txv_185"
|
|
4198
4206
|
}, kn = (E) => {
|
|
4199
4207
|
const t = Bt.c(57), {
|
|
4200
4208
|
toc: s,
|
|
@@ -4207,13 +4215,13 @@ const wn = "_visible_1w75l_36 _panelVisible_dwzj9_60", zt = {
|
|
|
4207
4215
|
isVisible: c,
|
|
4208
4216
|
isClosing: b,
|
|
4209
4217
|
closeMenu: y
|
|
4210
|
-
} = se(a), [
|
|
4218
|
+
} = se(a), [_, v] = Nt(C + 1);
|
|
4211
4219
|
let i;
|
|
4212
4220
|
t[0] === Symbol.for("react.memo_cache_sentinel") ? (i = {}, t[0] = i) : i = t[0];
|
|
4213
4221
|
const [p, o] = Nt(i);
|
|
4214
4222
|
let d, u;
|
|
4215
4223
|
t[1] !== s ? (d = () => {
|
|
4216
|
-
const Y = {},
|
|
4224
|
+
const Y = {}, q = (mt) => {
|
|
4217
4225
|
mt.forEach((at) => {
|
|
4218
4226
|
try {
|
|
4219
4227
|
const ct = at.href.replace("#", ""), pt = document.getElementById(ct);
|
|
@@ -4223,22 +4231,22 @@ const wn = "_visible_1w75l_36 _panelVisible_dwzj9_60", zt = {
|
|
|
4223
4231
|
}
|
|
4224
4232
|
} catch {
|
|
4225
4233
|
}
|
|
4226
|
-
at.subitems &&
|
|
4234
|
+
at.subitems && q(at.subitems);
|
|
4227
4235
|
});
|
|
4228
4236
|
}, ht = setTimeout(() => {
|
|
4229
|
-
|
|
4237
|
+
q(s), o(Y);
|
|
4230
4238
|
}, 100);
|
|
4231
4239
|
return () => clearTimeout(ht);
|
|
4232
|
-
}, u = [s], t[1] = s, t[2] = d, t[3] = u) : (d = t[2], u = t[3]),
|
|
4233
|
-
let
|
|
4234
|
-
t[4] !== C ? (
|
|
4240
|
+
}, u = [s], t[1] = s, t[2] = d, t[3] = u) : (d = t[2], u = t[3]), bt(d, u);
|
|
4241
|
+
let g, x;
|
|
4242
|
+
t[4] !== C ? (g = () => {
|
|
4235
4243
|
v(C + 1);
|
|
4236
|
-
}, x = [C], t[4] = C, t[5] =
|
|
4244
|
+
}, x = [C], t[4] = C, t[5] = g, t[6] = x) : (g = t[5], x = t[6]), bt(g, x);
|
|
4237
4245
|
let A;
|
|
4238
|
-
t[7] !==
|
|
4239
|
-
const Y = Math.max(1, Math.min(l,
|
|
4246
|
+
t[7] !== _ || t[8] !== h || t[9] !== l ? (A = () => {
|
|
4247
|
+
const Y = Math.max(1, Math.min(l, _));
|
|
4240
4248
|
h(Y - 1);
|
|
4241
|
-
}, t[7] =
|
|
4249
|
+
}, t[7] = _, t[8] = h, t[9] = l, t[10] = A) : A = t[10];
|
|
4242
4250
|
const k = A;
|
|
4243
4251
|
let O;
|
|
4244
4252
|
t[11] !== y || t[12] !== r ? (O = (Y) => {
|
|
@@ -4265,10 +4273,10 @@ const wn = "_visible_1w75l_36 _panelVisible_dwzj9_60", zt = {
|
|
|
4265
4273
|
${c ? zt.visible : ""}
|
|
4266
4274
|
${b ? zt["slide-down"] : ""}
|
|
4267
4275
|
`, I = Cn;
|
|
4268
|
-
let
|
|
4269
|
-
t[27] === Symbol.for("react.memo_cache_sentinel") ? (
|
|
4270
|
-
|
|
4271
|
-
/* @__PURE__ */ Q("button", { className: zt["close-
|
|
4276
|
+
let q;
|
|
4277
|
+
t[27] === Symbol.for("react.memo_cache_sentinel") ? (q = /* @__PURE__ */ Q("h2", { children: "Table of Contents" }), t[27] = q) : q = t[27], t[28] !== y ? (H = /* @__PURE__ */ vt("div", { className: zt["nav-header"], children: [
|
|
4278
|
+
q,
|
|
4279
|
+
/* @__PURE__ */ Q("button", { onClick: y, className: zt["close-button"], "aria-label": "Close menu", children: "✕" })
|
|
4272
4280
|
] }), t[28] = y, t[29] = H) : H = t[29], L = zt["toc-container"], n = s.length > 0 ? Y(s) : /* @__PURE__ */ Q("div", { style: {
|
|
4273
4281
|
padding: "20px",
|
|
4274
4282
|
textAlign: "center",
|
|
@@ -4283,7 +4291,7 @@ const wn = "_visible_1w75l_36 _panelVisible_dwzj9_60", zt = {
|
|
|
4283
4291
|
let M;
|
|
4284
4292
|
t[34] !== k ? (M = (Y) => Y.key === "Enter" && k(), t[34] = k, t[35] = M) : M = t[35];
|
|
4285
4293
|
let et;
|
|
4286
|
-
t[36] !==
|
|
4294
|
+
t[36] !== _ || t[37] !== M ? (et = /* @__PURE__ */ Q("input", { className: zt["jumper-input"], type: "number", value: _, onChange: V, onKeyDown: M, onClick: xn }), t[36] = _, t[37] = M, t[38] = et) : et = t[38];
|
|
4287
4295
|
let $;
|
|
4288
4296
|
t[39] !== l ? ($ = /* @__PURE__ */ vt("span", { className: zt["total-pages"], children: [
|
|
4289
4297
|
"of ",
|
|
@@ -4312,31 +4320,31 @@ function Cn(E) {
|
|
|
4312
4320
|
function xn(E) {
|
|
4313
4321
|
return E.currentTarget.select();
|
|
4314
4322
|
}
|
|
4315
|
-
const Sn = "
|
|
4316
|
-
"highlights-overlay": "_highlights-
|
|
4317
|
-
"fade-out": "_fade-
|
|
4318
|
-
"highlights-menu": "_highlights-
|
|
4323
|
+
const Sn = "_visible_14qks_27 _panelVisible_dwzj9_60", It = {
|
|
4324
|
+
"highlights-overlay": "_highlights-overlay_14qks_1 _overlay_dwzj9_1",
|
|
4325
|
+
"fade-out": "_fade-out_14qks_5 _overlayFadeOut_dwzj9_34",
|
|
4326
|
+
"highlights-menu": "_highlights-menu_14qks_9 _panel_dwzj9_43",
|
|
4319
4327
|
visible: Sn,
|
|
4320
|
-
"slide-down": "_slide-
|
|
4321
|
-
"highlights-header": "_highlights-
|
|
4322
|
-
"close-
|
|
4323
|
-
"highlights-container": "_highlights-
|
|
4324
|
-
"highlight-list": "_highlight-
|
|
4325
|
-
"highlight-item": "_highlight-
|
|
4326
|
-
"highlight-row": "_highlight-
|
|
4327
|
-
"highlight-label": "_highlight-
|
|
4328
|
-
"highlight-meta": "_highlight-
|
|
4329
|
-
"highlight-color": "_highlight-
|
|
4330
|
-
"highlight-color--yellow": "_highlight-color--
|
|
4331
|
-
"highlight-color--red": "_highlight-color--
|
|
4332
|
-
"highlight-color--blue": "_highlight-color--
|
|
4333
|
-
"highlight-color--purple": "_highlight-color--
|
|
4334
|
-
"highlight-page-num": "_highlight-page-
|
|
4335
|
-
"actions-toggle": "_actions-
|
|
4336
|
-
"highlight-actions": "_highlight-
|
|
4337
|
-
"highlight-swatch-row": "_highlight-swatch-
|
|
4338
|
-
"highlight-action-row": "_highlight-action-
|
|
4339
|
-
"empty-state": "_empty-
|
|
4328
|
+
"slide-down": "_slide-down_14qks_31 _panelSlideDown_dwzj9_66",
|
|
4329
|
+
"highlights-header": "_highlights-header_14qks_44",
|
|
4330
|
+
"close-button": "_close-button_14qks_59",
|
|
4331
|
+
"highlights-container": "_highlights-container_14qks_86",
|
|
4332
|
+
"highlight-list": "_highlight-list_14qks_94",
|
|
4333
|
+
"highlight-item": "_highlight-item_14qks_100",
|
|
4334
|
+
"highlight-row": "_highlight-row_14qks_104",
|
|
4335
|
+
"highlight-label": "_highlight-label_14qks_129",
|
|
4336
|
+
"highlight-meta": "_highlight-meta_14qks_134",
|
|
4337
|
+
"highlight-color": "_highlight-color_14qks_141",
|
|
4338
|
+
"highlight-color--yellow": "_highlight-color--yellow_14qks_148",
|
|
4339
|
+
"highlight-color--red": "_highlight-color--red_14qks_152",
|
|
4340
|
+
"highlight-color--blue": "_highlight-color--blue_14qks_156",
|
|
4341
|
+
"highlight-color--purple": "_highlight-color--purple_14qks_160",
|
|
4342
|
+
"highlight-page-num": "_highlight-page-num_14qks_164",
|
|
4343
|
+
"actions-toggle": "_actions-toggle_14qks_171",
|
|
4344
|
+
"highlight-actions": "_highlight-actions_14qks_185",
|
|
4345
|
+
"highlight-swatch-row": "_highlight-swatch-row_14qks_198",
|
|
4346
|
+
"highlight-action-row": "_highlight-action-row_14qks_203",
|
|
4347
|
+
"empty-state": "_empty-state_14qks_208"
|
|
4340
4348
|
}, En = ["yellow", "red", "blue", "purple"], An = ({
|
|
4341
4349
|
highlights: E,
|
|
4342
4350
|
onClose: t,
|
|
@@ -4348,8 +4356,8 @@ const Sn = "_visible_12xl7_30 _panelVisible_dwzj9_60", It = {
|
|
|
4348
4356
|
isVisible: a,
|
|
4349
4357
|
isClosing: h,
|
|
4350
4358
|
closeMenu: r
|
|
4351
|
-
} = se(t), [c, b] = Nt(null), [y,
|
|
4352
|
-
|
|
4359
|
+
} = se(t), [c, b] = Nt(null), [y, _] = Nt({}), [v, i] = Nt(!1), p = yt(null);
|
|
4360
|
+
bt(() => {
|
|
4353
4361
|
const k = {}, O = setTimeout(() => {
|
|
4354
4362
|
E.forEach((P) => {
|
|
4355
4363
|
try {
|
|
@@ -4357,10 +4365,10 @@ const Sn = "_visible_12xl7_30 _panelVisible_dwzj9_60", It = {
|
|
|
4357
4365
|
I instanceof HTMLElement && (k[P.id] = Wt(I) + 1);
|
|
4358
4366
|
} catch {
|
|
4359
4367
|
}
|
|
4360
|
-
}),
|
|
4368
|
+
}), _(k);
|
|
4361
4369
|
}, 100);
|
|
4362
4370
|
return () => clearTimeout(O);
|
|
4363
|
-
}, [E]),
|
|
4371
|
+
}, [E]), bt(() => () => {
|
|
4364
4372
|
p.current && clearTimeout(p.current);
|
|
4365
4373
|
}, []);
|
|
4366
4374
|
const o = At((k) => {
|
|
@@ -4380,7 +4388,7 @@ const Sn = "_visible_12xl7_30 _panelVisible_dwzj9_60", It = {
|
|
|
4380
4388
|
return k.text;
|
|
4381
4389
|
const O = document.querySelector(`span[data-highlight-id="${k.id}"]`);
|
|
4382
4390
|
return O && O.textContent ? O.textContent : "Highlighted text";
|
|
4383
|
-
},
|
|
4391
|
+
}, g = async (k) => {
|
|
4384
4392
|
var P;
|
|
4385
4393
|
if (!k)
|
|
4386
4394
|
return;
|
|
@@ -4421,7 +4429,7 @@ const Sn = "_visible_12xl7_30 _panelVisible_dwzj9_60", It = {
|
|
|
4421
4429
|
}, "aria-label": `Change highlight to ${I}` }, I)) }),
|
|
4422
4430
|
/* @__PURE__ */ vt("div", { className: It["highlight-action-row"], children: [
|
|
4423
4431
|
/* @__PURE__ */ Q("button", { type: "button", className: "highlight-action-button", onClick: async () => {
|
|
4424
|
-
await
|
|
4432
|
+
await g(P), x();
|
|
4425
4433
|
}, children: "Copy" }),
|
|
4426
4434
|
/* @__PURE__ */ Q("button", { type: "button", className: "highlight-action-button highlight-action-button--danger", onClick: () => C(k.id), children: "Remove" })
|
|
4427
4435
|
] })
|
|
@@ -4436,7 +4444,7 @@ const Sn = "_visible_12xl7_30 _panelVisible_dwzj9_60", It = {
|
|
|
4436
4444
|
`, onClick: (k) => k.stopPropagation(), children: [
|
|
4437
4445
|
/* @__PURE__ */ vt("div", { className: It["highlights-header"], children: [
|
|
4438
4446
|
/* @__PURE__ */ Q("h2", { children: "Highlights" }),
|
|
4439
|
-
/* @__PURE__ */ Q("button", { className: It["close-
|
|
4447
|
+
/* @__PURE__ */ Q("button", { onClick: r, className: It["close-button"], "aria-label": "Close menu", children: "✕" })
|
|
4440
4448
|
] }),
|
|
4441
4449
|
/* @__PURE__ */ Q("div", { className: It["highlights-container"], children: E.length > 0 ? A() : /* @__PURE__ */ Q("div", { className: It["empty-state"], children: "No highlights yet" }) })
|
|
4442
4450
|
] }),
|
|
@@ -4478,14 +4486,14 @@ const Sn = "_visible_12xl7_30 _panelVisible_dwzj9_60", It = {
|
|
|
4478
4486
|
] }), t[3] = b) : b = t[3];
|
|
4479
4487
|
let y;
|
|
4480
4488
|
t[4] === Symbol.for("react.memo_cache_sentinel") ? (y = /* @__PURE__ */ Q("div", { className: Rt.bottomIconWrapper, children: /* @__PURE__ */ Q(Fe, { size: 24 }) }), t[4] = y) : y = t[4];
|
|
4481
|
-
let
|
|
4482
|
-
t[5] === Symbol.for("react.memo_cache_sentinel") ? (
|
|
4489
|
+
let _;
|
|
4490
|
+
t[5] === Symbol.for("react.memo_cache_sentinel") ? (_ = /* @__PURE__ */ Q("div", { className: Rt.label, style: {
|
|
4483
4491
|
fontSize: "0.9rem"
|
|
4484
|
-
}, children: "Navigation" }), t[5] =
|
|
4492
|
+
}, children: "Navigation" }), t[5] = _) : _ = t[5];
|
|
4485
4493
|
let v;
|
|
4486
4494
|
t[6] === Symbol.for("react.memo_cache_sentinel") ? (v = /* @__PURE__ */ vt("div", { className: Rt.bottomIconGroup, children: [
|
|
4487
4495
|
y,
|
|
4488
|
-
|
|
4496
|
+
_,
|
|
4489
4497
|
/* @__PURE__ */ Q("div", { className: Rt.bounceArrow, children: /* @__PURE__ */ Q("svg", { width: "24", height: "24", viewBox: "0 0 24 24", children: /* @__PURE__ */ Q("path", { d: "M7.41 8.59L12 13.17l4.59-4.58L18 10l-6 6-6-6 1.41-1.41z" }) }) })
|
|
4490
4498
|
] }), t[6] = v) : v = t[6];
|
|
4491
4499
|
let i;
|
|
@@ -4507,8 +4515,8 @@ const Sn = "_visible_12xl7_30 _panelVisible_dwzj9_60", It = {
|
|
|
4507
4515
|
t[10] !== h ? (d = /* @__PURE__ */ vt("div", { className: Rt.centerZone, children: [
|
|
4508
4516
|
v,
|
|
4509
4517
|
o,
|
|
4510
|
-
/* @__PURE__ */ Q("button", { className: Rt.dismissButton, onClick: (
|
|
4511
|
-
|
|
4518
|
+
/* @__PURE__ */ Q("button", { className: Rt.dismissButton, onClick: (g) => {
|
|
4519
|
+
g.stopPropagation(), h();
|
|
4512
4520
|
}, children: "Start Reading" })
|
|
4513
4521
|
] }), t[10] = h, t[11] = d) : d = t[11];
|
|
4514
4522
|
let u;
|
|
@@ -4554,7 +4562,7 @@ function Hn(E) {
|
|
|
4554
4562
|
t ^= E.charCodeAt(s), t = Math.imul(t, 16777619);
|
|
4555
4563
|
return t >>> 0;
|
|
4556
4564
|
}
|
|
4557
|
-
function
|
|
4565
|
+
function qn(E) {
|
|
4558
4566
|
if (!E)
|
|
4559
4567
|
return "none";
|
|
4560
4568
|
let t = 0, s = 0, C = 0;
|
|
@@ -4564,8 +4572,8 @@ function Zn(E) {
|
|
|
4564
4572
|
}
|
|
4565
4573
|
return `${E.length}:${t.toString(16)}:${s.toString(16)}:${C.toString(16)}`;
|
|
4566
4574
|
}
|
|
4567
|
-
function
|
|
4568
|
-
const t = E.revision !== void 0 ? String(E.revision) : "none", s = typeof E.progress == "number" ? Ft(E.progress).toFixed(6) : "none", C =
|
|
4575
|
+
function Zn(E) {
|
|
4576
|
+
const t = E.revision !== void 0 ? String(E.revision) : "none", s = typeof E.progress == "number" ? Ft(E.progress).toFixed(6) : "none", C = qn(E.highlights), l = E.forceApply ? "1" : "0";
|
|
4569
4577
|
return `${E.bookId}|${t}|${s}|${C}|${l}`;
|
|
4570
4578
|
}
|
|
4571
4579
|
function Gn(E, t) {
|
|
@@ -4618,7 +4626,7 @@ const Qn = Xt(({
|
|
|
4618
4626
|
style: c,
|
|
4619
4627
|
supportedFonts: b = [],
|
|
4620
4628
|
themes: y = Xn
|
|
4621
|
-
},
|
|
4629
|
+
}, _) => {
|
|
4622
4630
|
const {
|
|
4623
4631
|
title: v,
|
|
4624
4632
|
bookId: i,
|
|
@@ -4626,18 +4634,18 @@ const Qn = Xt(({
|
|
|
4626
4634
|
toc: o,
|
|
4627
4635
|
isLoading: d,
|
|
4628
4636
|
error: u,
|
|
4629
|
-
loadEpub:
|
|
4637
|
+
loadEpub: g,
|
|
4630
4638
|
setIsLoading: x
|
|
4631
|
-
} =
|
|
4639
|
+
} = Ze(), A = ce(() => ({
|
|
4632
4640
|
...Jn,
|
|
4633
4641
|
...y
|
|
4634
|
-
}), [y]), [k, O] = Nt("none"), [P, F] = $t("bok_global_side_padding", 20), [I, H] = $t("bok_global_fontsize", 1.4), [tt, w] = $t("bok_global_font_family", "Literata"), [L, n] = $t("bok_global_theme", "Amoled Dark"), [T, V] = Nt([]), M =
|
|
4635
|
-
|
|
4642
|
+
}), [y]), [k, O] = Nt("none"), [P, F] = $t("bok_global_side_padding", 20), [I, H] = $t("bok_global_fontsize", 1.4), [tt, w] = $t("bok_global_font_family", "Literata"), [L, n] = $t("bok_global_theme", "Amoled Dark"), [T, V] = Nt([]), M = yt([]), et = yt(0), $ = yt(null), K = yt(null), [z, N] = Nt(0), [it, Y] = Nt(0), [q, ht] = $t("bok_tutorial_shown", !1), [mt, at] = Nt(!q), ct = yt(0), pt = yt(null), dt = yt(!1), St = yt(/* @__PURE__ */ new Map()), kt = yt(null), e = yt(/* @__PURE__ */ new Set()), j = yt(""), U = A[L] ? L : "Amoled Dark", m = i ? `bok_highlights_${i}` : "", f = v && v !== "Loading..." ? `bok_highlights_${v}` : "";
|
|
4643
|
+
bt(() => {
|
|
4636
4644
|
M.current = T;
|
|
4637
4645
|
}, [T]);
|
|
4638
4646
|
const S = At((st) => {
|
|
4639
4647
|
Kn(St.current, st), l && l(st);
|
|
4640
|
-
}, [l]),
|
|
4648
|
+
}, [l]), Z = At(() => i ? {
|
|
4641
4649
|
bookId: i,
|
|
4642
4650
|
progress: Ft(et.current),
|
|
4643
4651
|
highlights: Dt(M.current)
|
|
@@ -4670,10 +4678,10 @@ const Qn = Xt(({
|
|
|
4670
4678
|
}, [i, G]), J = At((st) => {
|
|
4671
4679
|
if (!i || st.bookId !== i || d)
|
|
4672
4680
|
return;
|
|
4673
|
-
const R =
|
|
4681
|
+
const R = Zn(st);
|
|
4674
4682
|
if (e.current.has(R))
|
|
4675
4683
|
return;
|
|
4676
|
-
const D =
|
|
4684
|
+
const D = Z();
|
|
4677
4685
|
if (!D)
|
|
4678
4686
|
return;
|
|
4679
4687
|
const W = typeof st.progress == "number" ? Ft(st.progress) : D.progress, nt = Array.isArray(st.highlights) ? Dt(st.highlights) : Dt(D.highlights), rt = [];
|
|
@@ -4695,9 +4703,9 @@ const Qn = Xt(({
|
|
|
4695
4703
|
return;
|
|
4696
4704
|
}
|
|
4697
4705
|
B(st) !== "rejected" && (e.current.add(R), j.current = "");
|
|
4698
|
-
}, [B, i,
|
|
4699
|
-
ke(
|
|
4700
|
-
getSyncSnapshot:
|
|
4706
|
+
}, [B, i, Z, d, h]);
|
|
4707
|
+
ke(_, () => ({
|
|
4708
|
+
getSyncSnapshot: Z,
|
|
4701
4709
|
applySyncState: (st, R) => {
|
|
4702
4710
|
const D = R == null ? void 0 : R.forceApply, W = D === void 0 ? st : {
|
|
4703
4711
|
...st,
|
|
@@ -4709,7 +4717,7 @@ const Qn = Xt(({
|
|
|
4709
4717
|
acknowledgeSyncEvents: (st) => {
|
|
4710
4718
|
Vn(St.current, st);
|
|
4711
4719
|
}
|
|
4712
|
-
}), [B,
|
|
4720
|
+
}), [B, Z]), bt(() => {
|
|
4713
4721
|
if (m)
|
|
4714
4722
|
try {
|
|
4715
4723
|
const st = localStorage.getItem(m);
|
|
@@ -4736,21 +4744,21 @@ const Qn = Xt(({
|
|
|
4736
4744
|
} catch (st) {
|
|
4737
4745
|
console.warn(`Error reading highlights for "${m}":`, st), M.current = [], V([]);
|
|
4738
4746
|
}
|
|
4739
|
-
}, [m, f]),
|
|
4747
|
+
}, [m, f]), bt(() => {
|
|
4740
4748
|
if (m)
|
|
4741
4749
|
try {
|
|
4742
4750
|
localStorage.setItem(m, JSON.stringify(T));
|
|
4743
4751
|
} catch (st) {
|
|
4744
4752
|
console.warn(`Error saving highlights for "${m}":`, st);
|
|
4745
4753
|
}
|
|
4746
|
-
}, [T, m]),
|
|
4754
|
+
}, [T, m]), bt(() => {
|
|
4747
4755
|
a && J(a);
|
|
4748
|
-
}, [J, a]),
|
|
4756
|
+
}, [J, a]), bt(() => {
|
|
4749
4757
|
if (d || !K.current || !kt.current)
|
|
4750
4758
|
return;
|
|
4751
4759
|
const st = kt.current;
|
|
4752
4760
|
kt.current = null, B(st);
|
|
4753
|
-
}, [B, d, p]),
|
|
4761
|
+
}, [B, d, p]), bt(() => {
|
|
4754
4762
|
St.current.clear(), e.current.clear(), j.current = "", kt.current = null, pt.current = null, dt.current = !1, et.current = 0;
|
|
4755
4763
|
}, [i]);
|
|
4756
4764
|
const ot = At((st) => {
|
|
@@ -4797,9 +4805,9 @@ const Qn = Xt(({
|
|
|
4797
4805
|
progress: R
|
|
4798
4806
|
}));
|
|
4799
4807
|
}, [i, S, d]);
|
|
4800
|
-
|
|
4801
|
-
|
|
4802
|
-
}, [
|
|
4808
|
+
bt(() => {
|
|
4809
|
+
q && at(!1);
|
|
4810
|
+
}, [q]), bt(() => {
|
|
4803
4811
|
const st = setTimeout(() => {
|
|
4804
4812
|
if ($.current) {
|
|
4805
4813
|
const D = getComputedStyle($.current).getPropertyValue("--bg-color").trim();
|
|
@@ -4812,13 +4820,13 @@ const Qn = Xt(({
|
|
|
4812
4820
|
const gt = () => {
|
|
4813
4821
|
at(!1), ht(!0);
|
|
4814
4822
|
};
|
|
4815
|
-
|
|
4816
|
-
E &&
|
|
4817
|
-
}, [E,
|
|
4823
|
+
bt(() => {
|
|
4824
|
+
E && g(E);
|
|
4825
|
+
}, [E, g]), bt(() => {
|
|
4818
4826
|
t && t(v);
|
|
4819
|
-
}, [v, t]),
|
|
4827
|
+
}, [v, t]), bt(() => {
|
|
4820
4828
|
s && s(d);
|
|
4821
|
-
}, [d, s]),
|
|
4829
|
+
}, [d, s]), bt(() => {
|
|
4822
4830
|
u && C && C(u);
|
|
4823
4831
|
}, [u, C]);
|
|
4824
4832
|
const Ct = ce(() => ({
|