@fileverse-dev/dsheet 2.0.27 → 2.0.28-comment-ux-1

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