{"version":3,"file":"chunk-jjbpbv84.js","sources":["node_modules/fflate/esm/browser.js","node_modules/jspdf/dist/jspdf.es.min.js","packages/sports/web/app/src/print/print-error-dialog.service.ts","packages/sports/web/app/src/print/print-loading-indicator.component.ts","packages/sports/web/app/src/print/print-loading-indicator.html","packages/sports/web/app/src/print/print-loading-indicator-dialog.service.ts","packages/sports/web/app/src/print/print.models.ts","packages/sports/web/app/src/print/print.service.ts","packages/sports/libs/user/feature/src/model/user.models.ts","packages/sports/libs/user/feature/src/model/early-payout.ts","packages/sports/libs/user/feature/src/helpers/early-payout-acceptance.ts","packages/sports/libs/user/feature/src/helpers/is-turnovertax-applied.ts","packages/sports/libs/common/core/utils/dom/src/lib/trust.pipe.ts","packages/sports/libs/user/feature/src/services/sync-user-settings.service.ts","packages/sports/web/app/src/common/re-bet-my-bets-tabs.models.ts","packages/sports/web/app/src/help-box/help-box-type.ts","packages/sports/web/app/src/help-box/help-box.service.ts","packages/sports/web/app/src/help-box/help-box-badge.component.ts","packages/sports/web/app/src/best-odds-guarantee/services/best-odds-guaranteed.service.ts","packages/sports/web/app/src/best-odds-guarantee/race-view-best-odds-badge.html","packages/sports/web/app/src/best-odds-guarantee/race-view-best-odds-badge.component.ts","packages/sports/web/app/src/help-box/help-box.component.html","packages/sports/web/app/src/help-box/help-box.component.ts","packages/sports/web/app/src/numpad/stake-input-mode.strategy.ts","packages/sports/libs/user/feature/src/services/betting-settings.service.ts","packages/sports/web/app/src/common/charset-size.service.ts","packages/sports/web/app/src/ui-manager/ui-manager.actions.ts","packages/sports/web/app/src/ui-manager/ui-states.enum.ts","packages/sports/libs/common/core/feature/smooth-scroll/src/lib/smoothScroll.service.ts","packages/sports/libs/user/feature/src/services/user-settings.service.ts","packages/sports/web/app/src/common/dynamic-font-resizer.component.ts","packages/sports/web/app/src/numpad/incremental-stakes.service.ts","packages/sports/web/app/src/numpad/numpad-validation-parameters.ts","packages/sports/web/app/src/numpad/numpad-utils.service.ts","packages/sports/web/app/src/numpad/model.ts","packages/sports/web/app/src/numpad/numpad-display.service.ts","packages/sports/web/app/src/numpad/numpad-tracking.service.ts","packages/sports/web/app/src/numpad/stake-update.service.ts","packages/sports/web/app/src/numpad/numpad.service.ts","packages/sports/web/app/src/numpad/incremental-stakes.html","packages/sports/web/app/src/numpad/incremental-stakes.component.ts","packages/sports/web/app/src/numpad/numpad-error.html","packages/sports/web/app/src/numpad/numpad-error.component.ts","packages/sports/web/app/src/numpad/numpad-scroll.service.ts","packages/sports/web/app/src/numpad/numpad.html","packages/sports/web/app/src/numpad/numpad.component.ts","packages/sports/web/app/src/numpad/numpad-host.html","packages/sports/web/app/src/numpad/numpad-host.component.ts","packages/sports/web/app/src/numpad/numpad-keys.html","packages/sports/web/app/src/numpad/numpad-keys.component.ts","packages/sports/web/app/src/numpad/numpad-scroll.directive.ts","packages/sports/web/app/src/numpad/store/actions.ts","packages/sports/web/app/src/numpad/numpad-input-connector.ts","packages/sports/web/app/src/numpad/stake-field.html","packages/sports/web/app/src/numpad/stake-field.component.ts","packages/sports/web/app/src/numpad/stake-font-resizer.directive.ts","packages/sports/web/app/src/numpad/stake-input.html","packages/sports/web/app/src/numpad/stake-input.component.ts","packages/sports/web/app/src/numpad/stake-wrapper.component.ts","packages/sports/web/app/src/numpad/stake.html","packages/sports/web/app/src/numpad/stake.component.ts","packages/sports/web/app/src/numpad/validate-stake-input.directive.ts","packages/sports/web/app/src/numpad/numpad.module.ts","packages/sports/web/app/src/my-bets-base/models/early-payout-types.ts","packages/sports/libs/common/core/utils/math/src/lib/math.utils.ts","node_modules/@ngrx/effects/fesm2022/ngrx-effects.mjs","packages/sports/libs/common/core/utils/rxjs/src/lib/ignore-elements-typed.ts","node_modules/@ngrx/operators/fesm2022/ngrx-operators.mjs","packages/sports/libs/user/feature/src/services/user-odds-format-settings.service.ts","packages/sports/libs/odds/feature/native-price-calculator/src/native-price-calculator.service.ts","packages/sports/libs/odds/feature/native-price-odds-format-converter/src/odds-format-converter.service.ts","packages/sports/web/app/src/event-bridge/event-bridge.service.ts","packages/sports/libs/common/core/utils/string-interpolation/src/string-interpolation.pipe.ts","packages/sports/web/app/src/navigation-core/remove-href.directive.ts","packages/sports/web/app/src/navigation-core/navigation-core.module.ts","node_modules/immer/dist/immer.esm.mjs","node_modules/@angular/cdk/fesm2022/clipboard.mjs","packages/vanilla/lib/shared/clipboard/src/clipboard.service.ts","packages/vanilla/lib/shared/share/src/share.service.ts","packages/vanilla/lib/features/balance-properties/src/balance-properties.client-config.ts","packages/vanilla/lib/features/balance-properties/src/balance-properties.service.ts","packages/vanilla/lib/features/balance-properties/src/balance-properties-bootstrap.service.ts","packages/vanilla/lib/features/balance-properties/src/balance-properties-dsl-values-provider.ts","packages/vanilla/lib/features/balance-properties/src/balance-properties.feature.ts","packages/vanilla/lib/features/balance-properties/src/balance-properties.models.ts","packages/vanilla/lib/features/bonus-balance/src/bonus-balance.service.ts","packages/vanilla/lib/features/bonus-balance/src/bonus-balance-bootstrap.service.ts","packages/vanilla/lib/features/bonus-balance/src/bonus-balance-dsl-values-provider.ts","packages/vanilla/lib/features/bonus-balance/src/bonus-balance.feature.ts","packages/vanilla/lib/shared/kyc/src/kyc-status.service.ts","node_modules/lodash/lodash.js","packages/sports/web/app/src/arc/arc-message-frequency.service.ts","packages/sports/web/app/src/arc/arc-restriction-tracking.service.ts","packages/sports/libs/user/feature/src/store/actions.ts","packages/sports/web/app/src/arc/arc-message.component.html","packages/sports/web/app/src/arc/arc-message.component.ts","packages/sports/web/app/src/arc/arc.module.ts","packages/sports/web/app/src/share-my-bet/share-my-bet.actions.ts","packages/sports/web/app/src/share-my-bet/share-my-bet.models.ts","packages/sports/web/app/src/navigation-core/pick-uri.model.ts","packages/sports/web/app/src/navigation-core/pick-uri.service.ts","packages/sports/web/app/src/share-my-bet/share-my-bet.service.ts","packages/sports/web/app/src/share-my-bet/share-my-bet.state.ts","packages/sports/web/app/src/share-my-bet/share-my-bet-copy.html","packages/sports/web/app/src/share-my-bet/share-my-bet-copy.component.ts","packages/sports/web/app/src/share-my-bet/share-my-bet-native-message.service.ts","packages/sports/web/app/src/share-my-bet/share-my-bet-onboarding.component.ts","packages/sports/web/app/src/share-my-bet/share-my-bet-onboarding.html","packages/sports/web/app/src/share-my-bet/share-my-bet-state-storage.ts","packages/sports/web/app/src/share-my-bet/share-my-bet.html","packages/sports/web/app/src/share-my-bet/share-my-bet.component.ts","packages/sports/web/app/src/share-my-bet-api/actions.ts","packages/sports/web/app/src/share-my-bet/share-my-bet.epic.ts","packages/sports/web/app/src/share-my-bet/share-my-bet.reducer.ts","packages/sports/web/app/src/share-my-bet/share-my-bet.module.ts","packages/sports/web/app/src/acca-boost-base/acca-boost-ratio.pipe.ts","packages/sports/web/app/src/tokens-base/tokens-calculator.service.ts","packages/sports/web/app/src/tokens-base/tokens-summary.service.ts","packages/sports/libs/new-customer-offer-feature/src/lib/customer-offer.service.ts","packages/sports/libs/account-balance/feature/src/account-balance-logger.service.ts","packages/sports/libs/account-balance/feature/src/account-balance.models.ts","packages/sports/libs/account-balance/feature/src/wallet-store.service.ts","packages/sports/libs/account-balance/feature/src/account-balance.service.ts","packages/sports/common/betslip/model/bet-context.ts","packages/sports/web/app/src/my-bets-base/early-payout/early-payout-tac.service.ts","packages/sports/web/app/src/my-bets/models/early-payout.model.ts","packages/sports/web/app/src/my-bets-base/models/my-bets-response.ts","packages/sports/web/app/src/my-bets-base/models/my-bets-viewmodels.ts","packages/sports/web/app/src/my-bets-base/models/early-payout.ts","packages/sports/web/app/src/my-bets-base/early-payout/my-bets-earlypayout-helpers.ts","packages/sports/web/app/src/my-bets-base/models/early-payout-subscription-source.ts","packages/sports/web/app/src/my-bets-base/early-payout/early-payout-submit.service.ts","packages/sports/web/app/src/my-bets-base/early-payout/early-payout-subscription-mapper.service.ts","packages/sports/web/app/src/my-bets-base/early-payout/early-payout-subscription.service.ts","packages/sports/web/app/src/my-bets-base/early-payout/eps-detailed-logger.service.ts","packages/sports/web/app/src/my-bets-base/early-payout/early-payout.service.ts","packages/sports/web/app/src/my-bets-base/early-payout/early-payout-injection-tokens.ts","packages/sports/web/app/src/my-bets-base/early-payout/early-payout-utils.ts","packages/sports/web/app/src/my-bets-base/models/bet-types.ts","packages/sports/web/app/src/my-bets-base/early-payout/my-bets-earlypayout-base.service.ts","packages/sports/web/app/src/my-bets-base/early-payout/my-bets-earlypayout.service.ts","packages/sports/web/app/src/my-bets-base/early-payout/my-bets-earlypayout.service.factory.ts"],"sourcesContent":["// DEFLATE is a complex format; to read this code, you should probably check the RFC first:\n// https://tools.ietf.org/html/rfc1951\n// You may also wish to take a look at the guide I made about this program:\n// https://gist.github.com/101arrowz/253f31eb5abc3d9275ab943003ffecad\n// Some of the following code is similar to that of UZIP.js:\n// https://github.com/photopea/UZIP.js\n// However, the vast majority of the codebase has diverged from UZIP.js to increase performance and reduce bundle size.\n// Sometimes 0 will appear where -1 would be more appropriate. This is because using a uint\n// is better for memory in most engines (I *think*).\nvar ch2 = {};\nvar wk = function (c, id, msg, transfer, cb) {\n var w = new Worker(ch2[id] || (ch2[id] = URL.createObjectURL(new Blob([c + ';addEventListener(\"error\",function(e){e=e.error;postMessage({$e$:[e.message,e.code,e.stack]})})'], {\n type: 'text/javascript'\n }))));\n w.onmessage = function (e) {\n var d = e.data,\n ed = d.$e$;\n if (ed) {\n var err = new Error(ed[0]);\n err['code'] = ed[1];\n err.stack = ed[2];\n cb(err, null);\n } else cb(null, d);\n };\n w.postMessage(msg, transfer);\n return w;\n};\n\n// aliases for shorter compressed code (most minifers don't do this)\nvar u8 = Uint8Array,\n u16 = Uint16Array,\n i32 = Int32Array;\n// fixed length extra bits\nvar fleb = new u8([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, /* unused */0, 0, /* impossible */0]);\n// fixed distance extra bits\nvar fdeb = new u8([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, /* unused */0, 0]);\n// code length index map\nvar clim = new u8([16, 17, 18, 0, 8, 7, 9, 6, 10, 5, 11, 4, 12, 3, 13, 2, 14, 1, 15]);\n// get base, reverse index map from extra bits\nvar freb = function (eb, start) {\n var b = new u16(31);\n for (var i = 0; i < 31; ++i) {\n b[i] = start += 1 << eb[i - 1];\n }\n // numbers here are at max 18 bits\n var r = new i32(b[30]);\n for (var i = 1; i < 30; ++i) {\n for (var j = b[i]; j < b[i + 1]; ++j) {\n r[j] = j - b[i] << 5 | i;\n }\n }\n return {\n b: b,\n r: r\n };\n};\nvar _a = freb(fleb, 2),\n fl = _a.b,\n revfl = _a.r;\n// we can ignore the fact that the other numbers are wrong; they never happen anyway\nfl[28] = 258, revfl[258] = 28;\nvar _b = freb(fdeb, 0),\n fd = _b.b,\n revfd = _b.r;\n// map of value to reverse (assuming 16 bits)\nvar rev = new u16(32768);\nfor (var i = 0; i < 32768; ++i) {\n // reverse table algorithm from SO\n var x = (i & 0xAAAA) >> 1 | (i & 0x5555) << 1;\n x = (x & 0xCCCC) >> 2 | (x & 0x3333) << 2;\n x = (x & 0xF0F0) >> 4 | (x & 0x0F0F) << 4;\n rev[i] = ((x & 0xFF00) >> 8 | (x & 0x00FF) << 8) >> 1;\n}\n// create huffman tree from u8 \"map\": index -> code length for code index\n// mb (max bits) must be at most 15\n// TODO: optimize/split up?\nvar hMap = function (cd, mb, r) {\n var s = cd.length;\n // index\n var i = 0;\n // u16 \"map\": index -> # of codes with bit length = index\n var l = new u16(mb);\n // length of cd must be 288 (total # of codes)\n for (; i < s; ++i) {\n if (cd[i]) ++l[cd[i] - 1];\n }\n // u16 \"map\": index -> minimum code for bit length = index\n var le = new u16(mb);\n for (i = 1; i < mb; ++i) {\n le[i] = le[i - 1] + l[i - 1] << 1;\n }\n var co;\n if (r) {\n // u16 \"map\": index -> number of actual bits, symbol for code\n co = new u16(1 << mb);\n // bits to remove for reverser\n var rvb = 15 - mb;\n for (i = 0; i < s; ++i) {\n // ignore 0 lengths\n if (cd[i]) {\n // num encoding both symbol and bits read\n var sv = i << 4 | cd[i];\n // free bits\n var r_1 = mb - cd[i];\n // start value\n var v = le[cd[i] - 1]++ << r_1;\n // m is end value\n for (var m = v | (1 << r_1) - 1; v <= m; ++v) {\n // every 16 bit value starting with the code yields the same result\n co[rev[v] >> rvb] = sv;\n }\n }\n }\n } else {\n co = new u16(s);\n for (i = 0; i < s; ++i) {\n if (cd[i]) {\n co[i] = rev[le[cd[i] - 1]++] >> 15 - cd[i];\n }\n }\n }\n return co;\n};\n// fixed length tree\nvar flt = new u8(288);\nfor (var i = 0; i < 144; ++i) flt[i] = 8;\nfor (var i = 144; i < 256; ++i) flt[i] = 9;\nfor (var i = 256; i < 280; ++i) flt[i] = 7;\nfor (var i = 280; i < 288; ++i) flt[i] = 8;\n// fixed distance tree\nvar fdt = new u8(32);\nfor (var i = 0; i < 32; ++i) fdt[i] = 5;\n// fixed length map\nvar flm = /*#__PURE__*/hMap(flt, 9, 0),\n flrm = /*#__PURE__*/hMap(flt, 9, 1);\n// fixed distance map\nvar fdm = /*#__PURE__*/hMap(fdt, 5, 0),\n fdrm = /*#__PURE__*/hMap(fdt, 5, 1);\n// find max of array\nvar max = function (a) {\n var m = a[0];\n for (var i = 1; i < a.length; ++i) {\n if (a[i] > m) m = a[i];\n }\n return m;\n};\n// read d, starting at bit p and mask with m\nvar bits = function (d, p, m) {\n var o = p / 8 | 0;\n return (d[o] | d[o + 1] << 8) >> (p & 7) & m;\n};\n// read d, starting at bit p continuing for at least 16 bits\nvar bits16 = function (d, p) {\n var o = p / 8 | 0;\n return (d[o] | d[o + 1] << 8 | d[o + 2] << 16) >> (p & 7);\n};\n// get end of byte\nvar shft = function (p) {\n return (p + 7) / 8 | 0;\n};\n// typed array slice - allows garbage collector to free original reference,\n// while being more compatible than .slice\nvar slc = function (v, s, e) {\n if (s == null || s < 0) s = 0;\n if (e == null || e > v.length) e = v.length;\n // can't use .constructor in case user-supplied\n return new u8(v.subarray(s, e));\n};\n/**\n * Codes for errors generated within this library\n */\nexport var FlateErrorCode = {\n UnexpectedEOF: 0,\n InvalidBlockType: 1,\n InvalidLengthLiteral: 2,\n InvalidDistance: 3,\n StreamFinished: 4,\n NoStreamHandler: 5,\n InvalidHeader: 6,\n NoCallback: 7,\n InvalidUTF8: 8,\n ExtraFieldTooLong: 9,\n InvalidDate: 10,\n FilenameTooLong: 11,\n StreamFinishing: 12,\n InvalidZipData: 13,\n UnknownCompressionMethod: 14\n};\n// error codes\nvar ec = ['unexpected EOF', 'invalid block type', 'invalid length/literal', 'invalid distance', 'stream finished', 'no stream handler',, 'no callback', 'invalid UTF-8 data', 'extra field too long', 'date not in range 1980-2099', 'filename too long', 'stream finishing', 'invalid zip data'\n// determined by unknown compression method\n];\n;\nvar err = function (ind, msg, nt) {\n var e = new Error(msg || ec[ind]);\n e.code = ind;\n if (Error.captureStackTrace) Error.captureStackTrace(e, err);\n if (!nt) throw e;\n return e;\n};\n// expands raw DEFLATE data\nvar inflt = function (dat, st, buf, dict) {\n // source length dict length\n var sl = dat.length,\n dl = dict ? dict.length : 0;\n if (!sl || st.f && !st.l) return buf || new u8(0);\n var noBuf = !buf;\n // have to estimate size\n var resize = noBuf || st.i != 2;\n // no state\n var noSt = st.i;\n // Assumes roughly 33% compression ratio average\n if (noBuf) buf = new u8(sl * 3);\n // ensure buffer can fit at least l elements\n var cbuf = function (l) {\n var bl = buf.length;\n // need to increase size to fit\n if (l > bl) {\n // Double or set to necessary, whichever is greater\n var nbuf = new u8(Math.max(bl * 2, l));\n nbuf.set(buf);\n buf = nbuf;\n }\n };\n // last chunk bitpos bytes\n var final = st.f || 0,\n pos = st.p || 0,\n bt = st.b || 0,\n lm = st.l,\n dm = st.d,\n lbt = st.m,\n dbt = st.n;\n // total bits\n var tbts = sl * 8;\n do {\n if (!lm) {\n // BFINAL - this is only 1 when last chunk is next\n final = bits(dat, pos, 1);\n // type: 0 = no compression, 1 = fixed huffman, 2 = dynamic huffman\n var type = bits(dat, pos + 1, 3);\n pos += 3;\n if (!type) {\n // go to end of byte boundary\n var s = shft(pos) + 4,\n l = dat[s - 4] | dat[s - 3] << 8,\n t = s + l;\n if (t > sl) {\n if (noSt) err(0);\n break;\n }\n // ensure size\n if (resize) cbuf(bt + l);\n // Copy over uncompressed data\n buf.set(dat.subarray(s, t), bt);\n // Get new bitpos, update byte count\n st.b = bt += l, st.p = pos = t * 8, st.f = final;\n continue;\n } else if (type == 1) lm = flrm, dm = fdrm, lbt = 9, dbt = 5;else if (type == 2) {\n // literal lengths\n var hLit = bits(dat, pos, 31) + 257,\n hcLen = bits(dat, pos + 10, 15) + 4;\n var tl = hLit + bits(dat, pos + 5, 31) + 1;\n pos += 14;\n // length+distance tree\n var ldt = new u8(tl);\n // code length tree\n var clt = new u8(19);\n for (var i = 0; i < hcLen; ++i) {\n // use index map to get real code\n clt[clim[i]] = bits(dat, pos + i * 3, 7);\n }\n pos += hcLen * 3;\n // code lengths bits\n var clb = max(clt),\n clbmsk = (1 << clb) - 1;\n // code lengths map\n var clm = hMap(clt, clb, 1);\n for (var i = 0; i < tl;) {\n var r = clm[bits(dat, pos, clbmsk)];\n // bits read\n pos += r & 15;\n // symbol\n var s = r >> 4;\n // code length to copy\n if (s < 16) {\n ldt[i++] = s;\n } else {\n // copy count\n var c = 0,\n n = 0;\n if (s == 16) n = 3 + bits(dat, pos, 3), pos += 2, c = ldt[i - 1];else if (s == 17) n = 3 + bits(dat, pos, 7), pos += 3;else if (s == 18) n = 11 + bits(dat, pos, 127), pos += 7;\n while (n--) ldt[i++] = c;\n }\n }\n // length tree distance tree\n var lt = ldt.subarray(0, hLit),\n dt = ldt.subarray(hLit);\n // max length bits\n lbt = max(lt);\n // max dist bits\n dbt = max(dt);\n lm = hMap(lt, lbt, 1);\n dm = hMap(dt, dbt, 1);\n } else err(1);\n if (pos > tbts) {\n if (noSt) err(0);\n break;\n }\n }\n // Make sure the buffer can hold this + the largest possible addition\n // Maximum chunk size (practically, theoretically infinite) is 2^17\n if (resize) cbuf(bt + 131072);\n var lms = (1 << lbt) - 1,\n dms = (1 << dbt) - 1;\n var lpos = pos;\n for (;; lpos = pos) {\n // bits read, code\n var c = lm[bits16(dat, pos) & lms],\n sym = c >> 4;\n pos += c & 15;\n if (pos > tbts) {\n if (noSt) err(0);\n break;\n }\n if (!c) err(2);\n if (sym < 256) buf[bt++] = sym;else if (sym == 256) {\n lpos = pos, lm = null;\n break;\n } else {\n var add = sym - 254;\n // no extra bits needed if less\n if (sym > 264) {\n // index\n var i = sym - 257,\n b = fleb[i];\n add = bits(dat, pos, (1 << b) - 1) + fl[i];\n pos += b;\n }\n // dist\n var d = dm[bits16(dat, pos) & dms],\n dsym = d >> 4;\n if (!d) err(3);\n pos += d & 15;\n var dt = fd[dsym];\n if (dsym > 3) {\n var b = fdeb[dsym];\n dt += bits16(dat, pos) & (1 << b) - 1, pos += b;\n }\n if (pos > tbts) {\n if (noSt) err(0);\n break;\n }\n if (resize) cbuf(bt + 131072);\n var end = bt + add;\n if (bt < dt) {\n var shift = dl - dt,\n dend = Math.min(dt, end);\n if (shift + bt < 0) err(3);\n for (; bt < dend; ++bt) buf[bt] = dict[shift + bt];\n }\n for (; bt < end; ++bt) buf[bt] = buf[bt - dt];\n }\n }\n st.l = lm, st.p = lpos, st.b = bt, st.f = final;\n if (lm) final = 1, st.m = lbt, st.d = dm, st.n = dbt;\n } while (!final);\n // don't reallocate for streams or user buffers\n return bt != buf.length && noBuf ? slc(buf, 0, bt) : buf.subarray(0, bt);\n};\n// starting at p, write the minimum number of bits that can hold v to d\nvar wbits = function (d, p, v) {\n v <<= p & 7;\n var o = p / 8 | 0;\n d[o] |= v;\n d[o + 1] |= v >> 8;\n};\n// starting at p, write the minimum number of bits (>8) that can hold v to d\nvar wbits16 = function (d, p, v) {\n v <<= p & 7;\n var o = p / 8 | 0;\n d[o] |= v;\n d[o + 1] |= v >> 8;\n d[o + 2] |= v >> 16;\n};\n// creates code lengths from a frequency table\nvar hTree = function (d, mb) {\n // Need extra info to make a tree\n var t = [];\n for (var i = 0; i < d.length; ++i) {\n if (d[i]) t.push({\n s: i,\n f: d[i]\n });\n }\n var s = t.length;\n var t2 = t.slice();\n if (!s) return {\n t: et,\n l: 0\n };\n if (s == 1) {\n var v = new u8(t[0].s + 1);\n v[t[0].s] = 1;\n return {\n t: v,\n l: 1\n };\n }\n t.sort(function (a, b) {\n return a.f - b.f;\n });\n // after i2 reaches last ind, will be stopped\n // freq must be greater than largest possible number of symbols\n t.push({\n s: -1,\n f: 25001\n });\n var l = t[0],\n r = t[1],\n i0 = 0,\n i1 = 1,\n i2 = 2;\n t[0] = {\n s: -1,\n f: l.f + r.f,\n l: l,\n r: r\n };\n // efficient algorithm from UZIP.js\n // i0 is lookbehind, i2 is lookahead - after processing two low-freq\n // symbols that combined have high freq, will start processing i2 (high-freq,\n // non-composite) symbols instead\n // see https://reddit.com/r/photopea/comments/ikekht/uzipjs_questions/\n while (i1 != s - 1) {\n l = t[t[i0].f < t[i2].f ? i0++ : i2++];\n r = t[i0 != i1 && t[i0].f < t[i2].f ? i0++ : i2++];\n t[i1++] = {\n s: -1,\n f: l.f + r.f,\n l: l,\n r: r\n };\n }\n var maxSym = t2[0].s;\n for (var i = 1; i < s; ++i) {\n if (t2[i].s > maxSym) maxSym = t2[i].s;\n }\n // code lengths\n var tr = new u16(maxSym + 1);\n // max bits in tree\n var mbt = ln(t[i1 - 1], tr, 0);\n if (mbt > mb) {\n // more algorithms from UZIP.js\n // TODO: find out how this code works (debt)\n // ind debt\n var i = 0,\n dt = 0;\n // left cost\n var lft = mbt - mb,\n cst = 1 << lft;\n t2.sort(function (a, b) {\n return tr[b.s] - tr[a.s] || a.f - b.f;\n });\n for (; i < s; ++i) {\n var i2_1 = t2[i].s;\n if (tr[i2_1] > mb) {\n dt += cst - (1 << mbt - tr[i2_1]);\n tr[i2_1] = mb;\n } else break;\n }\n dt >>= lft;\n while (dt > 0) {\n var i2_2 = t2[i].s;\n if (tr[i2_2] < mb) dt -= 1 << mb - tr[i2_2]++ - 1;else ++i;\n }\n for (; i >= 0 && dt; --i) {\n var i2_3 = t2[i].s;\n if (tr[i2_3] == mb) {\n --tr[i2_3];\n ++dt;\n }\n }\n mbt = mb;\n }\n return {\n t: new u8(tr),\n l: mbt\n };\n};\n// get the max length and assign length codes\nvar ln = function (n, l, d) {\n return n.s == -1 ? Math.max(ln(n.l, l, d + 1), ln(n.r, l, d + 1)) : l[n.s] = d;\n};\n// length codes generation\nvar lc = function (c) {\n var s = c.length;\n // Note that the semicolon was intentional\n while (s && !c[--s]);\n var cl = new u16(++s);\n // ind num streak\n var cli = 0,\n cln = c[0],\n cls = 1;\n var w = function (v) {\n cl[cli++] = v;\n };\n for (var i = 1; i <= s; ++i) {\n if (c[i] == cln && i != s) ++cls;else {\n if (!cln && cls > 2) {\n for (; cls > 138; cls -= 138) w(32754);\n if (cls > 2) {\n w(cls > 10 ? cls - 11 << 5 | 28690 : cls - 3 << 5 | 12305);\n cls = 0;\n }\n } else if (cls > 3) {\n w(cln), --cls;\n for (; cls > 6; cls -= 6) w(8304);\n if (cls > 2) w(cls - 3 << 5 | 8208), cls = 0;\n }\n while (cls--) w(cln);\n cls = 1;\n cln = c[i];\n }\n }\n return {\n c: cl.subarray(0, cli),\n n: s\n };\n};\n// calculate the length of output from tree, code lengths\nvar clen = function (cf, cl) {\n var l = 0;\n for (var i = 0; i < cl.length; ++i) l += cf[i] * cl[i];\n return l;\n};\n// writes a fixed block\n// returns the new bit pos\nvar wfblk = function (out, pos, dat) {\n // no need to write 00 as type: TypedArray defaults to 0\n var s = dat.length;\n var o = shft(pos + 2);\n out[o] = s & 255;\n out[o + 1] = s >> 8;\n out[o + 2] = out[o] ^ 255;\n out[o + 3] = out[o + 1] ^ 255;\n for (var i = 0; i < s; ++i) out[o + i + 4] = dat[i];\n return (o + 4 + s) * 8;\n};\n// writes a block\nvar wblk = function (dat, out, final, syms, lf, df, eb, li, bs, bl, p) {\n wbits(out, p++, final);\n ++lf[256];\n var _a = hTree(lf, 15),\n dlt = _a.t,\n mlb = _a.l;\n var _b = hTree(df, 15),\n ddt = _b.t,\n mdb = _b.l;\n var _c = lc(dlt),\n lclt = _c.c,\n nlc = _c.n;\n var _d = lc(ddt),\n lcdt = _d.c,\n ndc = _d.n;\n var lcfreq = new u16(19);\n for (var i = 0; i < lclt.length; ++i) ++lcfreq[lclt[i] & 31];\n for (var i = 0; i < lcdt.length; ++i) ++lcfreq[lcdt[i] & 31];\n var _e = hTree(lcfreq, 7),\n lct = _e.t,\n mlcb = _e.l;\n var nlcc = 19;\n for (; nlcc > 4 && !lct[clim[nlcc - 1]]; --nlcc);\n var flen = bl + 5 << 3;\n var ftlen = clen(lf, flt) + clen(df, fdt) + eb;\n var dtlen = clen(lf, dlt) + clen(df, ddt) + eb + 14 + 3 * nlcc + clen(lcfreq, lct) + 2 * lcfreq[16] + 3 * lcfreq[17] + 7 * lcfreq[18];\n if (bs >= 0 && flen <= ftlen && flen <= dtlen) return wfblk(out, p, dat.subarray(bs, bs + bl));\n var lm, ll, dm, dl;\n wbits(out, p, 1 + (dtlen < ftlen)), p += 2;\n if (dtlen < ftlen) {\n lm = hMap(dlt, mlb, 0), ll = dlt, dm = hMap(ddt, mdb, 0), dl = ddt;\n var llm = hMap(lct, mlcb, 0);\n wbits(out, p, nlc - 257);\n wbits(out, p + 5, ndc - 1);\n wbits(out, p + 10, nlcc - 4);\n p += 14;\n for (var i = 0; i < nlcc; ++i) wbits(out, p + 3 * i, lct[clim[i]]);\n p += 3 * nlcc;\n var lcts = [lclt, lcdt];\n for (var it = 0; it < 2; ++it) {\n var clct = lcts[it];\n for (var i = 0; i < clct.length; ++i) {\n var len = clct[i] & 31;\n wbits(out, p, llm[len]), p += lct[len];\n if (len > 15) wbits(out, p, clct[i] >> 5 & 127), p += clct[i] >> 12;\n }\n }\n } else {\n lm = flm, ll = flt, dm = fdm, dl = fdt;\n }\n for (var i = 0; i < li; ++i) {\n var sym = syms[i];\n if (sym > 255) {\n var len = sym >> 18 & 31;\n wbits16(out, p, lm[len + 257]), p += ll[len + 257];\n if (len > 7) wbits(out, p, sym >> 23 & 31), p += fleb[len];\n var dst = sym & 31;\n wbits16(out, p, dm[dst]), p += dl[dst];\n if (dst > 3) wbits16(out, p, sym >> 5 & 8191), p += fdeb[dst];\n } else {\n wbits16(out, p, lm[sym]), p += ll[sym];\n }\n }\n wbits16(out, p, lm[256]);\n return p + ll[256];\n};\n// deflate options (nice << 13) | chain\nvar deo = /*#__PURE__*/new i32([65540, 131080, 131088, 131104, 262176, 1048704, 1048832, 2114560, 2117632]);\n// empty\nvar et = /*#__PURE__*/new u8(0);\n// compresses data into a raw DEFLATE buffer\nvar dflt = function (dat, lvl, plvl, pre, post, st) {\n var s = st.z || dat.length;\n var o = new u8(pre + s + 5 * (1 + Math.ceil(s / 7000)) + post);\n // writing to this writes to the output buffer\n var w = o.subarray(pre, o.length - post);\n var lst = st.l;\n var pos = (st.r || 0) & 7;\n if (lvl) {\n if (pos) w[0] = st.r >> 3;\n var opt = deo[lvl - 1];\n var n = opt >> 13,\n c = opt & 8191;\n var msk_1 = (1 << plvl) - 1;\n // prev 2-byte val map curr 2-byte val map\n var prev = st.p || new u16(32768),\n head = st.h || new u16(msk_1 + 1);\n var bs1_1 = Math.ceil(plvl / 3),\n bs2_1 = 2 * bs1_1;\n var hsh = function (i) {\n return (dat[i] ^ dat[i + 1] << bs1_1 ^ dat[i + 2] << bs2_1) & msk_1;\n };\n // 24576 is an arbitrary number of maximum symbols per block\n // 424 buffer for last block\n var syms = new i32(25000);\n // length/literal freq distance freq\n var lf = new u16(288),\n df = new u16(32);\n // l/lcnt exbits index l/lind waitdx blkpos\n var lc_1 = 0,\n eb = 0,\n i = st.i || 0,\n li = 0,\n wi = st.w || 0,\n bs = 0;\n for (; i + 2 < s; ++i) {\n // hash value\n var hv = hsh(i);\n // index mod 32768 previous index mod\n var imod = i & 32767,\n pimod = head[hv];\n prev[imod] = pimod;\n head[hv] = imod;\n // We always should modify head and prev, but only add symbols if\n // this data is not yet processed (\"wait\" for wait index)\n if (wi <= i) {\n // bytes remaining\n var rem = s - i;\n if ((lc_1 > 7000 || li > 24576) && (rem > 423 || !lst)) {\n pos = wblk(dat, w, 0, syms, lf, df, eb, li, bs, i - bs, pos);\n li = lc_1 = eb = 0, bs = i;\n for (var j = 0; j < 286; ++j) lf[j] = 0;\n for (var j = 0; j < 30; ++j) df[j] = 0;\n }\n // len dist chain\n var l = 2,\n d = 0,\n ch_1 = c,\n dif = imod - pimod & 32767;\n if (rem > 2 && hv == hsh(i - dif)) {\n var maxn = Math.min(n, rem) - 1;\n var maxd = Math.min(32767, i);\n // max possible length\n // not capped at dif because decompressors implement \"rolling\" index population\n var ml = Math.min(258, rem);\n while (dif <= maxd && --ch_1 && imod != pimod) {\n if (dat[i + l] == dat[i + l - dif]) {\n var nl = 0;\n for (; nl < ml && dat[i + nl] == dat[i + nl - dif]; ++nl);\n if (nl > l) {\n l = nl, d = dif;\n // break out early when we reach \"nice\" (we are satisfied enough)\n if (nl > maxn) break;\n // now, find the rarest 2-byte sequence within this\n // length of literals and search for that instead.\n // Much faster than just using the start\n var mmd = Math.min(dif, nl - 2);\n var md = 0;\n for (var j = 0; j < mmd; ++j) {\n var ti = i - dif + j & 32767;\n var pti = prev[ti];\n var cd = ti - pti & 32767;\n if (cd > md) md = cd, pimod = ti;\n }\n }\n }\n // check the previous match\n imod = pimod, pimod = prev[imod];\n dif += imod - pimod & 32767;\n }\n }\n // d will be nonzero only when a match was found\n if (d) {\n // store both dist and len data in one int32\n // Make sure this is recognized as a len/dist with 28th bit (2^28)\n syms[li++] = 268435456 | revfl[l] << 18 | revfd[d];\n var lin = revfl[l] & 31,\n din = revfd[d] & 31;\n eb += fleb[lin] + fdeb[din];\n ++lf[257 + lin];\n ++df[din];\n wi = i + l;\n ++lc_1;\n } else {\n syms[li++] = dat[i];\n ++lf[dat[i]];\n }\n }\n }\n for (i = Math.max(i, wi); i < s; ++i) {\n syms[li++] = dat[i];\n ++lf[dat[i]];\n }\n pos = wblk(dat, w, lst, syms, lf, df, eb, li, bs, i - bs, pos);\n if (!lst) {\n st.r = pos & 7 | w[pos / 8 | 0] << 3;\n // shft(pos) now 1 less if pos & 7 != 0\n pos -= 7;\n st.h = head, st.p = prev, st.i = i, st.w = wi;\n }\n } else {\n for (var i = st.w || 0; i < s + lst; i += 65535) {\n // end\n var e = i + 65535;\n if (e >= s) {\n // write final block\n w[pos / 8 | 0] = lst;\n e = s;\n }\n pos = wfblk(w, pos + 1, dat.subarray(i, e));\n }\n st.i = s;\n }\n return slc(o, 0, pre + shft(pos) + post);\n};\n// CRC32 table\nvar crct = /*#__PURE__*/function () {\n var t = new Int32Array(256);\n for (var i = 0; i < 256; ++i) {\n var c = i,\n k = 9;\n while (--k) c = (c & 1 && -306674912) ^ c >>> 1;\n t[i] = c;\n }\n return t;\n}();\n// CRC32\nvar crc = function () {\n var c = -1;\n return {\n p: function (d) {\n // closures have awful performance\n var cr = c;\n for (var i = 0; i < d.length; ++i) cr = crct[cr & 255 ^ d[i]] ^ cr >>> 8;\n c = cr;\n },\n d: function () {\n return ~c;\n }\n };\n};\n// Adler32\nvar adler = function () {\n var a = 1,\n b = 0;\n return {\n p: function (d) {\n // closures have awful performance\n var n = a,\n m = b;\n var l = d.length | 0;\n for (var i = 0; i != l;) {\n var e = Math.min(i + 2655, l);\n for (; i < e; ++i) m += n += d[i];\n n = (n & 65535) + 15 * (n >> 16), m = (m & 65535) + 15 * (m >> 16);\n }\n a = n, b = m;\n },\n d: function () {\n a %= 65521, b %= 65521;\n return (a & 255) << 24 | (a & 0xFF00) << 8 | (b & 255) << 8 | b >> 8;\n }\n };\n};\n;\n// deflate with opts\nvar dopt = function (dat, opt, pre, post, st) {\n if (!st) {\n st = {\n l: 1\n };\n if (opt.dictionary) {\n var dict = opt.dictionary.subarray(-32768);\n var newDat = new u8(dict.length + dat.length);\n newDat.set(dict);\n newDat.set(dat, dict.length);\n dat = newDat;\n st.w = dict.length;\n }\n }\n return dflt(dat, opt.level == null ? 6 : opt.level, opt.mem == null ? st.l ? Math.ceil(Math.max(8, Math.min(13, Math.log(dat.length))) * 1.5) : 20 : 12 + opt.mem, pre, post, st);\n};\n// Walmart object spread\nvar mrg = function (a, b) {\n var o = {};\n for (var k in a) o[k] = a[k];\n for (var k in b) o[k] = b[k];\n return o;\n};\n// worker clone\n// This is possibly the craziest part of the entire codebase, despite how simple it may seem.\n// The only parameter to this function is a closure that returns an array of variables outside of the function scope.\n// We're going to try to figure out the variable names used in the closure as strings because that is crucial for workerization.\n// We will return an object mapping of true variable name to value (basically, the current scope as a JS object).\n// The reason we can't just use the original variable names is minifiers mangling the toplevel scope.\n// This took me three weeks to figure out how to do.\nvar wcln = function (fn, fnStr, td) {\n var dt = fn();\n var st = fn.toString();\n var ks = st.slice(st.indexOf('[') + 1, st.lastIndexOf(']')).replace(/\\s+/g, '').split(',');\n for (var i = 0; i < dt.length; ++i) {\n var v = dt[i],\n k = ks[i];\n if (typeof v == 'function') {\n fnStr += ';' + k + '=';\n var st_1 = v.toString();\n if (v.prototype) {\n // for global objects\n if (st_1.indexOf('[native code]') != -1) {\n var spInd = st_1.indexOf(' ', 8) + 1;\n fnStr += st_1.slice(spInd, st_1.indexOf('(', spInd));\n } else {\n fnStr += st_1;\n for (var t in v.prototype) fnStr += ';' + k + '.prototype.' + t + '=' + v.prototype[t].toString();\n }\n } else fnStr += st_1;\n } else td[k] = v;\n }\n return fnStr;\n};\nvar ch = [];\n// clone bufs\nvar cbfs = function (v) {\n var tl = [];\n for (var k in v) {\n if (v[k].buffer) {\n tl.push((v[k] = new v[k].constructor(v[k])).buffer);\n }\n }\n return tl;\n};\n// use a worker to execute code\nvar wrkr = function (fns, init, id, cb) {\n if (!ch[id]) {\n var fnStr = '',\n td_1 = {},\n m = fns.length - 1;\n for (var i = 0; i < m; ++i) fnStr = wcln(fns[i], fnStr, td_1);\n ch[id] = {\n c: wcln(fns[m], fnStr, td_1),\n e: td_1\n };\n }\n var td = mrg({}, ch[id].e);\n return wk(ch[id].c + ';onmessage=function(e){for(var k in e.data)self[k]=e.data[k];onmessage=' + init.toString() + '}', id, td, cbfs(td), cb);\n};\n// base async inflate fn\nvar bInflt = function () {\n return [u8, u16, i32, fleb, fdeb, clim, fl, fd, flrm, fdrm, rev, ec, hMap, max, bits, bits16, shft, slc, err, inflt, inflateSync, pbf, gopt];\n};\nvar bDflt = function () {\n return [u8, u16, i32, fleb, fdeb, clim, revfl, revfd, flm, flt, fdm, fdt, rev, deo, et, hMap, wbits, wbits16, hTree, ln, lc, clen, wfblk, wblk, shft, slc, dflt, dopt, deflateSync, pbf];\n};\n// gzip extra\nvar gze = function () {\n return [gzh, gzhl, wbytes, crc, crct];\n};\n// gunzip extra\nvar guze = function () {\n return [gzs, gzl];\n};\n// zlib extra\nvar zle = function () {\n return [zlh, wbytes, adler];\n};\n// unzlib extra\nvar zule = function () {\n return [zls];\n};\n// post buf\nvar pbf = function (msg) {\n return postMessage(msg, [msg.buffer]);\n};\n// get opts\nvar gopt = function (o) {\n return o && {\n out: o.size && new u8(o.size),\n dictionary: o.dictionary\n };\n};\n// async helper\nvar cbify = function (dat, opts, fns, init, id, cb) {\n var w = wrkr(fns, init, id, function (err, dat) {\n w.terminate();\n cb(err, dat);\n });\n w.postMessage([dat, opts], opts.consume ? [dat.buffer] : []);\n return function () {\n w.terminate();\n };\n};\n// auto stream\nvar astrm = function (strm) {\n strm.ondata = function (dat, final) {\n return postMessage([dat, final], [dat.buffer]);\n };\n return function (ev) {\n if (ev.data.length) {\n strm.push(ev.data[0], ev.data[1]);\n postMessage([ev.data[0].length]);\n } else strm.flush();\n };\n};\n// async stream attach\nvar astrmify = function (fns, strm, opts, init, id, flush, ext) {\n var t;\n var w = wrkr(fns, init, id, function (err, dat) {\n if (err) w.terminate(), strm.ondata.call(strm, err);else if (!Array.isArray(dat)) ext(dat);else if (dat.length == 1) {\n strm.queuedSize -= dat[0];\n if (strm.ondrain) strm.ondrain(dat[0]);\n } else {\n if (dat[1]) w.terminate();\n strm.ondata.call(strm, err, dat[0], dat[1]);\n }\n });\n w.postMessage(opts);\n strm.queuedSize = 0;\n strm.push = function (d, f) {\n if (!strm.ondata) err(5);\n if (t) strm.ondata(err(4, 0, 1), null, !!f);\n strm.queuedSize += d.length;\n w.postMessage([d, t = f], [d.buffer]);\n };\n strm.terminate = function () {\n w.terminate();\n };\n if (flush) {\n strm.flush = function () {\n w.postMessage([]);\n };\n }\n};\n// read 2 bytes\nvar b2 = function (d, b) {\n return d[b] | d[b + 1] << 8;\n};\n// read 4 bytes\nvar b4 = function (d, b) {\n return (d[b] | d[b + 1] << 8 | d[b + 2] << 16 | d[b + 3] << 24) >>> 0;\n};\nvar b8 = function (d, b) {\n return b4(d, b) + b4(d, b + 4) * 4294967296;\n};\n// write bytes\nvar wbytes = function (d, b, v) {\n for (; v; ++b) d[b] = v, v >>>= 8;\n};\n// gzip header\nvar gzh = function (c, o) {\n var fn = o.filename;\n c[0] = 31, c[1] = 139, c[2] = 8, c[8] = o.level < 2 ? 4 : o.level == 9 ? 2 : 0, c[9] = 3; // assume Unix\n if (o.mtime != 0) wbytes(c, 4, Math.floor(new Date(o.mtime || Date.now()) / 1000));\n if (fn) {\n c[3] = 8;\n for (var i = 0; i <= fn.length; ++i) c[i + 10] = fn.charCodeAt(i);\n }\n};\n// gzip footer: -8 to -4 = CRC, -4 to -0 is length\n// gzip start\nvar gzs = function (d) {\n if (d[0] != 31 || d[1] != 139 || d[2] != 8) err(6, 'invalid gzip data');\n var flg = d[3];\n var st = 10;\n if (flg & 4) st += (d[10] | d[11] << 8) + 2;\n for (var zs = (flg >> 3 & 1) + (flg >> 4 & 1); zs > 0; zs -= !d[st++]);\n return st + (flg & 2);\n};\n// gzip length\nvar gzl = function (d) {\n var l = d.length;\n return (d[l - 4] | d[l - 3] << 8 | d[l - 2] << 16 | d[l - 1] << 24) >>> 0;\n};\n// gzip header length\nvar gzhl = function (o) {\n return 10 + (o.filename ? o.filename.length + 1 : 0);\n};\n// zlib header\nvar zlh = function (c, o) {\n var lv = o.level,\n fl = lv == 0 ? 0 : lv < 6 ? 1 : lv == 9 ? 3 : 2;\n c[0] = 120, c[1] = fl << 6 | (o.dictionary && 32);\n c[1] |= 31 - (c[0] << 8 | c[1]) % 31;\n if (o.dictionary) {\n var h = adler();\n h.p(o.dictionary);\n wbytes(c, 2, h.d());\n }\n};\n// zlib start\nvar zls = function (d, dict) {\n if ((d[0] & 15) != 8 || d[0] >> 4 > 7 || (d[0] << 8 | d[1]) % 31) err(6, 'invalid zlib data');\n if ((d[1] >> 5 & 1) == +!dict) err(6, 'invalid zlib data: ' + (d[1] & 32 ? 'need' : 'unexpected') + ' dictionary');\n return (d[1] >> 3 & 4) + 2;\n};\nfunction StrmOpt(opts, cb) {\n if (typeof opts == 'function') cb = opts, opts = {};\n this.ondata = cb;\n return opts;\n}\n/**\n * Streaming DEFLATE compression\n */\nvar Deflate = /*#__PURE__*/function () {\n function Deflate(opts, cb) {\n if (typeof opts == 'function') cb = opts, opts = {};\n this.ondata = cb;\n this.o = opts || {};\n this.s = {\n l: 0,\n i: 32768,\n w: 32768,\n z: 32768\n };\n // Buffer length must always be 0 mod 32768 for index calculations to be correct when modifying head and prev\n // 98304 = 32768 (lookback) + 65536 (common chunk size)\n this.b = new u8(98304);\n if (this.o.dictionary) {\n var dict = this.o.dictionary.subarray(-32768);\n this.b.set(dict, 32768 - dict.length);\n this.s.i = 32768 - dict.length;\n }\n }\n Deflate.prototype.p = function (c, f) {\n this.ondata(dopt(c, this.o, 0, 0, this.s), f);\n };\n /**\n * Pushes a chunk to be deflated\n * @param chunk The chunk to push\n * @param final Whether this is the last chunk\n */\n Deflate.prototype.push = function (chunk, final) {\n if (!this.ondata) err(5);\n if (this.s.l) err(4);\n var endLen = chunk.length + this.s.z;\n if (endLen > this.b.length) {\n if (endLen > 2 * this.b.length - 32768) {\n var newBuf = new u8(endLen & -32768);\n newBuf.set(this.b.subarray(0, this.s.z));\n this.b = newBuf;\n }\n var split = this.b.length - this.s.z;\n this.b.set(chunk.subarray(0, split), this.s.z);\n this.s.z = this.b.length;\n this.p(this.b, false);\n this.b.set(this.b.subarray(-32768));\n this.b.set(chunk.subarray(split), 32768);\n this.s.z = chunk.length - split + 32768;\n this.s.i = 32766, this.s.w = 32768;\n } else {\n this.b.set(chunk, this.s.z);\n this.s.z += chunk.length;\n }\n this.s.l = final & 1;\n if (this.s.z > this.s.w + 8191 || final) {\n this.p(this.b, final || false);\n this.s.w = this.s.i, this.s.i -= 2;\n }\n };\n /**\n * Flushes buffered uncompressed data. Useful to immediately retrieve the\n * deflated output for small inputs.\n */\n Deflate.prototype.flush = function () {\n if (!this.ondata) err(5);\n if (this.s.l) err(4);\n this.p(this.b, false);\n this.s.w = this.s.i, this.s.i -= 2;\n };\n return Deflate;\n}();\nexport { Deflate };\n/**\n * Asynchronous streaming DEFLATE compression\n */\nvar AsyncDeflate = /*#__PURE__*/function () {\n function AsyncDeflate(opts, cb) {\n astrmify([bDflt, function () {\n return [astrm, Deflate];\n }], this, StrmOpt.call(this, opts, cb), function (ev) {\n var strm = new Deflate(ev.data);\n onmessage = astrm(strm);\n }, 6, 1);\n }\n return AsyncDeflate;\n}();\nexport { AsyncDeflate };\nexport function deflate(data, opts, cb) {\n if (!cb) cb = opts, opts = {};\n if (typeof cb != 'function') err(7);\n return cbify(data, opts, [bDflt], function (ev) {\n return pbf(deflateSync(ev.data[0], ev.data[1]));\n }, 0, cb);\n}\n/**\n * Compresses data with DEFLATE without any wrapper\n * @param data The data to compress\n * @param opts The compression options\n * @returns The deflated version of the data\n */\nexport function deflateSync(data, opts) {\n return dopt(data, opts || {}, 0, 0);\n}\n/**\n * Streaming DEFLATE decompression\n */\nvar Inflate = /*#__PURE__*/function () {\n function Inflate(opts, cb) {\n // no StrmOpt here to avoid adding to workerizer\n if (typeof opts == 'function') cb = opts, opts = {};\n this.ondata = cb;\n var dict = opts && opts.dictionary && opts.dictionary.subarray(-32768);\n this.s = {\n i: 0,\n b: dict ? dict.length : 0\n };\n this.o = new u8(32768);\n this.p = new u8(0);\n if (dict) this.o.set(dict);\n }\n Inflate.prototype.e = function (c) {\n if (!this.ondata) err(5);\n if (this.d) err(4);\n if (!this.p.length) this.p = c;else if (c.length) {\n var n = new u8(this.p.length + c.length);\n n.set(this.p), n.set(c, this.p.length), this.p = n;\n }\n };\n Inflate.prototype.c = function (final) {\n this.s.i = +(this.d = final || false);\n var bts = this.s.b;\n var dt = inflt(this.p, this.s, this.o);\n this.ondata(slc(dt, bts, this.s.b), this.d);\n this.o = slc(dt, this.s.b - 32768), this.s.b = this.o.length;\n this.p = slc(this.p, this.s.p / 8 | 0), this.s.p &= 7;\n };\n /**\n * Pushes a chunk to be inflated\n * @param chunk The chunk to push\n * @param final Whether this is the final chunk\n */\n Inflate.prototype.push = function (chunk, final) {\n this.e(chunk), this.c(final);\n };\n return Inflate;\n}();\nexport { Inflate };\n/**\n * Asynchronous streaming DEFLATE decompression\n */\nvar AsyncInflate = /*#__PURE__*/function () {\n function AsyncInflate(opts, cb) {\n astrmify([bInflt, function () {\n return [astrm, Inflate];\n }], this, StrmOpt.call(this, opts, cb), function (ev) {\n var strm = new Inflate(ev.data);\n onmessage = astrm(strm);\n }, 7, 0);\n }\n return AsyncInflate;\n}();\nexport { AsyncInflate };\nexport function inflate(data, opts, cb) {\n if (!cb) cb = opts, opts = {};\n if (typeof cb != 'function') err(7);\n return cbify(data, opts, [bInflt], function (ev) {\n return pbf(inflateSync(ev.data[0], gopt(ev.data[1])));\n }, 1, cb);\n}\n/**\n * Expands DEFLATE data with no wrapper\n * @param data The data to decompress\n * @param opts The decompression options\n * @returns The decompressed version of the data\n */\nexport function inflateSync(data, opts) {\n return inflt(data, {\n i: 2\n }, opts && opts.out, opts && opts.dictionary);\n}\n// before you yell at me for not just using extends, my reason is that TS inheritance is hard to workerize.\n/**\n * Streaming GZIP compression\n */\nvar Gzip = /*#__PURE__*/function () {\n function Gzip(opts, cb) {\n this.c = crc();\n this.l = 0;\n this.v = 1;\n Deflate.call(this, opts, cb);\n }\n /**\n * Pushes a chunk to be GZIPped\n * @param chunk The chunk to push\n * @param final Whether this is the last chunk\n */\n Gzip.prototype.push = function (chunk, final) {\n this.c.p(chunk);\n this.l += chunk.length;\n Deflate.prototype.push.call(this, chunk, final);\n };\n Gzip.prototype.p = function (c, f) {\n var raw = dopt(c, this.o, this.v && gzhl(this.o), f && 8, this.s);\n if (this.v) gzh(raw, this.o), this.v = 0;\n if (f) wbytes(raw, raw.length - 8, this.c.d()), wbytes(raw, raw.length - 4, this.l);\n this.ondata(raw, f);\n };\n /**\n * Flushes buffered uncompressed data. Useful to immediately retrieve the\n * GZIPped output for small inputs.\n */\n Gzip.prototype.flush = function () {\n Deflate.prototype.flush.call(this);\n };\n return Gzip;\n}();\nexport { Gzip };\n/**\n * Asynchronous streaming GZIP compression\n */\nvar AsyncGzip = /*#__PURE__*/function () {\n function AsyncGzip(opts, cb) {\n astrmify([bDflt, gze, function () {\n return [astrm, Deflate, Gzip];\n }], this, StrmOpt.call(this, opts, cb), function (ev) {\n var strm = new Gzip(ev.data);\n onmessage = astrm(strm);\n }, 8, 1);\n }\n return AsyncGzip;\n}();\nexport { AsyncGzip };\nexport function gzip(data, opts, cb) {\n if (!cb) cb = opts, opts = {};\n if (typeof cb != 'function') err(7);\n return cbify(data, opts, [bDflt, gze, function () {\n return [gzipSync];\n }], function (ev) {\n return pbf(gzipSync(ev.data[0], ev.data[1]));\n }, 2, cb);\n}\n/**\n * Compresses data with GZIP\n * @param data The data to compress\n * @param opts The compression options\n * @returns The gzipped version of the data\n */\nexport function gzipSync(data, opts) {\n if (!opts) opts = {};\n var c = crc(),\n l = data.length;\n c.p(data);\n var d = dopt(data, opts, gzhl(opts), 8),\n s = d.length;\n return gzh(d, opts), wbytes(d, s - 8, c.d()), wbytes(d, s - 4, l), d;\n}\n/**\n * Streaming single or multi-member GZIP decompression\n */\nvar Gunzip = /*#__PURE__*/function () {\n function Gunzip(opts, cb) {\n this.v = 1;\n this.r = 0;\n Inflate.call(this, opts, cb);\n }\n /**\n * Pushes a chunk to be GUNZIPped\n * @param chunk The chunk to push\n * @param final Whether this is the last chunk\n */\n Gunzip.prototype.push = function (chunk, final) {\n Inflate.prototype.e.call(this, chunk);\n this.r += chunk.length;\n if (this.v) {\n var p = this.p.subarray(this.v - 1);\n var s = p.length > 3 ? gzs(p) : 4;\n if (s > p.length) {\n if (!final) return;\n } else if (this.v > 1 && this.onmember) {\n this.onmember(this.r - p.length);\n }\n this.p = p.subarray(s), this.v = 0;\n }\n // necessary to prevent TS from using the closure value\n // This allows for workerization to function correctly\n Inflate.prototype.c.call(this, final);\n // process concatenated GZIP\n if (this.s.f && !this.s.l && !final) {\n this.v = shft(this.s.p) + 9;\n this.s = {\n i: 0\n };\n this.o = new u8(0);\n this.push(new u8(0), final);\n }\n };\n return Gunzip;\n}();\nexport { Gunzip };\n/**\n * Asynchronous streaming single or multi-member GZIP decompression\n */\nvar AsyncGunzip = /*#__PURE__*/function () {\n function AsyncGunzip(opts, cb) {\n var _this = this;\n astrmify([bInflt, guze, function () {\n return [astrm, Inflate, Gunzip];\n }], this, StrmOpt.call(this, opts, cb), function (ev) {\n var strm = new Gunzip(ev.data);\n strm.onmember = function (offset) {\n return postMessage(offset);\n };\n onmessage = astrm(strm);\n }, 9, 0, function (offset) {\n return _this.onmember && _this.onmember(offset);\n });\n }\n return AsyncGunzip;\n}();\nexport { AsyncGunzip };\nexport function gunzip(data, opts, cb) {\n if (!cb) cb = opts, opts = {};\n if (typeof cb != 'function') err(7);\n return cbify(data, opts, [bInflt, guze, function () {\n return [gunzipSync];\n }], function (ev) {\n return pbf(gunzipSync(ev.data[0], ev.data[1]));\n }, 3, cb);\n}\n/**\n * Expands GZIP data\n * @param data The data to decompress\n * @param opts The decompression options\n * @returns The decompressed version of the data\n */\nexport function gunzipSync(data, opts) {\n var st = gzs(data);\n if (st + 8 > data.length) err(6, 'invalid gzip data');\n return inflt(data.subarray(st, -8), {\n i: 2\n }, opts && opts.out || new u8(gzl(data)), opts && opts.dictionary);\n}\n/**\n * Streaming Zlib compression\n */\nvar Zlib = /*#__PURE__*/function () {\n function Zlib(opts, cb) {\n this.c = adler();\n this.v = 1;\n Deflate.call(this, opts, cb);\n }\n /**\n * Pushes a chunk to be zlibbed\n * @param chunk The chunk to push\n * @param final Whether this is the last chunk\n */\n Zlib.prototype.push = function (chunk, final) {\n this.c.p(chunk);\n Deflate.prototype.push.call(this, chunk, final);\n };\n Zlib.prototype.p = function (c, f) {\n var raw = dopt(c, this.o, this.v && (this.o.dictionary ? 6 : 2), f && 4, this.s);\n if (this.v) zlh(raw, this.o), this.v = 0;\n if (f) wbytes(raw, raw.length - 4, this.c.d());\n this.ondata(raw, f);\n };\n /**\n * Flushes buffered uncompressed data. Useful to immediately retrieve the\n * zlibbed output for small inputs.\n */\n Zlib.prototype.flush = function () {\n Deflate.prototype.flush.call(this);\n };\n return Zlib;\n}();\nexport { Zlib };\n/**\n * Asynchronous streaming Zlib compression\n */\nvar AsyncZlib = /*#__PURE__*/function () {\n function AsyncZlib(opts, cb) {\n astrmify([bDflt, zle, function () {\n return [astrm, Deflate, Zlib];\n }], this, StrmOpt.call(this, opts, cb), function (ev) {\n var strm = new Zlib(ev.data);\n onmessage = astrm(strm);\n }, 10, 1);\n }\n return AsyncZlib;\n}();\nexport { AsyncZlib };\nexport function zlib(data, opts, cb) {\n if (!cb) cb = opts, opts = {};\n if (typeof cb != 'function') err(7);\n return cbify(data, opts, [bDflt, zle, function () {\n return [zlibSync];\n }], function (ev) {\n return pbf(zlibSync(ev.data[0], ev.data[1]));\n }, 4, cb);\n}\n/**\n * Compress data with Zlib\n * @param data The data to compress\n * @param opts The compression options\n * @returns The zlib-compressed version of the data\n */\nexport function zlibSync(data, opts) {\n if (!opts) opts = {};\n var a = adler();\n a.p(data);\n var d = dopt(data, opts, opts.dictionary ? 6 : 2, 4);\n return zlh(d, opts), wbytes(d, d.length - 4, a.d()), d;\n}\n/**\n * Streaming Zlib decompression\n */\nvar Unzlib = /*#__PURE__*/function () {\n function Unzlib(opts, cb) {\n Inflate.call(this, opts, cb);\n this.v = opts && opts.dictionary ? 2 : 1;\n }\n /**\n * Pushes a chunk to be unzlibbed\n * @param chunk The chunk to push\n * @param final Whether this is the last chunk\n */\n Unzlib.prototype.push = function (chunk, final) {\n Inflate.prototype.e.call(this, chunk);\n if (this.v) {\n if (this.p.length < 6 && !final) return;\n this.p = this.p.subarray(zls(this.p, this.v - 1)), this.v = 0;\n }\n if (final) {\n if (this.p.length < 4) err(6, 'invalid zlib data');\n this.p = this.p.subarray(0, -4);\n }\n // necessary to prevent TS from using the closure value\n // This allows for workerization to function correctly\n Inflate.prototype.c.call(this, final);\n };\n return Unzlib;\n}();\nexport { Unzlib };\n/**\n * Asynchronous streaming Zlib decompression\n */\nvar AsyncUnzlib = /*#__PURE__*/function () {\n function AsyncUnzlib(opts, cb) {\n astrmify([bInflt, zule, function () {\n return [astrm, Inflate, Unzlib];\n }], this, StrmOpt.call(this, opts, cb), function (ev) {\n var strm = new Unzlib(ev.data);\n onmessage = astrm(strm);\n }, 11, 0);\n }\n return AsyncUnzlib;\n}();\nexport { AsyncUnzlib };\nexport function unzlib(data, opts, cb) {\n if (!cb) cb = opts, opts = {};\n if (typeof cb != 'function') err(7);\n return cbify(data, opts, [bInflt, zule, function () {\n return [unzlibSync];\n }], function (ev) {\n return pbf(unzlibSync(ev.data[0], gopt(ev.data[1])));\n }, 5, cb);\n}\n/**\n * Expands Zlib data\n * @param data The data to decompress\n * @param opts The decompression options\n * @returns The decompressed version of the data\n */\nexport function unzlibSync(data, opts) {\n return inflt(data.subarray(zls(data, opts && opts.dictionary), -4), {\n i: 2\n }, opts && opts.out, opts && opts.dictionary);\n}\n// Default algorithm for compression (used because having a known output size allows faster decompression)\nexport { gzip as compress, AsyncGzip as AsyncCompress };\nexport { gzipSync as compressSync, Gzip as Compress };\n/**\n * Streaming GZIP, Zlib, or raw DEFLATE decompression\n */\nvar Decompress = /*#__PURE__*/function () {\n function Decompress(opts, cb) {\n this.o = StrmOpt.call(this, opts, cb) || {};\n this.G = Gunzip;\n this.I = Inflate;\n this.Z = Unzlib;\n }\n // init substream\n // overriden by AsyncDecompress\n Decompress.prototype.i = function () {\n var _this = this;\n this.s.ondata = function (dat, final) {\n _this.ondata(dat, final);\n };\n };\n /**\n * Pushes a chunk to be decompressed\n * @param chunk The chunk to push\n * @param final Whether this is the last chunk\n */\n Decompress.prototype.push = function (chunk, final) {\n if (!this.ondata) err(5);\n if (!this.s) {\n if (this.p && this.p.length) {\n var n = new u8(this.p.length + chunk.length);\n n.set(this.p), n.set(chunk, this.p.length);\n } else this.p = chunk;\n if (this.p.length > 2) {\n this.s = this.p[0] == 31 && this.p[1] == 139 && this.p[2] == 8 ? new this.G(this.o) : (this.p[0] & 15) != 8 || this.p[0] >> 4 > 7 || (this.p[0] << 8 | this.p[1]) % 31 ? new this.I(this.o) : new this.Z(this.o);\n this.i();\n this.s.push(this.p, final);\n this.p = null;\n }\n } else this.s.push(chunk, final);\n };\n return Decompress;\n}();\nexport { Decompress };\n/**\n * Asynchronous streaming GZIP, Zlib, or raw DEFLATE decompression\n */\nvar AsyncDecompress = /*#__PURE__*/function () {\n function AsyncDecompress(opts, cb) {\n Decompress.call(this, opts, cb);\n this.queuedSize = 0;\n this.G = AsyncGunzip;\n this.I = AsyncInflate;\n this.Z = AsyncUnzlib;\n }\n AsyncDecompress.prototype.i = function () {\n var _this = this;\n this.s.ondata = function (err, dat, final) {\n _this.ondata(err, dat, final);\n };\n this.s.ondrain = function (size) {\n _this.queuedSize -= size;\n if (_this.ondrain) _this.ondrain(size);\n };\n };\n /**\n * Pushes a chunk to be decompressed\n * @param chunk The chunk to push\n * @param final Whether this is the last chunk\n */\n AsyncDecompress.prototype.push = function (chunk, final) {\n this.queuedSize += chunk.length;\n Decompress.prototype.push.call(this, chunk, final);\n };\n return AsyncDecompress;\n}();\nexport { AsyncDecompress };\nexport function decompress(data, opts, cb) {\n if (!cb) cb = opts, opts = {};\n if (typeof cb != 'function') err(7);\n return data[0] == 31 && data[1] == 139 && data[2] == 8 ? gunzip(data, opts, cb) : (data[0] & 15) != 8 || data[0] >> 4 > 7 || (data[0] << 8 | data[1]) % 31 ? inflate(data, opts, cb) : unzlib(data, opts, cb);\n}\n/**\n * Expands compressed GZIP, Zlib, or raw DEFLATE data, automatically detecting the format\n * @param data The data to decompress\n * @param opts The decompression options\n * @returns The decompressed version of the data\n */\nexport function decompressSync(data, opts) {\n return data[0] == 31 && data[1] == 139 && data[2] == 8 ? gunzipSync(data, opts) : (data[0] & 15) != 8 || data[0] >> 4 > 7 || (data[0] << 8 | data[1]) % 31 ? inflateSync(data, opts) : unzlibSync(data, opts);\n}\n// flatten a directory structure\nvar fltn = function (d, p, t, o) {\n for (var k in d) {\n var val = d[k],\n n = p + k,\n op = o;\n if (Array.isArray(val)) op = mrg(o, val[1]), val = val[0];\n if (val instanceof u8) t[n] = [val, op];else {\n t[n += '/'] = [new u8(0), op];\n fltn(val, n, t, o);\n }\n }\n};\n// text encoder\nvar te = typeof TextEncoder != 'undefined' && /*#__PURE__*/new TextEncoder();\n// text decoder\nvar td = typeof TextDecoder != 'undefined' && /*#__PURE__*/new TextDecoder();\n// text decoder stream\nvar tds = 0;\ntry {\n td.decode(et, {\n stream: true\n });\n tds = 1;\n} catch (e) {}\n// decode UTF8\nvar dutf8 = function (d) {\n for (var r = '', i = 0;;) {\n var c = d[i++];\n var eb = (c > 127) + (c > 223) + (c > 239);\n if (i + eb > d.length) return {\n s: r,\n r: slc(d, i - 1)\n };\n if (!eb) r += String.fromCharCode(c);else if (eb == 3) {\n c = ((c & 15) << 18 | (d[i++] & 63) << 12 | (d[i++] & 63) << 6 | d[i++] & 63) - 65536, r += String.fromCharCode(55296 | c >> 10, 56320 | c & 1023);\n } else if (eb & 1) r += String.fromCharCode((c & 31) << 6 | d[i++] & 63);else r += String.fromCharCode((c & 15) << 12 | (d[i++] & 63) << 6 | d[i++] & 63);\n }\n};\n/**\n * Streaming UTF-8 decoding\n */\nvar DecodeUTF8 = /*#__PURE__*/function () {\n /**\n * Creates a UTF-8 decoding stream\n * @param cb The callback to call whenever data is decoded\n */\n function DecodeUTF8(cb) {\n this.ondata = cb;\n if (tds) this.t = new TextDecoder();else this.p = et;\n }\n /**\n * Pushes a chunk to be decoded from UTF-8 binary\n * @param chunk The chunk to push\n * @param final Whether this is the last chunk\n */\n DecodeUTF8.prototype.push = function (chunk, final) {\n if (!this.ondata) err(5);\n final = !!final;\n if (this.t) {\n this.ondata(this.t.decode(chunk, {\n stream: true\n }), final);\n if (final) {\n if (this.t.decode().length) err(8);\n this.t = null;\n }\n return;\n }\n if (!this.p) err(4);\n var dat = new u8(this.p.length + chunk.length);\n dat.set(this.p);\n dat.set(chunk, this.p.length);\n var _a = dutf8(dat),\n s = _a.s,\n r = _a.r;\n if (final) {\n if (r.length) err(8);\n this.p = null;\n } else this.p = r;\n this.ondata(s, final);\n };\n return DecodeUTF8;\n}();\nexport { DecodeUTF8 };\n/**\n * Streaming UTF-8 encoding\n */\nvar EncodeUTF8 = /*#__PURE__*/function () {\n /**\n * Creates a UTF-8 decoding stream\n * @param cb The callback to call whenever data is encoded\n */\n function EncodeUTF8(cb) {\n this.ondata = cb;\n }\n /**\n * Pushes a chunk to be encoded to UTF-8\n * @param chunk The string data to push\n * @param final Whether this is the last chunk\n */\n EncodeUTF8.prototype.push = function (chunk, final) {\n if (!this.ondata) err(5);\n if (this.d) err(4);\n this.ondata(strToU8(chunk), this.d = final || false);\n };\n return EncodeUTF8;\n}();\nexport { EncodeUTF8 };\n/**\n * Converts a string into a Uint8Array for use with compression/decompression methods\n * @param str The string to encode\n * @param latin1 Whether or not to interpret the data as Latin-1. This should\n * not need to be true unless decoding a binary string.\n * @returns The string encoded in UTF-8/Latin-1 binary\n */\nexport function strToU8(str, latin1) {\n if (latin1) {\n var ar_1 = new u8(str.length);\n for (var i = 0; i < str.length; ++i) ar_1[i] = str.charCodeAt(i);\n return ar_1;\n }\n if (te) return te.encode(str);\n var l = str.length;\n var ar = new u8(str.length + (str.length >> 1));\n var ai = 0;\n var w = function (v) {\n ar[ai++] = v;\n };\n for (var i = 0; i < l; ++i) {\n if (ai + 5 > ar.length) {\n var n = new u8(ai + 8 + (l - i << 1));\n n.set(ar);\n ar = n;\n }\n var c = str.charCodeAt(i);\n if (c < 128 || latin1) w(c);else if (c < 2048) w(192 | c >> 6), w(128 | c & 63);else if (c > 55295 && c < 57344) c = 65536 + (c & 1023 << 10) | str.charCodeAt(++i) & 1023, w(240 | c >> 18), w(128 | c >> 12 & 63), w(128 | c >> 6 & 63), w(128 | c & 63);else w(224 | c >> 12), w(128 | c >> 6 & 63), w(128 | c & 63);\n }\n return slc(ar, 0, ai);\n}\n/**\n * Converts a Uint8Array to a string\n * @param dat The data to decode to string\n * @param latin1 Whether or not to interpret the data as Latin-1. This should\n * not need to be true unless encoding to binary string.\n * @returns The original UTF-8/Latin-1 string\n */\nexport function strFromU8(dat, latin1) {\n if (latin1) {\n var r = '';\n for (var i = 0; i < dat.length; i += 16384) r += String.fromCharCode.apply(null, dat.subarray(i, i + 16384));\n return r;\n } else if (td) {\n return td.decode(dat);\n } else {\n var _a = dutf8(dat),\n s = _a.s,\n r = _a.r;\n if (r.length) err(8);\n return s;\n }\n}\n;\n// deflate bit flag\nvar dbf = function (l) {\n return l == 1 ? 3 : l < 6 ? 2 : l == 9 ? 1 : 0;\n};\n// skip local zip header\nvar slzh = function (d, b) {\n return b + 30 + b2(d, b + 26) + b2(d, b + 28);\n};\n// read zip header\nvar zh = function (d, b, z) {\n var fnl = b2(d, b + 28),\n fn = strFromU8(d.subarray(b + 46, b + 46 + fnl), !(b2(d, b + 8) & 2048)),\n es = b + 46 + fnl,\n bs = b4(d, b + 20);\n var _a = z && bs == 4294967295 ? z64e(d, es) : [bs, b4(d, b + 24), b4(d, b + 42)],\n sc = _a[0],\n su = _a[1],\n off = _a[2];\n return [b2(d, b + 10), sc, su, fn, es + b2(d, b + 30) + b2(d, b + 32), off];\n};\n// read zip64 extra field\nvar z64e = function (d, b) {\n for (; b2(d, b) != 1; b += 4 + b2(d, b + 2));\n return [b8(d, b + 12), b8(d, b + 4), b8(d, b + 20)];\n};\n// extra field length\nvar exfl = function (ex) {\n var le = 0;\n if (ex) {\n for (var k in ex) {\n var l = ex[k].length;\n if (l > 65535) err(9);\n le += l + 4;\n }\n }\n return le;\n};\n// write zip header\nvar wzh = function (d, b, f, fn, u, c, ce, co) {\n var fl = fn.length,\n ex = f.extra,\n col = co && co.length;\n var exl = exfl(ex);\n wbytes(d, b, ce != null ? 0x2014B50 : 0x4034B50), b += 4;\n if (ce != null) d[b++] = 20, d[b++] = f.os;\n d[b] = 20, b += 2; // spec compliance? what's that?\n d[b++] = f.flag << 1 | (c < 0 && 8), d[b++] = u && 8;\n d[b++] = f.compression & 255, d[b++] = f.compression >> 8;\n var dt = new Date(f.mtime == null ? Date.now() : f.mtime),\n y = dt.getFullYear() - 1980;\n if (y < 0 || y > 119) err(10);\n wbytes(d, b, y << 25 | dt.getMonth() + 1 << 21 | dt.getDate() << 16 | dt.getHours() << 11 | dt.getMinutes() << 5 | dt.getSeconds() >> 1), b += 4;\n if (c != -1) {\n wbytes(d, b, f.crc);\n wbytes(d, b + 4, c < 0 ? -c - 2 : c);\n wbytes(d, b + 8, f.size);\n }\n wbytes(d, b + 12, fl);\n wbytes(d, b + 14, exl), b += 16;\n if (ce != null) {\n wbytes(d, b, col);\n wbytes(d, b + 6, f.attrs);\n wbytes(d, b + 10, ce), b += 14;\n }\n d.set(fn, b);\n b += fl;\n if (exl) {\n for (var k in ex) {\n var exf = ex[k],\n l = exf.length;\n wbytes(d, b, +k);\n wbytes(d, b + 2, l);\n d.set(exf, b + 4), b += 4 + l;\n }\n }\n if (col) d.set(co, b), b += col;\n return b;\n};\n// write zip footer (end of central directory)\nvar wzf = function (o, b, c, d, e) {\n wbytes(o, b, 0x6054B50); // skip disk\n wbytes(o, b + 8, c);\n wbytes(o, b + 10, c);\n wbytes(o, b + 12, d);\n wbytes(o, b + 16, e);\n};\n/**\n * A pass-through stream to keep data uncompressed in a ZIP archive.\n */\nvar ZipPassThrough = /*#__PURE__*/function () {\n /**\n * Creates a pass-through stream that can be added to ZIP archives\n * @param filename The filename to associate with this data stream\n */\n function ZipPassThrough(filename) {\n this.filename = filename;\n this.c = crc();\n this.size = 0;\n this.compression = 0;\n }\n /**\n * Processes a chunk and pushes to the output stream. You can override this\n * method in a subclass for custom behavior, but by default this passes\n * the data through. You must call this.ondata(err, chunk, final) at some\n * point in this method.\n * @param chunk The chunk to process\n * @param final Whether this is the last chunk\n */\n ZipPassThrough.prototype.process = function (chunk, final) {\n this.ondata(null, chunk, final);\n };\n /**\n * Pushes a chunk to be added. If you are subclassing this with a custom\n * compression algorithm, note that you must push data from the source\n * file only, pre-compression.\n * @param chunk The chunk to push\n * @param final Whether this is the last chunk\n */\n ZipPassThrough.prototype.push = function (chunk, final) {\n if (!this.ondata) err(5);\n this.c.p(chunk);\n this.size += chunk.length;\n if (final) this.crc = this.c.d();\n this.process(chunk, final || false);\n };\n return ZipPassThrough;\n}();\nexport { ZipPassThrough };\n// I don't extend because TypeScript extension adds 1kB of runtime bloat\n/**\n * Streaming DEFLATE compression for ZIP archives. Prefer using AsyncZipDeflate\n * for better performance\n */\nvar ZipDeflate = /*#__PURE__*/function () {\n /**\n * Creates a DEFLATE stream that can be added to ZIP archives\n * @param filename The filename to associate with this data stream\n * @param opts The compression options\n */\n function ZipDeflate(filename, opts) {\n var _this = this;\n if (!opts) opts = {};\n ZipPassThrough.call(this, filename);\n this.d = new Deflate(opts, function (dat, final) {\n _this.ondata(null, dat, final);\n });\n this.compression = 8;\n this.flag = dbf(opts.level);\n }\n ZipDeflate.prototype.process = function (chunk, final) {\n try {\n this.d.push(chunk, final);\n } catch (e) {\n this.ondata(e, null, final);\n }\n };\n /**\n * Pushes a chunk to be deflated\n * @param chunk The chunk to push\n * @param final Whether this is the last chunk\n */\n ZipDeflate.prototype.push = function (chunk, final) {\n ZipPassThrough.prototype.push.call(this, chunk, final);\n };\n return ZipDeflate;\n}();\nexport { ZipDeflate };\n/**\n * Asynchronous streaming DEFLATE compression for ZIP archives\n */\nvar AsyncZipDeflate = /*#__PURE__*/function () {\n /**\n * Creates an asynchronous DEFLATE stream that can be added to ZIP archives\n * @param filename The filename to associate with this data stream\n * @param opts The compression options\n */\n function AsyncZipDeflate(filename, opts) {\n var _this = this;\n if (!opts) opts = {};\n ZipPassThrough.call(this, filename);\n this.d = new AsyncDeflate(opts, function (err, dat, final) {\n _this.ondata(err, dat, final);\n });\n this.compression = 8;\n this.flag = dbf(opts.level);\n this.terminate = this.d.terminate;\n }\n AsyncZipDeflate.prototype.process = function (chunk, final) {\n this.d.push(chunk, final);\n };\n /**\n * Pushes a chunk to be deflated\n * @param chunk The chunk to push\n * @param final Whether this is the last chunk\n */\n AsyncZipDeflate.prototype.push = function (chunk, final) {\n ZipPassThrough.prototype.push.call(this, chunk, final);\n };\n return AsyncZipDeflate;\n}();\nexport { AsyncZipDeflate };\n// TODO: Better tree shaking\n/**\n * A zippable archive to which files can incrementally be added\n */\nvar Zip = /*#__PURE__*/function () {\n /**\n * Creates an empty ZIP archive to which files can be added\n * @param cb The callback to call whenever data for the generated ZIP archive\n * is available\n */\n function Zip(cb) {\n this.ondata = cb;\n this.u = [];\n this.d = 1;\n }\n /**\n * Adds a file to the ZIP archive\n * @param file The file stream to add\n */\n Zip.prototype.add = function (file) {\n var _this = this;\n if (!this.ondata) err(5);\n // finishing or finished\n if (this.d & 2) this.ondata(err(4 + (this.d & 1) * 8, 0, 1), null, false);else {\n var f = strToU8(file.filename),\n fl_1 = f.length;\n var com = file.comment,\n o = com && strToU8(com);\n var u = fl_1 != file.filename.length || o && com.length != o.length;\n var hl_1 = fl_1 + exfl(file.extra) + 30;\n if (fl_1 > 65535) this.ondata(err(11, 0, 1), null, false);\n var header = new u8(hl_1);\n wzh(header, 0, file, f, u, -1);\n var chks_1 = [header];\n var pAll_1 = function () {\n for (var _i = 0, chks_2 = chks_1; _i < chks_2.length; _i++) {\n var chk = chks_2[_i];\n _this.ondata(null, chk, false);\n }\n chks_1 = [];\n };\n var tr_1 = this.d;\n this.d = 0;\n var ind_1 = this.u.length;\n var uf_1 = mrg(file, {\n f: f,\n u: u,\n o: o,\n t: function () {\n if (file.terminate) file.terminate();\n },\n r: function () {\n pAll_1();\n if (tr_1) {\n var nxt = _this.u[ind_1 + 1];\n if (nxt) nxt.r();else _this.d = 1;\n }\n tr_1 = 1;\n }\n });\n var cl_1 = 0;\n file.ondata = function (err, dat, final) {\n if (err) {\n _this.ondata(err, dat, final);\n _this.terminate();\n } else {\n cl_1 += dat.length;\n chks_1.push(dat);\n if (final) {\n var dd = new u8(16);\n wbytes(dd, 0, 0x8074B50);\n wbytes(dd, 4, file.crc);\n wbytes(dd, 8, cl_1);\n wbytes(dd, 12, file.size);\n chks_1.push(dd);\n uf_1.c = cl_1, uf_1.b = hl_1 + cl_1 + 16, uf_1.crc = file.crc, uf_1.size = file.size;\n if (tr_1) uf_1.r();\n tr_1 = 1;\n } else if (tr_1) pAll_1();\n }\n };\n this.u.push(uf_1);\n }\n };\n /**\n * Ends the process of adding files and prepares to emit the final chunks.\n * This *must* be called after adding all desired files for the resulting\n * ZIP file to work properly.\n */\n Zip.prototype.end = function () {\n var _this = this;\n if (this.d & 2) {\n this.ondata(err(4 + (this.d & 1) * 8, 0, 1), null, true);\n return;\n }\n if (this.d) this.e();else this.u.push({\n r: function () {\n if (!(_this.d & 1)) return;\n _this.u.splice(-1, 1);\n _this.e();\n },\n t: function () {}\n });\n this.d = 3;\n };\n Zip.prototype.e = function () {\n var bt = 0,\n l = 0,\n tl = 0;\n for (var _i = 0, _a = this.u; _i < _a.length; _i++) {\n var f = _a[_i];\n tl += 46 + f.f.length + exfl(f.extra) + (f.o ? f.o.length : 0);\n }\n var out = new u8(tl + 22);\n for (var _b = 0, _c = this.u; _b < _c.length; _b++) {\n var f = _c[_b];\n wzh(out, bt, f, f.f, f.u, -f.c - 2, l, f.o);\n bt += 46 + f.f.length + exfl(f.extra) + (f.o ? f.o.length : 0), l += f.b;\n }\n wzf(out, bt, this.u.length, tl, l);\n this.ondata(null, out, true);\n this.d = 2;\n };\n /**\n * A method to terminate any internal workers used by the stream. Subsequent\n * calls to add() will fail.\n */\n Zip.prototype.terminate = function () {\n for (var _i = 0, _a = this.u; _i < _a.length; _i++) {\n var f = _a[_i];\n f.t();\n }\n this.d = 2;\n };\n return Zip;\n}();\nexport { Zip };\nexport function zip(data, opts, cb) {\n if (!cb) cb = opts, opts = {};\n if (typeof cb != 'function') err(7);\n var r = {};\n fltn(data, '', r, opts);\n var k = Object.keys(r);\n var lft = k.length,\n o = 0,\n tot = 0;\n var slft = lft,\n files = new Array(lft);\n var term = [];\n var tAll = function () {\n for (var i = 0; i < term.length; ++i) term[i]();\n };\n var cbd = function (a, b) {\n mt(function () {\n cb(a, b);\n });\n };\n mt(function () {\n cbd = cb;\n });\n var cbf = function () {\n var out = new u8(tot + 22),\n oe = o,\n cdl = tot - o;\n tot = 0;\n for (var i = 0; i < slft; ++i) {\n var f = files[i];\n try {\n var l = f.c.length;\n wzh(out, tot, f, f.f, f.u, l);\n var badd = 30 + f.f.length + exfl(f.extra);\n var loc = tot + badd;\n out.set(f.c, loc);\n wzh(out, o, f, f.f, f.u, l, tot, f.m), o += 16 + badd + (f.m ? f.m.length : 0), tot = loc + l;\n } catch (e) {\n return cbd(e, null);\n }\n }\n wzf(out, o, files.length, cdl, oe);\n cbd(null, out);\n };\n if (!lft) cbf();\n var _loop_1 = function (i) {\n var fn = k[i];\n var _a = r[fn],\n file = _a[0],\n p = _a[1];\n var c = crc(),\n size = file.length;\n c.p(file);\n var f = strToU8(fn),\n s = f.length;\n var com = p.comment,\n m = com && strToU8(com),\n ms = m && m.length;\n var exl = exfl(p.extra);\n var compression = p.level == 0 ? 0 : 8;\n var cbl = function (e, d) {\n if (e) {\n tAll();\n cbd(e, null);\n } else {\n var l = d.length;\n files[i] = mrg(p, {\n size: size,\n crc: c.d(),\n c: d,\n f: f,\n m: m,\n u: s != fn.length || m && com.length != ms,\n compression: compression\n });\n o += 30 + s + exl + l;\n tot += 76 + 2 * (s + exl) + (ms || 0) + l;\n if (! --lft) cbf();\n }\n };\n if (s > 65535) cbl(err(11, 0, 1), null);\n if (!compression) cbl(null, file);else if (size < 160000) {\n try {\n cbl(null, deflateSync(file, p));\n } catch (e) {\n cbl(e, null);\n }\n } else term.push(deflate(file, p, cbl));\n };\n // Cannot use lft because it can decrease\n for (var i = 0; i < slft; ++i) {\n _loop_1(i);\n }\n return tAll;\n}\n/**\n * Synchronously creates a ZIP file. Prefer using `zip` for better performance\n * with more than one file.\n * @param data The directory structure for the ZIP archive\n * @param opts The main options, merged with per-file options\n * @returns The generated ZIP archive\n */\nexport function zipSync(data, opts) {\n if (!opts) opts = {};\n var r = {};\n var files = [];\n fltn(data, '', r, opts);\n var o = 0;\n var tot = 0;\n for (var fn in r) {\n var _a = r[fn],\n file = _a[0],\n p = _a[1];\n var compression = p.level == 0 ? 0 : 8;\n var f = strToU8(fn),\n s = f.length;\n var com = p.comment,\n m = com && strToU8(com),\n ms = m && m.length;\n var exl = exfl(p.extra);\n if (s > 65535) err(11);\n var d = compression ? deflateSync(file, p) : file,\n l = d.length;\n var c = crc();\n c.p(file);\n files.push(mrg(p, {\n size: file.length,\n crc: c.d(),\n c: d,\n f: f,\n m: m,\n u: s != fn.length || m && com.length != ms,\n o: o,\n compression: compression\n }));\n o += 30 + s + exl + l;\n tot += 76 + 2 * (s + exl) + (ms || 0) + l;\n }\n var out = new u8(tot + 22),\n oe = o,\n cdl = tot - o;\n for (var i = 0; i < files.length; ++i) {\n var f = files[i];\n wzh(out, f.o, f, f.f, f.u, f.c.length);\n var badd = 30 + f.f.length + exfl(f.extra);\n out.set(f.c, f.o + badd);\n wzh(out, o, f, f.f, f.u, f.c.length, f.o, f.m), o += 16 + badd + (f.m ? f.m.length : 0);\n }\n wzf(out, o, files.length, cdl, oe);\n return out;\n}\n/**\n * Streaming pass-through decompression for ZIP archives\n */\nvar UnzipPassThrough = /*#__PURE__*/function () {\n function UnzipPassThrough() {}\n UnzipPassThrough.prototype.push = function (data, final) {\n this.ondata(null, data, final);\n };\n UnzipPassThrough.compression = 0;\n return UnzipPassThrough;\n}();\nexport { UnzipPassThrough };\n/**\n * Streaming DEFLATE decompression for ZIP archives. Prefer AsyncZipInflate for\n * better performance.\n */\nvar UnzipInflate = /*#__PURE__*/function () {\n /**\n * Creates a DEFLATE decompression that can be used in ZIP archives\n */\n function UnzipInflate() {\n var _this = this;\n this.i = new Inflate(function (dat, final) {\n _this.ondata(null, dat, final);\n });\n }\n UnzipInflate.prototype.push = function (data, final) {\n try {\n this.i.push(data, final);\n } catch (e) {\n this.ondata(e, null, final);\n }\n };\n UnzipInflate.compression = 8;\n return UnzipInflate;\n}();\nexport { UnzipInflate };\n/**\n * Asynchronous streaming DEFLATE decompression for ZIP archives\n */\nvar AsyncUnzipInflate = /*#__PURE__*/function () {\n /**\n * Creates a DEFLATE decompression that can be used in ZIP archives\n */\n function AsyncUnzipInflate(_, sz) {\n var _this = this;\n if (sz < 320000) {\n this.i = new Inflate(function (dat, final) {\n _this.ondata(null, dat, final);\n });\n } else {\n this.i = new AsyncInflate(function (err, dat, final) {\n _this.ondata(err, dat, final);\n });\n this.terminate = this.i.terminate;\n }\n }\n AsyncUnzipInflate.prototype.push = function (data, final) {\n if (this.i.terminate) data = slc(data, 0);\n this.i.push(data, final);\n };\n AsyncUnzipInflate.compression = 8;\n return AsyncUnzipInflate;\n}();\nexport { AsyncUnzipInflate };\n/**\n * A ZIP archive decompression stream that emits files as they are discovered\n */\nvar Unzip = /*#__PURE__*/function () {\n /**\n * Creates a ZIP decompression stream\n * @param cb The callback to call whenever a file in the ZIP archive is found\n */\n function Unzip(cb) {\n this.onfile = cb;\n this.k = [];\n this.o = {\n 0: UnzipPassThrough\n };\n this.p = et;\n }\n /**\n * Pushes a chunk to be unzipped\n * @param chunk The chunk to push\n * @param final Whether this is the last chunk\n */\n Unzip.prototype.push = function (chunk, final) {\n var _this = this;\n if (!this.onfile) err(5);\n if (!this.p) err(4);\n if (this.c > 0) {\n var len = Math.min(this.c, chunk.length);\n var toAdd = chunk.subarray(0, len);\n this.c -= len;\n if (this.d) this.d.push(toAdd, !this.c);else this.k[0].push(toAdd);\n chunk = chunk.subarray(len);\n if (chunk.length) return this.push(chunk, final);\n } else {\n var f = 0,\n i = 0,\n is = void 0,\n buf = void 0;\n if (!this.p.length) buf = chunk;else if (!chunk.length) buf = this.p;else {\n buf = new u8(this.p.length + chunk.length);\n buf.set(this.p), buf.set(chunk, this.p.length);\n }\n var l = buf.length,\n oc = this.c,\n add = oc && this.d;\n var _loop_2 = function () {\n var _a;\n var sig = b4(buf, i);\n if (sig == 0x4034B50) {\n f = 1, is = i;\n this_1.d = null;\n this_1.c = 0;\n var bf = b2(buf, i + 6),\n cmp_1 = b2(buf, i + 8),\n u = bf & 2048,\n dd = bf & 8,\n fnl = b2(buf, i + 26),\n es = b2(buf, i + 28);\n if (l > i + 30 + fnl + es) {\n var chks_3 = [];\n this_1.k.unshift(chks_3);\n f = 2;\n var sc_1 = b4(buf, i + 18),\n su_1 = b4(buf, i + 22);\n var fn_1 = strFromU8(buf.subarray(i + 30, i += 30 + fnl), !u);\n if (sc_1 == 4294967295) {\n _a = dd ? [-2] : z64e(buf, i), sc_1 = _a[0], su_1 = _a[1];\n } else if (dd) sc_1 = -1;\n i += es;\n this_1.c = sc_1;\n var d_1;\n var file_1 = {\n name: fn_1,\n compression: cmp_1,\n start: function () {\n if (!file_1.ondata) err(5);\n if (!sc_1) file_1.ondata(null, et, true);else {\n var ctr = _this.o[cmp_1];\n if (!ctr) file_1.ondata(err(14, 'unknown compression type ' + cmp_1, 1), null, false);\n d_1 = sc_1 < 0 ? new ctr(fn_1) : new ctr(fn_1, sc_1, su_1);\n d_1.ondata = function (err, dat, final) {\n file_1.ondata(err, dat, final);\n };\n for (var _i = 0, chks_4 = chks_3; _i < chks_4.length; _i++) {\n var dat = chks_4[_i];\n d_1.push(dat, false);\n }\n if (_this.k[0] == chks_3 && _this.c) _this.d = d_1;else d_1.push(et, true);\n }\n },\n terminate: function () {\n if (d_1 && d_1.terminate) d_1.terminate();\n }\n };\n if (sc_1 >= 0) file_1.size = sc_1, file_1.originalSize = su_1;\n this_1.onfile(file_1);\n }\n return \"break\";\n } else if (oc) {\n if (sig == 0x8074B50) {\n is = i += 12 + (oc == -2 && 8), f = 3, this_1.c = 0;\n return \"break\";\n } else if (sig == 0x2014B50) {\n is = i -= 4, f = 3, this_1.c = 0;\n return \"break\";\n }\n }\n };\n var this_1 = this;\n for (; i < l - 4; ++i) {\n var state_1 = _loop_2();\n if (state_1 === \"break\") break;\n }\n this.p = et;\n if (oc < 0) {\n var dat = f ? buf.subarray(0, is - 12 - (oc == -2 && 8) - (b4(buf, is - 16) == 0x8074B50 && 4)) : buf.subarray(0, i);\n if (add) add.push(dat, !!f);else this.k[+(f == 2)].push(dat);\n }\n if (f & 2) return this.push(buf.subarray(i), final);\n this.p = buf.subarray(i);\n }\n if (final) {\n if (this.c) err(13);\n this.p = null;\n }\n };\n /**\n * Registers a decoder with the stream, allowing for files compressed with\n * the compression type provided to be expanded correctly\n * @param decoder The decoder constructor\n */\n Unzip.prototype.register = function (decoder) {\n this.o[decoder.compression] = decoder;\n };\n return Unzip;\n}();\nexport { Unzip };\nvar mt = typeof queueMicrotask == 'function' ? queueMicrotask : typeof setTimeout == 'function' ? setTimeout : function (fn) {\n fn();\n};\nexport function unzip(data, opts, cb) {\n if (!cb) cb = opts, opts = {};\n if (typeof cb != 'function') err(7);\n var term = [];\n var tAll = function () {\n for (var i = 0; i < term.length; ++i) term[i]();\n };\n var files = {};\n var cbd = function (a, b) {\n mt(function () {\n cb(a, b);\n });\n };\n mt(function () {\n cbd = cb;\n });\n var e = data.length - 22;\n for (; b4(data, e) != 0x6054B50; --e) {\n if (!e || data.length - e > 65558) {\n cbd(err(13, 0, 1), null);\n return tAll;\n }\n }\n ;\n var lft = b2(data, e + 8);\n if (lft) {\n var c = lft;\n var o = b4(data, e + 16);\n var z = o == 4294967295 || c == 65535;\n if (z) {\n var ze = b4(data, e - 12);\n z = b4(data, ze) == 0x6064B50;\n if (z) {\n c = lft = b4(data, ze + 32);\n o = b4(data, ze + 48);\n }\n }\n var fltr = opts && opts.filter;\n var _loop_3 = function (i) {\n var _a = zh(data, o, z),\n c_1 = _a[0],\n sc = _a[1],\n su = _a[2],\n fn = _a[3],\n no = _a[4],\n off = _a[5],\n b = slzh(data, off);\n o = no;\n var cbl = function (e, d) {\n if (e) {\n tAll();\n cbd(e, null);\n } else {\n if (d) files[fn] = d;\n if (! --lft) cbd(null, files);\n }\n };\n if (!fltr || fltr({\n name: fn,\n size: sc,\n originalSize: su,\n compression: c_1\n })) {\n if (!c_1) cbl(null, slc(data, b, b + sc));else if (c_1 == 8) {\n var infl = data.subarray(b, b + sc);\n // Synchronously decompress under 512KB, or barely-compressed data\n if (su < 524288 || sc > 0.8 * su) {\n try {\n cbl(null, inflateSync(infl, {\n out: new u8(su)\n }));\n } catch (e) {\n cbl(e, null);\n }\n } else term.push(inflate(infl, {\n size: su\n }, cbl));\n } else cbl(err(14, 'unknown compression type ' + c_1, 1), null);\n } else cbl(null, null);\n };\n for (var i = 0; i < c; ++i) {\n _loop_3(i);\n }\n } else cbd(null, {});\n return tAll;\n}\n/**\n * Synchronously decompresses a ZIP archive. Prefer using `unzip` for better\n * performance with more than one file.\n * @param data The raw compressed ZIP file\n * @param opts The ZIP extraction options\n * @returns The decompressed files\n */\nexport function unzipSync(data, opts) {\n var files = {};\n var e = data.length - 22;\n for (; b4(data, e) != 0x6054B50; --e) {\n if (!e || data.length - e > 65558) err(13);\n }\n ;\n var c = b2(data, e + 8);\n if (!c) return {};\n var o = b4(data, e + 16);\n var z = o == 4294967295 || c == 65535;\n if (z) {\n var ze = b4(data, e - 12);\n z = b4(data, ze) == 0x6064B50;\n if (z) {\n c = b4(data, ze + 32);\n o = b4(data, ze + 48);\n }\n }\n var fltr = opts && opts.filter;\n for (var i = 0; i < c; ++i) {\n var _a = zh(data, o, z),\n c_2 = _a[0],\n sc = _a[1],\n su = _a[2],\n fn = _a[3],\n no = _a[4],\n off = _a[5],\n b = slzh(data, off);\n o = no;\n if (!fltr || fltr({\n name: fn,\n size: sc,\n originalSize: su,\n compression: c_2\n })) {\n if (!c_2) files[fn] = slc(data, b, b + sc);else if (c_2 == 8) files[fn] = inflateSync(data.subarray(b, b + sc), {\n out: new u8(su)\n });else err(14, 'unknown compression type ' + c_2);\n }\n }\n return files;\n}","/** @license\n *\n * jsPDF - PDF Document creation from JavaScript\n * Version 2.5.2 Built on 2024-09-17T13:29:57.859Z\n * CommitID 00000000\n *\n * Copyright (c) 2010-2021 James Hall , https://github.com/MrRio/jsPDF\n * 2015-2021 yWorks GmbH, http://www.yworks.com\n * 2015-2021 Lukas Holländer , https://github.com/HackbrettXXX\n * 2016-2018 Aras Abbasi \n * 2010 Aaron Spike, https://github.com/acspike\n * 2012 Willow Systems Corporation, https://github.com/willowsystems\n * 2012 Pablo Hess, https://github.com/pablohess\n * 2012 Florian Jenett, https://github.com/fjenett\n * 2013 Warren Weckesser, https://github.com/warrenweckesser\n * 2013 Youssef Beddad, https://github.com/lifof\n * 2013 Lee Driscoll, https://github.com/lsdriscoll\n * 2013 Stefan Slonevskiy, https://github.com/stefslon\n * 2013 Jeremy Morel, https://github.com/jmorel\n * 2013 Christoph Hartmann, https://github.com/chris-rock\n * 2014 Juan Pablo Gaviria, https://github.com/juanpgaviria\n * 2014 James Makes, https://github.com/dollaruw\n * 2014 Diego Casorran, https://github.com/diegocr\n * 2014 Steven Spungin, https://github.com/Flamenco\n * 2014 Kenneth Glassey, https://github.com/Gavvers\n *\n * Permission is hereby granted, free of charge, to any person obtaining\n * a copy of this software and associated documentation files (the\n * \"Software\"), to deal in the Software without restriction, including\n * without limitation the rights to use, copy, modify, merge, publish,\n * distribute, sublicense, and/or sell copies of the Software, and to\n * permit persons to whom the Software is furnished to do so, subject to\n * the following conditions:\n *\n * The above copyright notice and this permission notice shall be\n * included in all copies or substantial portions of the Software.\n *\n * THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND,\n * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF\n * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND\n * NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE\n * LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION\n * OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION\n * WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.\n *\n * Contributor(s):\n * siefkenj, ahwolf, rickygu, Midnith, saintclair, eaparango,\n * kim3er, mfo, alnorth, Flamenco\n */\n\nimport t from \"@babel/runtime/helpers/typeof\";\nimport { zlibSync as e, unzlibSync as r } from \"fflate\";\nvar n = function () {\n return \"undefined\" != typeof window ? window : \"undefined\" != typeof global ? global : \"undefined\" != typeof self ? self : this;\n}();\nfunction i() {\n n.console && \"function\" == typeof n.console.log && n.console.log.apply(n.console, arguments);\n}\nvar a = {\n log: i,\n warn: function (t) {\n n.console && (\"function\" == typeof n.console.warn ? n.console.warn.apply(n.console, arguments) : i.call(null, arguments));\n },\n error: function (t) {\n n.console && (\"function\" == typeof n.console.error ? n.console.error.apply(n.console, arguments) : i(t));\n }\n};\nfunction o(t, e, r) {\n var n = new XMLHttpRequest();\n n.open(\"GET\", t), n.responseType = \"blob\", n.onload = function () {\n l(n.response, e, r);\n }, n.onerror = function () {\n a.error(\"could not download file\");\n }, n.send();\n}\nfunction s(t) {\n var e = new XMLHttpRequest();\n e.open(\"HEAD\", t, !1);\n try {\n e.send();\n } catch (t) {}\n return e.status >= 200 && e.status <= 299;\n}\nfunction c(t) {\n try {\n t.dispatchEvent(new MouseEvent(\"click\"));\n } catch (r) {\n var e = document.createEvent(\"MouseEvents\");\n e.initMouseEvent(\"click\", !0, !0, window, 0, 0, 0, 80, 20, !1, !1, !1, !1, 0, null), t.dispatchEvent(e);\n }\n}\nvar u,\n h,\n l = n.saveAs || (\"object\" !== (\"undefined\" == typeof window ? \"undefined\" : t(window)) || window !== n ? function () {} : \"undefined\" != typeof HTMLAnchorElement && \"download\" in HTMLAnchorElement.prototype ? function (t, e, r) {\n var i = n.URL || n.webkitURL,\n a = document.createElement(\"a\");\n e = e || t.name || \"download\", a.download = e, a.rel = \"noopener\", \"string\" == typeof t ? (a.href = t, a.origin !== location.origin ? s(a.href) ? o(t, e, r) : c(a, a.target = \"_blank\") : c(a)) : (a.href = i.createObjectURL(t), setTimeout(function () {\n i.revokeObjectURL(a.href);\n }, 4e4), setTimeout(function () {\n c(a);\n }, 0));\n } : \"msSaveOrOpenBlob\" in navigator ? function (e, r, n) {\n if (r = r || e.name || \"download\", \"string\" == typeof e) {\n if (s(e)) o(e, r, n);else {\n var i = document.createElement(\"a\");\n i.href = e, i.target = \"_blank\", setTimeout(function () {\n c(i);\n });\n }\n } else navigator.msSaveOrOpenBlob(function (e, r) {\n return void 0 === r ? r = {\n autoBom: !1\n } : \"object\" !== t(r) && (a.warn(\"Deprecated: Expected third argument to be a object\"), r = {\n autoBom: !r\n }), r.autoBom && /^\\s*(?:text\\/\\S*|application\\/xml|\\S*\\/\\S*\\+xml)\\s*;.*charset\\s*=\\s*utf-8/i.test(e.type) ? new Blob([String.fromCharCode(65279), e], {\n type: e.type\n }) : e;\n }(e, n), r);\n } : function (e, r, i, a) {\n if ((a = a || open(\"\", \"_blank\")) && (a.document.title = a.document.body.innerText = \"downloading...\"), \"string\" == typeof e) return o(e, r, i);\n var s = \"application/octet-stream\" === e.type,\n c = /constructor/i.test(n.HTMLElement) || n.safari,\n u = /CriOS\\/[\\d]+/.test(navigator.userAgent);\n if ((u || s && c) && \"object\" === (\"undefined\" == typeof FileReader ? \"undefined\" : t(FileReader))) {\n var h = new FileReader();\n h.onloadend = function () {\n var t = h.result;\n t = u ? t : t.replace(/^data:[^;]*;/, \"data:attachment/file;\"), a ? a.location.href = t : location = t, a = null;\n }, h.readAsDataURL(e);\n } else {\n var l = n.URL || n.webkitURL,\n f = l.createObjectURL(e);\n a ? a.location = f : location.href = f, a = null, setTimeout(function () {\n l.revokeObjectURL(f);\n }, 4e4);\n }\n });\n/**\n * A class to parse color values\n * @author Stoyan Stefanov \n * {@link http://www.phpied.com/rgb-color-parser-in-javascript/}\n * @license Use it if you like it\n */\nfunction f(t) {\n var e;\n t = t || \"\", this.ok = !1, \"#\" == t.charAt(0) && (t = t.substr(1, 6));\n t = {\n aliceblue: \"f0f8ff\",\n antiquewhite: \"faebd7\",\n aqua: \"00ffff\",\n aquamarine: \"7fffd4\",\n azure: \"f0ffff\",\n beige: \"f5f5dc\",\n bisque: \"ffe4c4\",\n black: \"000000\",\n blanchedalmond: \"ffebcd\",\n blue: \"0000ff\",\n blueviolet: \"8a2be2\",\n brown: \"a52a2a\",\n burlywood: \"deb887\",\n cadetblue: \"5f9ea0\",\n chartreuse: \"7fff00\",\n chocolate: \"d2691e\",\n coral: \"ff7f50\",\n cornflowerblue: \"6495ed\",\n cornsilk: \"fff8dc\",\n crimson: \"dc143c\",\n cyan: \"00ffff\",\n darkblue: \"00008b\",\n darkcyan: \"008b8b\",\n darkgoldenrod: \"b8860b\",\n darkgray: \"a9a9a9\",\n darkgreen: \"006400\",\n darkkhaki: \"bdb76b\",\n darkmagenta: \"8b008b\",\n darkolivegreen: \"556b2f\",\n darkorange: \"ff8c00\",\n darkorchid: \"9932cc\",\n darkred: \"8b0000\",\n darksalmon: \"e9967a\",\n darkseagreen: \"8fbc8f\",\n darkslateblue: \"483d8b\",\n darkslategray: \"2f4f4f\",\n darkturquoise: \"00ced1\",\n darkviolet: \"9400d3\",\n deeppink: \"ff1493\",\n deepskyblue: \"00bfff\",\n dimgray: \"696969\",\n dodgerblue: \"1e90ff\",\n feldspar: \"d19275\",\n firebrick: \"b22222\",\n floralwhite: \"fffaf0\",\n forestgreen: \"228b22\",\n fuchsia: \"ff00ff\",\n gainsboro: \"dcdcdc\",\n ghostwhite: \"f8f8ff\",\n gold: \"ffd700\",\n goldenrod: \"daa520\",\n gray: \"808080\",\n green: \"008000\",\n greenyellow: \"adff2f\",\n honeydew: \"f0fff0\",\n hotpink: \"ff69b4\",\n indianred: \"cd5c5c\",\n indigo: \"4b0082\",\n ivory: \"fffff0\",\n khaki: \"f0e68c\",\n lavender: \"e6e6fa\",\n lavenderblush: \"fff0f5\",\n lawngreen: \"7cfc00\",\n lemonchiffon: \"fffacd\",\n lightblue: \"add8e6\",\n lightcoral: \"f08080\",\n lightcyan: \"e0ffff\",\n lightgoldenrodyellow: \"fafad2\",\n lightgrey: \"d3d3d3\",\n lightgreen: \"90ee90\",\n lightpink: \"ffb6c1\",\n lightsalmon: \"ffa07a\",\n lightseagreen: \"20b2aa\",\n lightskyblue: \"87cefa\",\n lightslateblue: \"8470ff\",\n lightslategray: \"778899\",\n lightsteelblue: \"b0c4de\",\n lightyellow: \"ffffe0\",\n lime: \"00ff00\",\n limegreen: \"32cd32\",\n linen: \"faf0e6\",\n magenta: \"ff00ff\",\n maroon: \"800000\",\n mediumaquamarine: \"66cdaa\",\n mediumblue: \"0000cd\",\n mediumorchid: \"ba55d3\",\n mediumpurple: \"9370d8\",\n mediumseagreen: \"3cb371\",\n mediumslateblue: \"7b68ee\",\n mediumspringgreen: \"00fa9a\",\n mediumturquoise: \"48d1cc\",\n mediumvioletred: \"c71585\",\n midnightblue: \"191970\",\n mintcream: \"f5fffa\",\n mistyrose: \"ffe4e1\",\n moccasin: \"ffe4b5\",\n navajowhite: \"ffdead\",\n navy: \"000080\",\n oldlace: \"fdf5e6\",\n olive: \"808000\",\n olivedrab: \"6b8e23\",\n orange: \"ffa500\",\n orangered: \"ff4500\",\n orchid: \"da70d6\",\n palegoldenrod: \"eee8aa\",\n palegreen: \"98fb98\",\n paleturquoise: \"afeeee\",\n palevioletred: \"d87093\",\n papayawhip: \"ffefd5\",\n peachpuff: \"ffdab9\",\n peru: \"cd853f\",\n pink: \"ffc0cb\",\n plum: \"dda0dd\",\n powderblue: \"b0e0e6\",\n purple: \"800080\",\n red: \"ff0000\",\n rosybrown: \"bc8f8f\",\n royalblue: \"4169e1\",\n saddlebrown: \"8b4513\",\n salmon: \"fa8072\",\n sandybrown: \"f4a460\",\n seagreen: \"2e8b57\",\n seashell: \"fff5ee\",\n sienna: \"a0522d\",\n silver: \"c0c0c0\",\n skyblue: \"87ceeb\",\n slateblue: \"6a5acd\",\n slategray: \"708090\",\n snow: \"fffafa\",\n springgreen: \"00ff7f\",\n steelblue: \"4682b4\",\n tan: \"d2b48c\",\n teal: \"008080\",\n thistle: \"d8bfd8\",\n tomato: \"ff6347\",\n turquoise: \"40e0d0\",\n violet: \"ee82ee\",\n violetred: \"d02090\",\n wheat: \"f5deb3\",\n white: \"ffffff\",\n whitesmoke: \"f5f5f5\",\n yellow: \"ffff00\",\n yellowgreen: \"9acd32\"\n }[t = (t = t.replace(/ /g, \"\")).toLowerCase()] || t;\n for (var r = [{\n re: /^rgb\\((\\d{1,3}),\\s*(\\d{1,3}),\\s*(\\d{1,3})\\)$/,\n example: [\"rgb(123, 234, 45)\", \"rgb(255,234,245)\"],\n process: function (t) {\n return [parseInt(t[1]), parseInt(t[2]), parseInt(t[3])];\n }\n }, {\n re: /^(\\w{2})(\\w{2})(\\w{2})$/,\n example: [\"#00ff00\", \"336699\"],\n process: function (t) {\n return [parseInt(t[1], 16), parseInt(t[2], 16), parseInt(t[3], 16)];\n }\n }, {\n re: /^(\\w{1})(\\w{1})(\\w{1})$/,\n example: [\"#fb0\", \"f0f\"],\n process: function (t) {\n return [parseInt(t[1] + t[1], 16), parseInt(t[2] + t[2], 16), parseInt(t[3] + t[3], 16)];\n }\n }], n = 0; n < r.length; n++) {\n var i = r[n].re,\n a = r[n].process,\n o = i.exec(t);\n o && (e = a(o), this.r = e[0], this.g = e[1], this.b = e[2], this.ok = !0);\n }\n this.r = this.r < 0 || isNaN(this.r) ? 0 : this.r > 255 ? 255 : this.r, this.g = this.g < 0 || isNaN(this.g) ? 0 : this.g > 255 ? 255 : this.g, this.b = this.b < 0 || isNaN(this.b) ? 0 : this.b > 255 ? 255 : this.b, this.toRGB = function () {\n return \"rgb(\" + this.r + \", \" + this.g + \", \" + this.b + \")\";\n }, this.toHex = function () {\n var t = this.r.toString(16),\n e = this.g.toString(16),\n r = this.b.toString(16);\n return 1 == t.length && (t = \"0\" + t), 1 == e.length && (e = \"0\" + e), 1 == r.length && (r = \"0\" + r), \"#\" + t + e + r;\n };\n}\n/**\n * @license\n * Joseph Myers does not specify a particular license for his work.\n *\n * Author: Joseph Myers\n * Accessed from: http://www.myersdaily.org/joseph/javascript/md5.js\n *\n * Modified by: Owen Leong\n */\nfunction d(t, e) {\n var r = t[0],\n n = t[1],\n i = t[2],\n a = t[3];\n r = g(r, n, i, a, e[0], 7, -680876936), a = g(a, r, n, i, e[1], 12, -389564586), i = g(i, a, r, n, e[2], 17, 606105819), n = g(n, i, a, r, e[3], 22, -1044525330), r = g(r, n, i, a, e[4], 7, -176418897), a = g(a, r, n, i, e[5], 12, 1200080426), i = g(i, a, r, n, e[6], 17, -1473231341), n = g(n, i, a, r, e[7], 22, -45705983), r = g(r, n, i, a, e[8], 7, 1770035416), a = g(a, r, n, i, e[9], 12, -1958414417), i = g(i, a, r, n, e[10], 17, -42063), n = g(n, i, a, r, e[11], 22, -1990404162), r = g(r, n, i, a, e[12], 7, 1804603682), a = g(a, r, n, i, e[13], 12, -40341101), i = g(i, a, r, n, e[14], 17, -1502002290), r = m(r, n = g(n, i, a, r, e[15], 22, 1236535329), i, a, e[1], 5, -165796510), a = m(a, r, n, i, e[6], 9, -1069501632), i = m(i, a, r, n, e[11], 14, 643717713), n = m(n, i, a, r, e[0], 20, -373897302), r = m(r, n, i, a, e[5], 5, -701558691), a = m(a, r, n, i, e[10], 9, 38016083), i = m(i, a, r, n, e[15], 14, -660478335), n = m(n, i, a, r, e[4], 20, -405537848), r = m(r, n, i, a, e[9], 5, 568446438), a = m(a, r, n, i, e[14], 9, -1019803690), i = m(i, a, r, n, e[3], 14, -187363961), n = m(n, i, a, r, e[8], 20, 1163531501), r = m(r, n, i, a, e[13], 5, -1444681467), a = m(a, r, n, i, e[2], 9, -51403784), i = m(i, a, r, n, e[7], 14, 1735328473), r = v(r, n = m(n, i, a, r, e[12], 20, -1926607734), i, a, e[5], 4, -378558), a = v(a, r, n, i, e[8], 11, -2022574463), i = v(i, a, r, n, e[11], 16, 1839030562), n = v(n, i, a, r, e[14], 23, -35309556), r = v(r, n, i, a, e[1], 4, -1530992060), a = v(a, r, n, i, e[4], 11, 1272893353), i = v(i, a, r, n, e[7], 16, -155497632), n = v(n, i, a, r, e[10], 23, -1094730640), r = v(r, n, i, a, e[13], 4, 681279174), a = v(a, r, n, i, e[0], 11, -358537222), i = v(i, a, r, n, e[3], 16, -722521979), n = v(n, i, a, r, e[6], 23, 76029189), r = v(r, n, i, a, e[9], 4, -640364487), a = v(a, r, n, i, e[12], 11, -421815835), i = v(i, a, r, n, e[15], 16, 530742520), r = b(r, n = v(n, i, a, r, e[2], 23, -995338651), i, a, e[0], 6, -198630844), a = b(a, r, n, i, e[7], 10, 1126891415), i = b(i, a, r, n, e[14], 15, -1416354905), n = b(n, i, a, r, e[5], 21, -57434055), r = b(r, n, i, a, e[12], 6, 1700485571), a = b(a, r, n, i, e[3], 10, -1894986606), i = b(i, a, r, n, e[10], 15, -1051523), n = b(n, i, a, r, e[1], 21, -2054922799), r = b(r, n, i, a, e[8], 6, 1873313359), a = b(a, r, n, i, e[15], 10, -30611744), i = b(i, a, r, n, e[6], 15, -1560198380), n = b(n, i, a, r, e[13], 21, 1309151649), r = b(r, n, i, a, e[4], 6, -145523070), a = b(a, r, n, i, e[11], 10, -1120210379), i = b(i, a, r, n, e[2], 15, 718787259), n = b(n, i, a, r, e[9], 21, -343485551), t[0] = _(r, t[0]), t[1] = _(n, t[1]), t[2] = _(i, t[2]), t[3] = _(a, t[3]);\n}\nfunction p(t, e, r, n, i, a) {\n return e = _(_(e, t), _(n, a)), _(e << i | e >>> 32 - i, r);\n}\nfunction g(t, e, r, n, i, a, o) {\n return p(e & r | ~e & n, t, e, i, a, o);\n}\nfunction m(t, e, r, n, i, a, o) {\n return p(e & n | r & ~n, t, e, i, a, o);\n}\nfunction v(t, e, r, n, i, a, o) {\n return p(e ^ r ^ n, t, e, i, a, o);\n}\nfunction b(t, e, r, n, i, a, o) {\n return p(r ^ (e | ~n), t, e, i, a, o);\n}\nfunction y(t) {\n var e,\n r = t.length,\n n = [1732584193, -271733879, -1732584194, 271733878];\n for (e = 64; e <= t.length; e += 64) d(n, w(t.substring(e - 64, e)));\n t = t.substring(e - 64);\n var i = [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0];\n for (e = 0; e < t.length; e++) i[e >> 2] |= t.charCodeAt(e) << (e % 4 << 3);\n if (i[e >> 2] |= 128 << (e % 4 << 3), e > 55) for (d(n, i), e = 0; e < 16; e++) i[e] = 0;\n return i[14] = 8 * r, d(n, i), n;\n}\nfunction w(t) {\n var e,\n r = [];\n for (e = 0; e < 64; e += 4) r[e >> 2] = t.charCodeAt(e) + (t.charCodeAt(e + 1) << 8) + (t.charCodeAt(e + 2) << 16) + (t.charCodeAt(e + 3) << 24);\n return r;\n}\nu = n.atob.bind(n), h = n.btoa.bind(n);\nvar N = \"0123456789abcdef\".split(\"\");\nfunction L(t) {\n for (var e = \"\", r = 0; r < 4; r++) e += N[t >> 8 * r + 4 & 15] + N[t >> 8 * r & 15];\n return e;\n}\nfunction A(t) {\n return String.fromCharCode((255 & t) >> 0, (65280 & t) >> 8, (16711680 & t) >> 16, (4278190080 & t) >> 24);\n}\nfunction x(t) {\n return y(t).map(A).join(\"\");\n}\nvar S = \"5d41402abc4b2a76b9719d911017c592\" != function (t) {\n for (var e = 0; e < t.length; e++) t[e] = L(t[e]);\n return t.join(\"\");\n}(y(\"hello\"));\nfunction _(t, e) {\n if (S) {\n var r = (65535 & t) + (65535 & e);\n return (t >> 16) + (e >> 16) + (r >> 16) << 16 | 65535 & r;\n }\n return t + e & 4294967295;\n}\n/**\n * @license\n * FPDF is released under a permissive license: there is no usage restriction.\n * You may embed it freely in your application (commercial or not), with or\n * without modifications.\n *\n * Reference: http://www.fpdf.org/en/script/script37.php\n */\nfunction P(t, e) {\n var r, n, i, a;\n if (t !== r) {\n for (var o = (i = t, a = 1 + (256 / t.length >> 0), new Array(a + 1).join(i)), s = [], c = 0; c < 256; c++) s[c] = c;\n var u = 0;\n for (c = 0; c < 256; c++) {\n var h = s[c];\n u = (u + h + o.charCodeAt(c)) % 256, s[c] = s[u], s[u] = h;\n }\n r = t, n = s;\n } else s = n;\n var l = e.length,\n f = 0,\n d = 0,\n p = \"\";\n for (c = 0; c < l; c++) d = (d + (h = s[f = (f + 1) % 256])) % 256, s[f] = s[d], s[d] = h, o = s[(s[f] + s[d]) % 256], p += String.fromCharCode(e.charCodeAt(c) ^ o);\n return p;\n}\n/**\n * @license\n * Licensed under the MIT License.\n * http://opensource.org/licenses/mit-license\n * Author: Owen Leong (@owenl131)\n * Date: 15 Oct 2020\n * References:\n * https://www.cs.cmu.edu/~dst/Adobe/Gallery/anon21jul01-pdf-encryption.txt\n * https://github.com/foliojs/pdfkit/blob/master/lib/security.js\n * http://www.fpdf.org/en/script/script37.php\n */\nvar k = {\n print: 4,\n modify: 8,\n copy: 16,\n \"annot-forms\": 32\n};\nfunction I(t, e, r, n) {\n this.v = 1, this.r = 2;\n var i = 192;\n t.forEach(function (t) {\n if (void 0 !== k.perm) throw new Error(\"Invalid permission: \" + t);\n i += k[t];\n }), this.padding = \"(¿N^NuŠAd\\0NVÿú\u0001\\b..\\0¶Ðh>€/\\f©þdSiz\";\n var a = (e + this.padding).substr(0, 32),\n o = (r + this.padding).substr(0, 32);\n this.O = this.processOwnerPassword(a, o), this.P = -(1 + (255 ^ i)), this.encryptionKey = x(a + this.O + this.lsbFirstWord(this.P) + this.hexToBytes(n)).substr(0, 5), this.U = P(this.encryptionKey, this.padding);\n}\nfunction F(t) {\n if (/[^\\u0000-\\u00ff]/.test(t)) throw new Error(\"Invalid PDF Name Object: \" + t + \", Only accept ASCII characters.\");\n for (var e = \"\", r = t.length, n = 0; n < r; n++) {\n var i = t.charCodeAt(n);\n if (i < 33 || 35 === i || 37 === i || 40 === i || 41 === i || 47 === i || 60 === i || 62 === i || 91 === i || 93 === i || 123 === i || 125 === i || i > 126) e += \"#\" + (\"0\" + i.toString(16)).slice(-2);else e += t[n];\n }\n return e;\n}\nfunction C(e) {\n if (\"object\" !== t(e)) throw new Error(\"Invalid Context passed to initialize PubSub (jsPDF-module)\");\n var r = {};\n this.subscribe = function (t, e, n) {\n if (n = n || !1, \"string\" != typeof t || \"function\" != typeof e || \"boolean\" != typeof n) throw new Error(\"Invalid arguments passed to PubSub.subscribe (jsPDF-module)\");\n r.hasOwnProperty(t) || (r[t] = {});\n var i = Math.random().toString(35);\n return r[t][i] = [e, !!n], i;\n }, this.unsubscribe = function (t) {\n for (var e in r) if (r[e][t]) return delete r[e][t], 0 === Object.keys(r[e]).length && delete r[e], !0;\n return !1;\n }, this.publish = function (t) {\n if (r.hasOwnProperty(t)) {\n var i = Array.prototype.slice.call(arguments, 1),\n o = [];\n for (var s in r[t]) {\n var c = r[t][s];\n try {\n c[0].apply(e, i);\n } catch (t) {\n n.console && a.error(\"jsPDF PubSub Error\", t.message, t);\n }\n c[1] && o.push(s);\n }\n o.length && o.forEach(this.unsubscribe);\n }\n }, this.getTopics = function () {\n return r;\n };\n}\nfunction j(t) {\n if (!(this instanceof j)) return new j(t);\n var e = \"opacity,stroke-opacity\".split(\",\");\n for (var r in t) t.hasOwnProperty(r) && e.indexOf(r) >= 0 && (this[r] = t[r]);\n this.id = \"\", this.objectNumber = -1;\n}\nfunction O(t, e) {\n this.gState = t, this.matrix = e, this.id = \"\", this.objectNumber = -1;\n}\nfunction B(t, e, r, n, i) {\n if (!(this instanceof B)) return new B(t, e, r, n, i);\n this.type = \"axial\" === t ? 2 : 3, this.coords = e, this.colors = r, O.call(this, n, i);\n}\nfunction M(t, e, r, n, i) {\n if (!(this instanceof M)) return new M(t, e, r, n, i);\n this.boundingBox = t, this.xStep = e, this.yStep = r, this.stream = \"\", this.cloneIndex = 0, O.call(this, n, i);\n}\nfunction E(e) {\n var r,\n i = \"string\" == typeof arguments[0] ? arguments[0] : \"p\",\n o = arguments[1],\n s = arguments[2],\n c = arguments[3],\n u = [],\n d = 1,\n p = 16,\n g = \"S\",\n m = null;\n \"object\" === t(e = e || {}) && (i = e.orientation, o = e.unit || o, s = e.format || s, c = e.compress || e.compressPdf || c, null !== (m = e.encryption || null) && (m.userPassword = m.userPassword || \"\", m.ownerPassword = m.ownerPassword || \"\", m.userPermissions = m.userPermissions || []), d = \"number\" == typeof e.userUnit ? Math.abs(e.userUnit) : 1, void 0 !== e.precision && (r = e.precision), void 0 !== e.floatPrecision && (p = e.floatPrecision), g = e.defaultPathOperation || \"S\"), u = e.filters || (!0 === c ? [\"FlateEncode\"] : u), o = o || \"mm\", i = (\"\" + (i || \"P\")).toLowerCase();\n var v = e.putOnlyUsedFonts || !1,\n b = {},\n y = {\n internal: {},\n __private__: {}\n };\n y.__private__.PubSub = C;\n var w = \"1.3\",\n N = y.__private__.getPdfVersion = function () {\n return w;\n };\n y.__private__.setPdfVersion = function (t) {\n w = t;\n };\n var L = {\n a0: [2383.94, 3370.39],\n a1: [1683.78, 2383.94],\n a2: [1190.55, 1683.78],\n a3: [841.89, 1190.55],\n a4: [595.28, 841.89],\n a5: [419.53, 595.28],\n a6: [297.64, 419.53],\n a7: [209.76, 297.64],\n a8: [147.4, 209.76],\n a9: [104.88, 147.4],\n a10: [73.7, 104.88],\n b0: [2834.65, 4008.19],\n b1: [2004.09, 2834.65],\n b2: [1417.32, 2004.09],\n b3: [1000.63, 1417.32],\n b4: [708.66, 1000.63],\n b5: [498.9, 708.66],\n b6: [354.33, 498.9],\n b7: [249.45, 354.33],\n b8: [175.75, 249.45],\n b9: [124.72, 175.75],\n b10: [87.87, 124.72],\n c0: [2599.37, 3676.54],\n c1: [1836.85, 2599.37],\n c2: [1298.27, 1836.85],\n c3: [918.43, 1298.27],\n c4: [649.13, 918.43],\n c5: [459.21, 649.13],\n c6: [323.15, 459.21],\n c7: [229.61, 323.15],\n c8: [161.57, 229.61],\n c9: [113.39, 161.57],\n c10: [79.37, 113.39],\n dl: [311.81, 623.62],\n letter: [612, 792],\n \"government-letter\": [576, 756],\n legal: [612, 1008],\n \"junior-legal\": [576, 360],\n ledger: [1224, 792],\n tabloid: [792, 1224],\n \"credit-card\": [153, 243]\n };\n y.__private__.getPageFormats = function () {\n return L;\n };\n var A = y.__private__.getPageFormat = function (t) {\n return L[t];\n };\n s = s || \"a4\";\n var x = {\n COMPAT: \"compat\",\n ADVANCED: \"advanced\"\n },\n S = x.COMPAT;\n function _() {\n this.saveGraphicsState(), lt(new Vt(_t, 0, 0, -_t, 0, Rr() * _t).toString() + \" cm\"), this.setFontSize(this.getFontSize() / _t), g = \"n\", S = x.ADVANCED;\n }\n function P() {\n this.restoreGraphicsState(), g = \"S\", S = x.COMPAT;\n }\n var k = y.__private__.combineFontStyleAndFontWeight = function (t, e) {\n if (\"bold\" == t && \"normal\" == e || \"bold\" == t && 400 == e || \"normal\" == t && \"italic\" == e || \"bold\" == t && \"italic\" == e) throw new Error(\"Invalid Combination of fontweight and fontstyle\");\n return e && (t = 400 == e || \"normal\" === e ? \"italic\" === t ? \"italic\" : \"normal\" : 700 != e && \"bold\" !== e || \"normal\" !== t ? (700 == e ? \"bold\" : e) + \"\" + t : \"bold\"), t;\n };\n y.advancedAPI = function (t) {\n var e = S === x.COMPAT;\n return e && _.call(this), \"function\" != typeof t || (t(this), e && P.call(this)), this;\n }, y.compatAPI = function (t) {\n var e = S === x.ADVANCED;\n return e && P.call(this), \"function\" != typeof t || (t(this), e && _.call(this)), this;\n }, y.isAdvancedAPI = function () {\n return S === x.ADVANCED;\n };\n var O,\n q = function (t) {\n if (S !== x.ADVANCED) throw new Error(t + \" is only available in 'advanced' API mode. You need to call advancedAPI() first.\");\n },\n D = y.roundToPrecision = y.__private__.roundToPrecision = function (t, e) {\n var n = r || e;\n if (isNaN(t) || isNaN(n)) throw new Error(\"Invalid argument passed to jsPDF.roundToPrecision\");\n return t.toFixed(n).replace(/0+$/, \"\");\n };\n O = y.hpf = y.__private__.hpf = \"number\" == typeof p ? function (t) {\n if (isNaN(t)) throw new Error(\"Invalid argument passed to jsPDF.hpf\");\n return D(t, p);\n } : \"smart\" === p ? function (t) {\n if (isNaN(t)) throw new Error(\"Invalid argument passed to jsPDF.hpf\");\n return D(t, t > -1 && t < 1 ? 16 : 5);\n } : function (t) {\n if (isNaN(t)) throw new Error(\"Invalid argument passed to jsPDF.hpf\");\n return D(t, 16);\n };\n var R = y.f2 = y.__private__.f2 = function (t) {\n if (isNaN(t)) throw new Error(\"Invalid argument passed to jsPDF.f2\");\n return D(t, 2);\n },\n T = y.__private__.f3 = function (t) {\n if (isNaN(t)) throw new Error(\"Invalid argument passed to jsPDF.f3\");\n return D(t, 3);\n },\n U = y.scale = y.__private__.scale = function (t) {\n if (isNaN(t)) throw new Error(\"Invalid argument passed to jsPDF.scale\");\n return S === x.COMPAT ? t * _t : S === x.ADVANCED ? t : void 0;\n },\n z = function (t) {\n return S === x.COMPAT ? Rr() - t : S === x.ADVANCED ? t : void 0;\n },\n H = function (t) {\n return U(z(t));\n };\n y.__private__.setPrecision = y.setPrecision = function (t) {\n \"number\" == typeof parseInt(t, 10) && (r = parseInt(t, 10));\n };\n var W,\n V = \"00000000000000000000000000000000\",\n G = y.__private__.getFileId = function () {\n return V;\n },\n Y = y.__private__.setFileId = function (t) {\n return V = void 0 !== t && /^[a-fA-F0-9]{32}$/.test(t) ? t.toUpperCase() : V.split(\"\").map(function () {\n return \"ABCDEF0123456789\".charAt(Math.floor(16 * Math.random()));\n }).join(\"\"), null !== m && (Ye = new I(m.userPermissions, m.userPassword, m.ownerPassword, V)), V;\n };\n y.setFileId = function (t) {\n return Y(t), this;\n }, y.getFileId = function () {\n return G();\n };\n var J = y.__private__.convertDateToPDFDate = function (t) {\n var e = t.getTimezoneOffset(),\n r = e < 0 ? \"+\" : \"-\",\n n = Math.floor(Math.abs(e / 60)),\n i = Math.abs(e % 60),\n a = [r, Q(n), \"'\", Q(i), \"'\"].join(\"\");\n return [\"D:\", t.getFullYear(), Q(t.getMonth() + 1), Q(t.getDate()), Q(t.getHours()), Q(t.getMinutes()), Q(t.getSeconds()), a].join(\"\");\n },\n X = y.__private__.convertPDFDateToDate = function (t) {\n var e = parseInt(t.substr(2, 4), 10),\n r = parseInt(t.substr(6, 2), 10) - 1,\n n = parseInt(t.substr(8, 2), 10),\n i = parseInt(t.substr(10, 2), 10),\n a = parseInt(t.substr(12, 2), 10),\n o = parseInt(t.substr(14, 2), 10);\n return new Date(e, r, n, i, a, o, 0);\n },\n K = y.__private__.setCreationDate = function (t) {\n var e;\n if (void 0 === t && (t = new Date()), t instanceof Date) e = J(t);else {\n if (!/^D:(20[0-2][0-9]|203[0-7]|19[7-9][0-9])(0[0-9]|1[0-2])([0-2][0-9]|3[0-1])(0[0-9]|1[0-9]|2[0-3])(0[0-9]|[1-5][0-9])(0[0-9]|[1-5][0-9])(\\+0[0-9]|\\+1[0-4]|-0[0-9]|-1[0-1])'(0[0-9]|[1-5][0-9])'?$/.test(t)) throw new Error(\"Invalid argument passed to jsPDF.setCreationDate\");\n e = t;\n }\n return W = e;\n },\n Z = y.__private__.getCreationDate = function (t) {\n var e = W;\n return \"jsDate\" === t && (e = X(W)), e;\n };\n y.setCreationDate = function (t) {\n return K(t), this;\n }, y.getCreationDate = function (t) {\n return Z(t);\n };\n var $,\n Q = y.__private__.padd2 = function (t) {\n return (\"0\" + parseInt(t)).slice(-2);\n },\n tt = y.__private__.padd2Hex = function (t) {\n return (\"00\" + (t = t.toString())).substr(t.length);\n },\n et = 0,\n rt = [],\n nt = [],\n it = 0,\n at = [],\n ot = [],\n st = !1,\n ct = nt,\n ut = function () {\n et = 0, it = 0, nt = [], rt = [], at = [], Qt = Kt(), te = Kt();\n };\n y.__private__.setCustomOutputDestination = function (t) {\n st = !0, ct = t;\n };\n var ht = function (t) {\n st || (ct = t);\n };\n y.__private__.resetCustomOutputDestination = function () {\n st = !1, ct = nt;\n };\n var lt = y.__private__.out = function (t) {\n return t = t.toString(), it += t.length + 1, ct.push(t), ct;\n },\n ft = y.__private__.write = function (t) {\n return lt(1 === arguments.length ? t.toString() : Array.prototype.join.call(arguments, \" \"));\n },\n dt = y.__private__.getArrayBuffer = function (t) {\n for (var e = t.length, r = new ArrayBuffer(e), n = new Uint8Array(r); e--;) n[e] = t.charCodeAt(e);\n return r;\n },\n pt = [[\"Helvetica\", \"helvetica\", \"normal\", \"WinAnsiEncoding\"], [\"Helvetica-Bold\", \"helvetica\", \"bold\", \"WinAnsiEncoding\"], [\"Helvetica-Oblique\", \"helvetica\", \"italic\", \"WinAnsiEncoding\"], [\"Helvetica-BoldOblique\", \"helvetica\", \"bolditalic\", \"WinAnsiEncoding\"], [\"Courier\", \"courier\", \"normal\", \"WinAnsiEncoding\"], [\"Courier-Bold\", \"courier\", \"bold\", \"WinAnsiEncoding\"], [\"Courier-Oblique\", \"courier\", \"italic\", \"WinAnsiEncoding\"], [\"Courier-BoldOblique\", \"courier\", \"bolditalic\", \"WinAnsiEncoding\"], [\"Times-Roman\", \"times\", \"normal\", \"WinAnsiEncoding\"], [\"Times-Bold\", \"times\", \"bold\", \"WinAnsiEncoding\"], [\"Times-Italic\", \"times\", \"italic\", \"WinAnsiEncoding\"], [\"Times-BoldItalic\", \"times\", \"bolditalic\", \"WinAnsiEncoding\"], [\"ZapfDingbats\", \"zapfdingbats\", \"normal\", null], [\"Symbol\", \"symbol\", \"normal\", null]];\n y.__private__.getStandardFonts = function () {\n return pt;\n };\n var gt = e.fontSize || 16;\n y.__private__.setFontSize = y.setFontSize = function (t) {\n return gt = S === x.ADVANCED ? t / _t : t, this;\n };\n var mt,\n vt = y.__private__.getFontSize = y.getFontSize = function () {\n return S === x.COMPAT ? gt : gt * _t;\n },\n bt = e.R2L || !1;\n y.__private__.setR2L = y.setR2L = function (t) {\n return bt = t, this;\n }, y.__private__.getR2L = y.getR2L = function () {\n return bt;\n };\n var yt,\n wt = y.__private__.setZoomMode = function (t) {\n var e = [void 0, null, \"fullwidth\", \"fullheight\", \"fullpage\", \"original\"];\n if (/^(?:\\d+\\.\\d*|\\d*\\.\\d+|\\d+)%$/.test(t)) mt = t;else if (isNaN(t)) {\n if (-1 === e.indexOf(t)) throw new Error('zoom must be Integer (e.g. 2), a percentage Value (e.g. 300%) or fullwidth, fullheight, fullpage, original. \"' + t + '\" is not recognized.');\n mt = t;\n } else mt = parseInt(t, 10);\n };\n y.__private__.getZoomMode = function () {\n return mt;\n };\n var Nt,\n Lt = y.__private__.setPageMode = function (t) {\n if (-1 == [void 0, null, \"UseNone\", \"UseOutlines\", \"UseThumbs\", \"FullScreen\"].indexOf(t)) throw new Error('Page mode must be one of UseNone, UseOutlines, UseThumbs, or FullScreen. \"' + t + '\" is not recognized.');\n yt = t;\n };\n y.__private__.getPageMode = function () {\n return yt;\n };\n var At = y.__private__.setLayoutMode = function (t) {\n if (-1 == [void 0, null, \"continuous\", \"single\", \"twoleft\", \"tworight\", \"two\"].indexOf(t)) throw new Error('Layout mode must be one of continuous, single, twoleft, tworight. \"' + t + '\" is not recognized.');\n Nt = t;\n };\n y.__private__.getLayoutMode = function () {\n return Nt;\n }, y.__private__.setDisplayMode = y.setDisplayMode = function (t, e, r) {\n return wt(t), At(e), Lt(r), this;\n };\n var xt = {\n title: \"\",\n subject: \"\",\n author: \"\",\n keywords: \"\",\n creator: \"\"\n };\n y.__private__.getDocumentProperty = function (t) {\n if (-1 === Object.keys(xt).indexOf(t)) throw new Error(\"Invalid argument passed to jsPDF.getDocumentProperty\");\n return xt[t];\n }, y.__private__.getDocumentProperties = function () {\n return xt;\n }, y.__private__.setDocumentProperties = y.setProperties = y.setDocumentProperties = function (t) {\n for (var e in xt) xt.hasOwnProperty(e) && t[e] && (xt[e] = t[e]);\n return this;\n }, y.__private__.setDocumentProperty = function (t, e) {\n if (-1 === Object.keys(xt).indexOf(t)) throw new Error(\"Invalid arguments passed to jsPDF.setDocumentProperty\");\n return xt[t] = e;\n };\n var St,\n _t,\n Pt,\n kt,\n It,\n Ft = {},\n Ct = {},\n jt = [],\n Ot = {},\n Bt = {},\n Mt = {},\n Et = {},\n qt = null,\n Dt = 0,\n Rt = [],\n Tt = new C(y),\n Ut = e.hotfixes || [],\n zt = {},\n Ht = {},\n Wt = [],\n Vt = function t(e, r, n, i, a, o) {\n if (!(this instanceof t)) return new t(e, r, n, i, a, o);\n isNaN(e) && (e = 1), isNaN(r) && (r = 0), isNaN(n) && (n = 0), isNaN(i) && (i = 1), isNaN(a) && (a = 0), isNaN(o) && (o = 0), this._matrix = [e, r, n, i, a, o];\n };\n Object.defineProperty(Vt.prototype, \"sx\", {\n get: function () {\n return this._matrix[0];\n },\n set: function (t) {\n this._matrix[0] = t;\n }\n }), Object.defineProperty(Vt.prototype, \"shy\", {\n get: function () {\n return this._matrix[1];\n },\n set: function (t) {\n this._matrix[1] = t;\n }\n }), Object.defineProperty(Vt.prototype, \"shx\", {\n get: function () {\n return this._matrix[2];\n },\n set: function (t) {\n this._matrix[2] = t;\n }\n }), Object.defineProperty(Vt.prototype, \"sy\", {\n get: function () {\n return this._matrix[3];\n },\n set: function (t) {\n this._matrix[3] = t;\n }\n }), Object.defineProperty(Vt.prototype, \"tx\", {\n get: function () {\n return this._matrix[4];\n },\n set: function (t) {\n this._matrix[4] = t;\n }\n }), Object.defineProperty(Vt.prototype, \"ty\", {\n get: function () {\n return this._matrix[5];\n },\n set: function (t) {\n this._matrix[5] = t;\n }\n }), Object.defineProperty(Vt.prototype, \"a\", {\n get: function () {\n return this._matrix[0];\n },\n set: function (t) {\n this._matrix[0] = t;\n }\n }), Object.defineProperty(Vt.prototype, \"b\", {\n get: function () {\n return this._matrix[1];\n },\n set: function (t) {\n this._matrix[1] = t;\n }\n }), Object.defineProperty(Vt.prototype, \"c\", {\n get: function () {\n return this._matrix[2];\n },\n set: function (t) {\n this._matrix[2] = t;\n }\n }), Object.defineProperty(Vt.prototype, \"d\", {\n get: function () {\n return this._matrix[3];\n },\n set: function (t) {\n this._matrix[3] = t;\n }\n }), Object.defineProperty(Vt.prototype, \"e\", {\n get: function () {\n return this._matrix[4];\n },\n set: function (t) {\n this._matrix[4] = t;\n }\n }), Object.defineProperty(Vt.prototype, \"f\", {\n get: function () {\n return this._matrix[5];\n },\n set: function (t) {\n this._matrix[5] = t;\n }\n }), Object.defineProperty(Vt.prototype, \"rotation\", {\n get: function () {\n return Math.atan2(this.shx, this.sx);\n }\n }), Object.defineProperty(Vt.prototype, \"scaleX\", {\n get: function () {\n return this.decompose().scale.sx;\n }\n }), Object.defineProperty(Vt.prototype, \"scaleY\", {\n get: function () {\n return this.decompose().scale.sy;\n }\n }), Object.defineProperty(Vt.prototype, \"isIdentity\", {\n get: function () {\n return 1 === this.sx && 0 === this.shy && 0 === this.shx && 1 === this.sy && 0 === this.tx && 0 === this.ty;\n }\n }), Vt.prototype.join = function (t) {\n return [this.sx, this.shy, this.shx, this.sy, this.tx, this.ty].map(O).join(t);\n }, Vt.prototype.multiply = function (t) {\n var e = t.sx * this.sx + t.shy * this.shx,\n r = t.sx * this.shy + t.shy * this.sy,\n n = t.shx * this.sx + t.sy * this.shx,\n i = t.shx * this.shy + t.sy * this.sy,\n a = t.tx * this.sx + t.ty * this.shx + this.tx,\n o = t.tx * this.shy + t.ty * this.sy + this.ty;\n return new Vt(e, r, n, i, a, o);\n }, Vt.prototype.decompose = function () {\n var t = this.sx,\n e = this.shy,\n r = this.shx,\n n = this.sy,\n i = this.tx,\n a = this.ty,\n o = Math.sqrt(t * t + e * e),\n s = (t /= o) * r + (e /= o) * n;\n r -= t * s, n -= e * s;\n var c = Math.sqrt(r * r + n * n);\n return s /= c, t * (n /= c) < e * (r /= c) && (t = -t, e = -e, s = -s, o = -o), {\n scale: new Vt(o, 0, 0, c, 0, 0),\n translate: new Vt(1, 0, 0, 1, i, a),\n rotate: new Vt(t, e, -e, t, 0, 0),\n skew: new Vt(1, 0, s, 1, 0, 0)\n };\n }, Vt.prototype.toString = function (t) {\n return this.join(\" \");\n }, Vt.prototype.inversed = function () {\n var t = this.sx,\n e = this.shy,\n r = this.shx,\n n = this.sy,\n i = this.tx,\n a = this.ty,\n o = 1 / (t * n - e * r),\n s = n * o,\n c = -e * o,\n u = -r * o,\n h = t * o;\n return new Vt(s, c, u, h, -s * i - u * a, -c * i - h * a);\n }, Vt.prototype.applyToPoint = function (t) {\n var e = t.x * this.sx + t.y * this.shx + this.tx,\n r = t.x * this.shy + t.y * this.sy + this.ty;\n return new Cr(e, r);\n }, Vt.prototype.applyToRectangle = function (t) {\n var e = this.applyToPoint(t),\n r = this.applyToPoint(new Cr(t.x + t.w, t.y + t.h));\n return new jr(e.x, e.y, r.x - e.x, r.y - e.y);\n }, Vt.prototype.clone = function () {\n var t = this.sx,\n e = this.shy,\n r = this.shx,\n n = this.sy,\n i = this.tx,\n a = this.ty;\n return new Vt(t, e, r, n, i, a);\n }, y.Matrix = Vt;\n var Gt = y.matrixMult = function (t, e) {\n return e.multiply(t);\n },\n Yt = new Vt(1, 0, 0, 1, 0, 0);\n y.unitMatrix = y.identityMatrix = Yt;\n var Jt = function (t, e) {\n if (!Bt[t]) {\n var r = (e instanceof B ? \"Sh\" : \"P\") + (Object.keys(Ot).length + 1).toString(10);\n e.id = r, Bt[t] = r, Ot[r] = e, Tt.publish(\"addPattern\", e);\n }\n };\n y.ShadingPattern = B, y.TilingPattern = M, y.addShadingPattern = function (t, e) {\n return q(\"addShadingPattern()\"), Jt(t, e), this;\n }, y.beginTilingPattern = function (t) {\n q(\"beginTilingPattern()\"), Br(t.boundingBox[0], t.boundingBox[1], t.boundingBox[2] - t.boundingBox[0], t.boundingBox[3] - t.boundingBox[1], t.matrix);\n }, y.endTilingPattern = function (t, e) {\n q(\"endTilingPattern()\"), e.stream = ot[$].join(\"\\n\"), Jt(t, e), Tt.publish(\"endTilingPattern\", e), Wt.pop().restore();\n };\n var Xt = y.__private__.newObject = function () {\n var t = Kt();\n return Zt(t, !0), t;\n },\n Kt = y.__private__.newObjectDeferred = function () {\n return et++, rt[et] = function () {\n return it;\n }, et;\n },\n Zt = function (t, e) {\n return e = \"boolean\" == typeof e && e, rt[t] = it, e && lt(t + \" 0 obj\"), t;\n },\n $t = y.__private__.newAdditionalObject = function () {\n var t = {\n objId: Kt(),\n content: \"\"\n };\n return at.push(t), t;\n },\n Qt = Kt(),\n te = Kt(),\n ee = y.__private__.decodeColorString = function (t) {\n var e = t.split(\" \");\n if (2 !== e.length || \"g\" !== e[1] && \"G\" !== e[1]) {\n if (5 === e.length && (\"k\" === e[4] || \"K\" === e[4])) {\n e = [(1 - e[0]) * (1 - e[3]), (1 - e[1]) * (1 - e[3]), (1 - e[2]) * (1 - e[3]), \"r\"];\n }\n } else {\n var r = parseFloat(e[0]);\n e = [r, r, r, \"r\"];\n }\n for (var n = \"#\", i = 0; i < 3; i++) n += (\"0\" + Math.floor(255 * parseFloat(e[i])).toString(16)).slice(-2);\n return n;\n },\n re = y.__private__.encodeColorString = function (e) {\n var r;\n \"string\" == typeof e && (e = {\n ch1: e\n });\n var n = e.ch1,\n i = e.ch2,\n a = e.ch3,\n o = e.ch4,\n s = \"draw\" === e.pdfColorType ? [\"G\", \"RG\", \"K\"] : [\"g\", \"rg\", \"k\"];\n if (\"string\" == typeof n && \"#\" !== n.charAt(0)) {\n var c = new f(n);\n if (c.ok) n = c.toHex();else if (!/^\\d*\\.?\\d*$/.test(n)) throw new Error('Invalid color \"' + n + '\" passed to jsPDF.encodeColorString.');\n }\n if (\"string\" == typeof n && /^#[0-9A-Fa-f]{3}$/.test(n) && (n = \"#\" + n[1] + n[1] + n[2] + n[2] + n[3] + n[3]), \"string\" == typeof n && /^#[0-9A-Fa-f]{6}$/.test(n)) {\n var u = parseInt(n.substr(1), 16);\n n = u >> 16 & 255, i = u >> 8 & 255, a = 255 & u;\n }\n if (void 0 === i || void 0 === o && n === i && i === a) {\n if (\"string\" == typeof n) r = n + \" \" + s[0];else switch (e.precision) {\n case 2:\n r = R(n / 255) + \" \" + s[0];\n break;\n case 3:\n default:\n r = T(n / 255) + \" \" + s[0];\n }\n } else if (void 0 === o || \"object\" === t(o)) {\n if (o && !isNaN(o.a) && 0 === o.a) return r = [\"1.\", \"1.\", \"1.\", s[1]].join(\" \");\n if (\"string\" == typeof n) r = [n, i, a, s[1]].join(\" \");else switch (e.precision) {\n case 2:\n r = [R(n / 255), R(i / 255), R(a / 255), s[1]].join(\" \");\n break;\n default:\n case 3:\n r = [T(n / 255), T(i / 255), T(a / 255), s[1]].join(\" \");\n }\n } else if (\"string\" == typeof n) r = [n, i, a, o, s[2]].join(\" \");else switch (e.precision) {\n case 2:\n r = [R(n), R(i), R(a), R(o), s[2]].join(\" \");\n break;\n case 3:\n default:\n r = [T(n), T(i), T(a), T(o), s[2]].join(\" \");\n }\n return r;\n },\n ne = y.__private__.getFilters = function () {\n return u;\n },\n ie = y.__private__.putStream = function (t) {\n var e = (t = t || {}).data || \"\",\n r = t.filters || ne(),\n n = t.alreadyAppliedFilters || [],\n i = t.addLength1 || !1,\n a = e.length,\n o = t.objectId,\n s = function (t) {\n return t;\n };\n if (null !== m && void 0 === o) throw new Error(\"ObjectId must be passed to putStream for file encryption\");\n null !== m && (s = Ye.encryptor(o, 0));\n var c = {};\n !0 === r && (r = [\"FlateEncode\"]);\n var u = t.additionalKeyValues || [],\n h = (c = void 0 !== E.API.processDataByFilters ? E.API.processDataByFilters(e, r) : {\n data: e,\n reverseChain: []\n }).reverseChain + (Array.isArray(n) ? n.join(\" \") : n.toString());\n if (0 !== c.data.length && (u.push({\n key: \"Length\",\n value: c.data.length\n }), !0 === i && u.push({\n key: \"Length1\",\n value: a\n })), 0 != h.length) if (h.split(\"/\").length - 1 == 1) u.push({\n key: \"Filter\",\n value: h\n });else {\n u.push({\n key: \"Filter\",\n value: \"[\" + h + \"]\"\n });\n for (var l = 0; l < u.length; l += 1) if (\"DecodeParms\" === u[l].key) {\n for (var f = [], d = 0; d < c.reverseChain.split(\"/\").length - 1; d += 1) f.push(\"null\");\n f.push(u[l].value), u[l].value = \"[\" + f.join(\" \") + \"]\";\n }\n }\n lt(\"<<\");\n for (var p = 0; p < u.length; p++) lt(\"/\" + u[p].key + \" \" + u[p].value);\n lt(\">>\"), 0 !== c.data.length && (lt(\"stream\"), lt(s(c.data)), lt(\"endstream\"));\n },\n ae = y.__private__.putPage = function (t) {\n var e = t.number,\n r = t.data,\n n = t.objId,\n i = t.contentsObjId;\n Zt(n, !0), lt(\"<>\"), lt(\"endobj\");\n var a = r.join(\"\\n\");\n return S === x.ADVANCED && (a += \"\\nQ\"), Zt(i, !0), ie({\n data: a,\n filters: ne(),\n objectId: i\n }), lt(\"endobj\"), n;\n },\n oe = y.__private__.putPages = function () {\n var t,\n e,\n r = [];\n for (t = 1; t <= Dt; t++) Rt[t].objId = Kt(), Rt[t].contentsObjId = Kt();\n for (t = 1; t <= Dt; t++) r.push(ae({\n number: t,\n data: ot[t],\n objId: Rt[t].objId,\n contentsObjId: Rt[t].contentsObjId,\n mediaBox: Rt[t].mediaBox,\n cropBox: Rt[t].cropBox,\n bleedBox: Rt[t].bleedBox,\n trimBox: Rt[t].trimBox,\n artBox: Rt[t].artBox,\n userUnit: Rt[t].userUnit,\n rootDictionaryObjId: Qt,\n resourceDictionaryObjId: te\n }));\n Zt(Qt, !0), lt(\"<>\"), lt(\"endobj\"), Tt.publish(\"postPutPages\");\n },\n se = function (t) {\n Tt.publish(\"putFont\", {\n font: t,\n out: lt,\n newObject: Xt,\n putStream: ie\n }), !0 !== t.isAlreadyPutted && (t.objectNumber = Xt(), lt(\"<<\"), lt(\"/Type /Font\"), lt(\"/BaseFont /\" + F(t.postScriptName)), lt(\"/Subtype /Type1\"), \"string\" == typeof t.encoding && lt(\"/Encoding /\" + t.encoding), lt(\"/FirstChar 32\"), lt(\"/LastChar 255\"), lt(\">>\"), lt(\"endobj\"));\n },\n ce = function () {\n for (var t in Ft) Ft.hasOwnProperty(t) && (!1 === v || !0 === v && b.hasOwnProperty(t)) && se(Ft[t]);\n },\n ue = function (t) {\n t.objectNumber = Xt();\n var e = [];\n e.push({\n key: \"Type\",\n value: \"/XObject\"\n }), e.push({\n key: \"Subtype\",\n value: \"/Form\"\n }), e.push({\n key: \"BBox\",\n value: \"[\" + [O(t.x), O(t.y), O(t.x + t.width), O(t.y + t.height)].join(\" \") + \"]\"\n }), e.push({\n key: \"Matrix\",\n value: \"[\" + t.matrix.toString() + \"]\"\n });\n var r = t.pages[1].join(\"\\n\");\n ie({\n data: r,\n additionalKeyValues: e,\n objectId: t.objectNumber\n }), lt(\"endobj\");\n },\n he = function () {\n for (var t in zt) zt.hasOwnProperty(t) && ue(zt[t]);\n },\n le = function (t, e) {\n var r,\n n = [],\n i = 1 / (e - 1);\n for (r = 0; r < 1; r += i) n.push(r);\n if (n.push(1), 0 != t[0].offset) {\n var a = {\n offset: 0,\n color: t[0].color\n };\n t.unshift(a);\n }\n if (1 != t[t.length - 1].offset) {\n var o = {\n offset: 1,\n color: t[t.length - 1].color\n };\n t.push(o);\n }\n for (var s = \"\", c = 0, u = 0; u < n.length; u++) {\n for (r = n[u]; r > t[c + 1].offset;) c++;\n var h = t[c].offset,\n l = (r - h) / (t[c + 1].offset - h),\n f = t[c].color,\n d = t[c + 1].color;\n s += tt(Math.round((1 - l) * f[0] + l * d[0]).toString(16)) + tt(Math.round((1 - l) * f[1] + l * d[1]).toString(16)) + tt(Math.round((1 - l) * f[2] + l * d[2]).toString(16));\n }\n return s.trim();\n },\n fe = function (t, e) {\n e || (e = 21);\n var r = Xt(),\n n = le(t.colors, e),\n i = [];\n i.push({\n key: \"FunctionType\",\n value: \"0\"\n }), i.push({\n key: \"Domain\",\n value: \"[0.0 1.0]\"\n }), i.push({\n key: \"Size\",\n value: \"[\" + e + \"]\"\n }), i.push({\n key: \"BitsPerSample\",\n value: \"8\"\n }), i.push({\n key: \"Range\",\n value: \"[0.0 1.0 0.0 1.0 0.0 1.0]\"\n }), i.push({\n key: \"Decode\",\n value: \"[0.0 1.0 0.0 1.0 0.0 1.0]\"\n }), ie({\n data: n,\n additionalKeyValues: i,\n alreadyAppliedFilters: [\"/ASCIIHexDecode\"],\n objectId: r\n }), lt(\"endobj\"), t.objectNumber = Xt(), lt(\"<< /ShadingType \" + t.type), lt(\"/ColorSpace /DeviceRGB\");\n var a = \"/Coords [\" + O(parseFloat(t.coords[0])) + \" \" + O(parseFloat(t.coords[1])) + \" \";\n 2 === t.type ? a += O(parseFloat(t.coords[2])) + \" \" + O(parseFloat(t.coords[3])) : a += O(parseFloat(t.coords[2])) + \" \" + O(parseFloat(t.coords[3])) + \" \" + O(parseFloat(t.coords[4])) + \" \" + O(parseFloat(t.coords[5])), lt(a += \"]\"), t.matrix && lt(\"/Matrix [\" + t.matrix.toString() + \"]\"), lt(\"/Function \" + r + \" 0 R\"), lt(\"/Extend [true true]\"), lt(\">>\"), lt(\"endobj\");\n },\n de = function (t, e) {\n var r = Kt(),\n n = Xt();\n e.push({\n resourcesOid: r,\n objectOid: n\n }), t.objectNumber = n;\n var i = [];\n i.push({\n key: \"Type\",\n value: \"/Pattern\"\n }), i.push({\n key: \"PatternType\",\n value: \"1\"\n }), i.push({\n key: \"PaintType\",\n value: \"1\"\n }), i.push({\n key: \"TilingType\",\n value: \"1\"\n }), i.push({\n key: \"BBox\",\n value: \"[\" + t.boundingBox.map(O).join(\" \") + \"]\"\n }), i.push({\n key: \"XStep\",\n value: O(t.xStep)\n }), i.push({\n key: \"YStep\",\n value: O(t.yStep)\n }), i.push({\n key: \"Resources\",\n value: r + \" 0 R\"\n }), t.matrix && i.push({\n key: \"Matrix\",\n value: \"[\" + t.matrix.toString() + \"]\"\n }), ie({\n data: t.stream,\n additionalKeyValues: i,\n objectId: t.objectNumber\n }), lt(\"endobj\");\n },\n pe = function (t) {\n var e;\n for (e in Ot) Ot.hasOwnProperty(e) && (Ot[e] instanceof B ? fe(Ot[e]) : Ot[e] instanceof M && de(Ot[e], t));\n },\n ge = function (t) {\n for (var e in t.objectNumber = Xt(), lt(\"<<\"), t) switch (e) {\n case \"opacity\":\n lt(\"/ca \" + R(t[e]));\n break;\n case \"stroke-opacity\":\n lt(\"/CA \" + R(t[e]));\n }\n lt(\">>\"), lt(\"endobj\");\n },\n me = function () {\n var t;\n for (t in Mt) Mt.hasOwnProperty(t) && ge(Mt[t]);\n },\n ve = function () {\n for (var t in lt(\"/XObject <<\"), zt) zt.hasOwnProperty(t) && zt[t].objectNumber >= 0 && lt(\"/\" + t + \" \" + zt[t].objectNumber + \" 0 R\");\n Tt.publish(\"putXobjectDict\"), lt(\">>\");\n },\n be = function () {\n Ye.oid = Xt(), lt(\"<<\"), lt(\"/Filter /Standard\"), lt(\"/V \" + Ye.v), lt(\"/R \" + Ye.r), lt(\"/U <\" + Ye.toHexString(Ye.U) + \">\"), lt(\"/O <\" + Ye.toHexString(Ye.O) + \">\"), lt(\"/P \" + Ye.P), lt(\">>\"), lt(\"endobj\");\n },\n ye = function () {\n for (var t in lt(\"/Font <<\"), Ft) Ft.hasOwnProperty(t) && (!1 === v || !0 === v && b.hasOwnProperty(t)) && lt(\"/\" + t + \" \" + Ft[t].objectNumber + \" 0 R\");\n lt(\">>\");\n },\n we = function () {\n if (Object.keys(Ot).length > 0) {\n for (var t in lt(\"/Shading <<\"), Ot) Ot.hasOwnProperty(t) && Ot[t] instanceof B && Ot[t].objectNumber >= 0 && lt(\"/\" + t + \" \" + Ot[t].objectNumber + \" 0 R\");\n Tt.publish(\"putShadingPatternDict\"), lt(\">>\");\n }\n },\n Ne = function (t) {\n if (Object.keys(Ot).length > 0) {\n for (var e in lt(\"/Pattern <<\"), Ot) Ot.hasOwnProperty(e) && Ot[e] instanceof y.TilingPattern && Ot[e].objectNumber >= 0 && Ot[e].objectNumber < t && lt(\"/\" + e + \" \" + Ot[e].objectNumber + \" 0 R\");\n Tt.publish(\"putTilingPatternDict\"), lt(\">>\");\n }\n },\n Le = function () {\n if (Object.keys(Mt).length > 0) {\n var t;\n for (t in lt(\"/ExtGState <<\"), Mt) Mt.hasOwnProperty(t) && Mt[t].objectNumber >= 0 && lt(\"/\" + t + \" \" + Mt[t].objectNumber + \" 0 R\");\n Tt.publish(\"putGStateDict\"), lt(\">>\");\n }\n },\n Ae = function (t) {\n Zt(t.resourcesOid, !0), lt(\"<<\"), lt(\"/ProcSet [/PDF /Text /ImageB /ImageC /ImageI]\"), ye(), we(), Ne(t.objectOid), Le(), ve(), lt(\">>\"), lt(\"endobj\");\n },\n xe = function () {\n var t = [];\n ce(), me(), he(), pe(t), Tt.publish(\"putResources\"), t.forEach(Ae), Ae({\n resourcesOid: te,\n objectOid: Number.MAX_SAFE_INTEGER\n }), Tt.publish(\"postPutResources\");\n },\n Se = function () {\n Tt.publish(\"putAdditionalObjects\");\n for (var t = 0; t < at.length; t++) {\n var e = at[t];\n Zt(e.objId, !0), lt(e.content), lt(\"endobj\");\n }\n Tt.publish(\"postPutAdditionalObjects\");\n },\n _e = function (t) {\n Ct[t.fontName] = Ct[t.fontName] || {}, Ct[t.fontName][t.fontStyle] = t.id;\n },\n Pe = function (t, e, r, n, i) {\n var a = {\n id: \"F\" + (Object.keys(Ft).length + 1).toString(10),\n postScriptName: t,\n fontName: e,\n fontStyle: r,\n encoding: n,\n isStandardFont: i || !1,\n metadata: {}\n };\n return Tt.publish(\"addFont\", {\n font: a,\n instance: this\n }), Ft[a.id] = a, _e(a), a.id;\n },\n ke = function (t) {\n for (var e = 0, r = pt.length; e < r; e++) {\n var n = Pe.call(this, t[e][0], t[e][1], t[e][2], pt[e][3], !0);\n !1 === v && (b[n] = !0);\n var i = t[e][0].split(\"-\");\n _e({\n id: n,\n fontName: i[0],\n fontStyle: i[1] || \"\"\n });\n }\n Tt.publish(\"addFonts\", {\n fonts: Ft,\n dictionary: Ct\n });\n },\n Ie = function (t) {\n return t.foo = function () {\n try {\n return t.apply(this, arguments);\n } catch (t) {\n var e = t.stack || \"\";\n ~e.indexOf(\" at \") && (e = e.split(\" at \")[1]);\n var r = \"Error in function \" + e.split(\"\\n\")[0].split(\"<\")[0] + \": \" + t.message;\n if (!n.console) throw new Error(r);\n n.console.error(r, t), n.alert && alert(r);\n }\n }, t.foo.bar = t, t.foo;\n },\n Fe = function (t, e) {\n var r, n, i, a, o, s, c, u, h;\n if (i = (e = e || {}).sourceEncoding || \"Unicode\", o = e.outputEncoding, (e.autoencode || o) && Ft[St].metadata && Ft[St].metadata[i] && Ft[St].metadata[i].encoding && (a = Ft[St].metadata[i].encoding, !o && Ft[St].encoding && (o = Ft[St].encoding), !o && a.codePages && (o = a.codePages[0]), \"string\" == typeof o && (o = a[o]), o)) {\n for (c = !1, s = [], r = 0, n = t.length; r < n; r++) (u = o[t.charCodeAt(r)]) ? s.push(String.fromCharCode(u)) : s.push(t[r]), s[r].charCodeAt(0) >> 8 && (c = !0);\n t = s.join(\"\");\n }\n for (r = t.length; void 0 === c && 0 !== r;) t.charCodeAt(r - 1) >> 8 && (c = !0), r--;\n if (!c) return t;\n for (s = e.noBOM ? [] : [254, 255], r = 0, n = t.length; r < n; r++) {\n if ((h = (u = t.charCodeAt(r)) >> 8) >> 8) throw new Error(\"Character at position \" + r + \" of string '\" + t + \"' exceeds 16bits. Cannot be encoded into UCS-2 BE\");\n s.push(h), s.push(u - (h << 8));\n }\n return String.fromCharCode.apply(void 0, s);\n },\n Ce = y.__private__.pdfEscape = y.pdfEscape = function (t, e) {\n return Fe(t, e).replace(/\\\\/g, \"\\\\\\\\\").replace(/\\(/g, \"\\\\(\").replace(/\\)/g, \"\\\\)\");\n },\n je = y.__private__.beginPage = function (t) {\n ot[++Dt] = [], Rt[Dt] = {\n objId: 0,\n contentsObjId: 0,\n userUnit: Number(d),\n artBox: null,\n bleedBox: null,\n cropBox: null,\n trimBox: null,\n mediaBox: {\n bottomLeftX: 0,\n bottomLeftY: 0,\n topRightX: Number(t[0]),\n topRightY: Number(t[1])\n }\n }, Me(Dt), ht(ot[$]);\n },\n Oe = function (t, e) {\n var r, n, o;\n switch (i = e || i, \"string\" == typeof t && (r = A(t.toLowerCase()), Array.isArray(r) && (n = r[0], o = r[1])), Array.isArray(t) && (n = t[0] * _t, o = t[1] * _t), isNaN(n) && (n = s[0], o = s[1]), (n > 14400 || o > 14400) && (a.warn(\"A page in a PDF can not be wider or taller than 14400 userUnit. jsPDF limits the width/height to 14400\"), n = Math.min(14400, n), o = Math.min(14400, o)), s = [n, o], i.substr(0, 1)) {\n case \"l\":\n o > n && (s = [o, n]);\n break;\n case \"p\":\n n > o && (s = [o, n]);\n }\n je(s), pr(fr), lt(Lr), 0 !== kr && lt(kr + \" J\"), 0 !== Ir && lt(Ir + \" j\"), Tt.publish(\"addPage\", {\n pageNumber: Dt\n });\n },\n Be = function (t) {\n t > 0 && t <= Dt && (ot.splice(t, 1), Rt.splice(t, 1), Dt--, $ > Dt && ($ = Dt), this.setPage($));\n },\n Me = function (t) {\n t > 0 && t <= Dt && ($ = t);\n },\n Ee = y.__private__.getNumberOfPages = y.getNumberOfPages = function () {\n return ot.length - 1;\n },\n qe = function (t, e, r) {\n var n,\n i = void 0;\n return r = r || {}, t = void 0 !== t ? t : Ft[St].fontName, e = void 0 !== e ? e : Ft[St].fontStyle, n = t.toLowerCase(), void 0 !== Ct[n] && void 0 !== Ct[n][e] ? i = Ct[n][e] : void 0 !== Ct[t] && void 0 !== Ct[t][e] ? i = Ct[t][e] : !1 === r.disableWarning && a.warn(\"Unable to look up font label for font '\" + t + \"', '\" + e + \"'. Refer to getFontList() for available fonts.\"), i || r.noFallback || null == (i = Ct.times[e]) && (i = Ct.times.normal), i;\n },\n De = y.__private__.putInfo = function () {\n var t = Xt(),\n e = function (t) {\n return t;\n };\n for (var r in null !== m && (e = Ye.encryptor(t, 0)), lt(\"<<\"), lt(\"/Producer (\" + Ce(e(\"jsPDF \" + E.version)) + \")\"), xt) xt.hasOwnProperty(r) && xt[r] && lt(\"/\" + r.substr(0, 1).toUpperCase() + r.substr(1) + \" (\" + Ce(e(xt[r])) + \")\");\n lt(\"/CreationDate (\" + Ce(e(W)) + \")\"), lt(\">>\"), lt(\"endobj\");\n },\n Re = y.__private__.putCatalog = function (t) {\n var e = (t = t || {}).rootDictionaryObjId || Qt;\n switch (Xt(), lt(\"<<\"), lt(\"/Type /Catalog\"), lt(\"/Pages \" + e + \" 0 R\"), mt || (mt = \"fullwidth\"), mt) {\n case \"fullwidth\":\n lt(\"/OpenAction [3 0 R /FitH null]\");\n break;\n case \"fullheight\":\n lt(\"/OpenAction [3 0 R /FitV null]\");\n break;\n case \"fullpage\":\n lt(\"/OpenAction [3 0 R /Fit]\");\n break;\n case \"original\":\n lt(\"/OpenAction [3 0 R /XYZ null null 1]\");\n break;\n default:\n var r = \"\" + mt;\n \"%\" === r.substr(r.length - 1) && (mt = parseInt(mt) / 100), \"number\" == typeof mt && lt(\"/OpenAction [3 0 R /XYZ null null \" + R(mt) + \"]\");\n }\n switch (Nt || (Nt = \"continuous\"), Nt) {\n case \"continuous\":\n lt(\"/PageLayout /OneColumn\");\n break;\n case \"single\":\n lt(\"/PageLayout /SinglePage\");\n break;\n case \"two\":\n case \"twoleft\":\n lt(\"/PageLayout /TwoColumnLeft\");\n break;\n case \"tworight\":\n lt(\"/PageLayout /TwoColumnRight\");\n }\n yt && lt(\"/PageMode /\" + yt), Tt.publish(\"putCatalog\"), lt(\">>\"), lt(\"endobj\");\n },\n Te = y.__private__.putTrailer = function () {\n lt(\"trailer\"), lt(\"<<\"), lt(\"/Size \" + (et + 1)), lt(\"/Root \" + et + \" 0 R\"), lt(\"/Info \" + (et - 1) + \" 0 R\"), null !== m && lt(\"/Encrypt \" + Ye.oid + \" 0 R\"), lt(\"/ID [ <\" + V + \"> <\" + V + \"> ]\"), lt(\">>\");\n },\n Ue = y.__private__.putHeader = function () {\n lt(\"%PDF-\" + w), lt(\"%ºß¬à\");\n },\n ze = y.__private__.putXRef = function () {\n var t = \"0000000000\";\n lt(\"xref\"), lt(\"0 \" + (et + 1)), lt(\"0000000000 65535 f \");\n for (var e = 1; e <= et; e++) {\n \"function\" == typeof rt[e] ? lt((t + rt[e]()).slice(-10) + \" 00000 n \") : void 0 !== rt[e] ? lt((t + rt[e]).slice(-10) + \" 00000 n \") : lt(\"0000000000 00000 n \");\n }\n },\n He = y.__private__.buildDocument = function () {\n ut(), ht(nt), Tt.publish(\"buildDocument\"), Ue(), oe(), Se(), xe(), null !== m && be(), De(), Re();\n var t = it;\n return ze(), Te(), lt(\"startxref\"), lt(\"\" + t), lt(\"%%EOF\"), ht(ot[$]), nt.join(\"\\n\");\n },\n We = y.__private__.getBlob = function (t) {\n return new Blob([dt(t)], {\n type: \"application/pdf\"\n });\n },\n Ve = y.output = y.__private__.output = Ie(function (t, e) {\n switch (\"string\" == typeof (e = e || {}) ? e = {\n filename: e\n } : e.filename = e.filename || \"generated.pdf\", t) {\n case void 0:\n return He();\n case \"save\":\n y.save(e.filename);\n break;\n case \"arraybuffer\":\n return dt(He());\n case \"blob\":\n return We(He());\n case \"bloburi\":\n case \"bloburl\":\n if (void 0 !== n.URL && \"function\" == typeof n.URL.createObjectURL) return n.URL && n.URL.createObjectURL(We(He())) || void 0;\n a.warn(\"bloburl is not supported by your system, because URL.createObjectURL is not supported by your browser.\");\n break;\n case \"datauristring\":\n case \"dataurlstring\":\n var r = \"\",\n i = He();\n try {\n r = h(i);\n } catch (t) {\n r = h(unescape(encodeURIComponent(i)));\n }\n return \"data:application/pdf;filename=\" + e.filename + \";base64,\" + r;\n case \"pdfobjectnewwindow\":\n if (\"[object Window]\" === Object.prototype.toString.call(n)) {\n var o = \"https://cdnjs.cloudflare.com/ajax/libs/pdfobject/2.1.1/pdfobject.min.js\",\n s = ' integrity=\"sha512-4ze/a9/4jqu+tX9dfOqJYSvyYd5M6qum/3HpCLr+/Jqf0whc37VUbkpNGHR7/8pSnCFw47T1fmIpwBV7UySh3g==\" crossorigin=\"anonymous\"';\n e.pdfObjectUrl && (o = e.pdfObjectUrl, s = \"\");\n var c = '