d: [792, 1224], "credit-card": [153, 243] }; y2.__private__.getPageFormats = function() { return L2; }; var A2 = y2.__private__.getPageFormat = function(t2) { return L2[t2]; }; s2 = s2 || "a4"; var x2 = { COMPAT: "compat", ADVANCED: "advanced" }, S2 = x2.COMPAT; function _2() { this.saveGraphicsState(), lt2(new Vt2(_t2, 0, 0, -_t2, 0, Rr() * _t2).toString() + " cm"), this.setFontSize(this.getFontSize() / _t2), g2 = "n", S2 = x2.ADVANCED; } function P2() { this.restoreGraphicsState(), g2 = "S", S2 = x2.COMPAT; } var k2 = y2.__private__.combineFontStyleAndFontWeight = function(t2, e2) { if ("bold" == t2 && "normal" == e2 || "bold" == t2 && 400 == e2 || "normal" == t2 && "italic" == e2 || "bold" == t2 && "italic" == e2) throw new Error("Invalid Combination of fontweight and fontstyle"); return e2 && (t2 = 400 == e2 || "normal" === e2 ? "italic" === t2 ? "italic" : "normal" : 700 != e2 && "bold" !== e2 || "normal" !== t2 ? (700 == e2 ? "bold" : e2) + "" + t2 : "bold"), t2; }; y2.advancedAPI = function(t2) { var e2 = S2 === x2.COMPAT; return e2 && _2.call(this), "function" != typeof t2 || (t2(this), e2 && P2.call(this)), this; }, y2.compatAPI = function(t2) { var e2 = S2 === x2.ADVANCED; return e2 && P2.call(this), "function" != typeof t2 || (t2(this), e2 && _2.call(this)), this; }, y2.isAdvancedAPI = function() { return S2 === x2.ADVANCED; }; var O2, q2 = function(t2) { if (S2 !== x2.ADVANCED) throw new Error(t2 + " is only available in 'advanced' API mode. You need to call advancedAPI() first."); }, D2 = y2.roundToPrecision = y2.__private__.roundToPrecision = function(t2, e2) { var n2 = r || e2; if (isNaN(t2) || isNaN(n2)) throw new Error("Invalid argument passed to jsPDF.roundToPrecision"); return t2.toFixed(n2).replace(/0+$/, ""); }; O2 = y2.hpf = y2.__private__.hpf = "number" == typeof p2 ? function(t2) { if (isNaN(t2)) throw new Error("Invalid argument passed to jsPDF.hpf"); return D2(t2, p2); } : "smart" === p2 ? function(t2) { if (isNaN(t2)) throw new Error("Invalid argument passed to jsPDF.hpf"); return D2(t2, t2 > -1 && t2 < 1 ? 16 : 5); } : function(t2) { if (isNaN(t2)) throw new Error("Invalid argument passed to jsPDF.hpf"); return D2(t2, 16); }; var R2 = y2.f2 = y2.__private__.f2 = function(t2) { if (isNaN(t2)) throw new Error("Invalid argument passed to jsPDF.f2"); return D2(t2, 2); }, T2 = y2.__private__.f3 = function(t2) { if (isNaN(t2)) throw new Error("Invalid argument passed to jsPDF.f3"); return D2(t2, 3); }, U2 = y2.scale = y2.__private__.scale = function(t2) { if (isNaN(t2)) throw new Error("Invalid argument passed to jsPDF.scale"); return S2 === x2.COMPAT ? t2 * _t2 : S2 === x2.ADVANCED ? t2 : void 0; }, z2 = function(t2) { return S2 === x2.COMPAT ? Rr() - t2 : S2 === x2.ADVANCED ? t2 : void 0; }, H2 = function(t2) { return U2(z2(t2)); }; y2.__private__.setPrecision = y2.setPrecision = function(t2) { "number" == typeof parseInt(t2, 10) && (r = parseInt(t2, 10)); }; var W2, V2 = "00000000000000000000000000000000", G2 = y2.__private__.getFileId = function() { return V2; }, Y2 = y2.__private__.setFileId = function(t2) { return V2 = void 0 !== t2 && /^[a-fA-F0-9]{32}$/.test(t2) ? t2.toUpperCase() : V2.split("").map(function() { return "ABCDEF0123456789".charAt(Math.floor(16 * Math.random())); }).join(""), null !== m2 && (Ye = new I(m2.userPermissions, m2.userPassword, m2.ownerPassword, V2)), V2; }; y2.setFileId = function(t2) { return Y2(t2), this; }, y2.getFileId = function() { return G2(); }; var J2 = y2.__private__.convertDateToPDFDate = function(t2) { var e2 = t2.getTimezoneOffset(), r2 = e2 < 0 ? "+" : "-", n2 = Math.floor(Math.abs(e2 / 60)), i3 = Math.abs(e2 % 60), a2 = [r2, Q2(n2), "'", Q2(i3), "'"].join(""); return ["D:", t2.getFullYear(), Q2(t2.getMonth() + 1), Q2(t2.getDate()), Q2(t2.getHours()), Q2(t2.getMinutes()), Q2(t2.getSeconds()), a2].join(""); }, X2 = y2.__private__.convertPDFDateToDate = function(t2) { var e2 = parseInt(t2.substr(2, 4), 10), r2 = parseInt(t2.substr(6, 2), 10) - 1, n2 = parseInt(t2.substr(8, 2), 10), i3 = parseInt(t2.substr(10, 2), 10), a2 = parseInt(t2.substr(12, 2), 10), o3 = parseInt(t2.substr(14, 2), 10); return new Date(e2, r2, n2, i3, a2, o3, 0); }, K2 = y2.__private__.setCreationDate = function(t2) { var e2; if (void 0 === t2 && (t2 = /* @__PURE__ */ new Date()), t2 instanceof Date) e2 = J2(t2); else { 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(t2)) throw new Error("Invalid argument passed to jsPDF.setCreationDate"); e2 = t2; } return W2 = e2; }, Z2 = y2.__private__.getCreationDate = function(t2) { var e2 = W2; return "jsDate" === t2 && (e2 = X2(W2)), e2; }; y2.setCreationDate = function(t2) { return K2(t2), this; }, y2.getCreationDate = function(t2) { return Z2(t2); }; var $2, Q2 = y2.__private__.padd2 = function(t2) { return ("0" + parseInt(t2)).slice(-2); }, tt2 = y2.__private__.padd2Hex = function(t2) { return ("00" + (t2 = t2.toString())).substr(t2.length); }, et3 = 0, rt2 = [], nt2 = [], it2 = 0, at2 = [], ot2 = [], st2 = false, ct2 = nt2, ut2 = function() { et3 = 0, it2 = 0, nt2 = [], rt2 = [], at2 = [], Qt2 = Kt2(), te3 = Kt2(); }; y2.__private__.setCustomOutputDestination = function(t2) { st2 = true, ct2 = t2; }; var ht2 = function(t2) { st2 || (ct2 = t2); }; y2.__private__.resetCustomOutputDestination = function() { st2 = false, ct2 = nt2; }; var lt2 = y2.__private__.out = function(t2) { return t2 = t2.toString(), it2 += t2.length + 1, ct2.push(t2), ct2; }, ft2 = y2.__private__.write = function(t2) { return lt2(1 === arguments.length ? t2.toString() : Array.prototype.join.call(arguments, " ")); }, dt2 = y2.__private__.getArrayBuffer = function(t2) { for (var e2 = t2.length, r2 = new ArrayBuffer(e2), n2 = new Uint8Array(r2); e2--; ) n2[e2] = t2.charCodeAt(e2); return r2; }, pt2 = [["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]]; y2.__private__.getStandardFonts = function() { return pt2; }; var gt2 = e.fontSize || 16; y2.__private__.setFontSize = y2.setFontSize = function(t2) { return gt2 = S2 === x2.ADVANCED ? t2 / _t2 : t2, this; }; var mt2, vt2 = y2.__private__.getFontSize = y2.getFontSize = function() { return S2 === x2.COMPAT ? gt2 : gt2 * _t2; }, bt2 = e.R2L || false; y2.__private__.setR2L = y2.setR2L = function(t2) { return bt2 = t2, this; }, y2.__private__.getR2L = y2.getR2L = function() { return bt2; }; var yt2, wt2 = y2.__private__.setZoomMode = function(t2) { var e2 = [void 0, null, "fullwidth", "fullheight", "fullpage", "original"]; if (/^(?:\d+\.\d*|\d*\.\d+|\d+)%$/.test(t2)) mt2 = t2; else if (isNaN(t2)) { if (-1 === e2.indexOf(t2)) throw new Error('zoom must be Integer (e.g. 2), a percentage Value (e.g. 300%) or fullwidth, fullheight, fullpage, original. "' + t2 + '" is not recognized.'); mt2 = t2; } else mt2 = parseInt(t2, 10); }; y2.__private__.getZoomMode = function() { return mt2; }; var Nt2, Lt2 = y2.__private__.setPageMode = function(t2) { if (-1 == [void 0, null, "UseNone", "UseOutlines", "UseThumbs", "FullScreen"].indexOf(t2)) throw new Error('Page mode must be one of UseNone, UseOutlines, UseThumbs, or FullScreen. "' + t2 + '" is not recognized.'); yt2 = t2; }; y2.__private__.getPageMode = function() { return yt2; }; var At2 = y2.__private__.setLayoutMode = function(t2) { if (-1 == [void 0, null, "continuous", "single", "twoleft", "tworight", "two"].indexOf(t2)) throw new Error('Layout mode must be one of continuous, single, twoleft, tworight. "' + t2 + '" is not recognized.'); Nt2 = t2; }; y2.__private__.getLayoutMode = function() { return Nt2; }, y2.__private__.setDisplayMode = y2.setDisplayMode = function(t2, e2, r2) { return wt2(t2), At2(e2), Lt2(r2), this; }; var xt2 = { title: "", subject: "", author: "", keywords: "", creator: "" }; y2.__private__.getDocumentProperty = function(t2) { if (-1 === Object.keys(xt2).indexOf(t2)) throw new Error("Invalid argument passed to jsPDF.getDocumentProperty"); return xt2[t2]; }, y2.__private__.getDocumentProperties = function() { return xt2; }, y2.__private__.setDocumentProperties = y2.setProperties = y2.setDocumentProperties = function(t2) { for (var e2 in xt2) xt2.hasOwnProperty(e2) && t2[e2] && (xt2[e2] = t2[e2]); return this; }, y2.__private__.setDocumentProperty = function(t2, e2) { if (-1 === Object.keys(xt2).indexOf(t2)) throw new Error("Invalid arguments passed to jsPDF.setDocumentProperty"); return xt2[t2] = e2; }; var St2, _t2, Pt2, kt2, It2, Ft2 = {}, Ct2 = {}, jt2 = [], Ot2 = {}, Bt2 = {}, Mt2 = {}, Et2 = {}, qt2 = null, Dt2 = 0, Rt2 = [], Tt2 = new C(y2), Ut2 = e.hotfixes || [], zt2 = {}, Ht2 = {}, Wt2 = [], Vt2 = function t2(e2, r2, n2, i3, a2, o3) { if (!(this instanceof t2)) return new t2(e2, r2, n2, i3, a2, o3); isNaN(e2) && (e2 = 1), isNaN(r2) && (r2 = 0), isNaN(n2) && (n2 = 0), isNaN(i3) && (i3 = 1), isNaN(a2) && (a2 = 0), isNaN(o3) && (o3 = 0), this._matrix = [e2, r2, n2, i3, a2, o3]; }; Object.defineProperty(Vt2.prototype, "sx", { get: function() { return this._matrix[0]; }, set: function(t2) { this._matrix[0] = t2; } }), Object.defineProperty(Vt2.prototype, "shy", { get: function() { return this._matrix[1]; }, set: function(t2) { this._matrix[1] = t2; } }), Object.defineProperty(Vt2.prototype, "shx", { get: function() { return this._matrix[2]; }, set: function(t2) { this._matrix[2] = t2; } }), Object.defineProperty(Vt2.prototype, "sy", { get: function() { return this._matrix[3]; }, set: function(t2) { this._matrix[3] = t2; } }), Object.defineProperty(Vt2.prototype, "tx", { get: function() { return this._matrix[4]; }, set: function(t2) { this._matrix[4] = t2; } }), Object.defineProperty(Vt2.prototype, "ty", { get: function() { return this._matrix[5]; }, set: function(t2) { this._matrix[5] = t2; } }), Object.defineProperty(Vt2.prototype, "a", { get: function() { return this._matrix[0]; }, set: function(t2) { this._matrix[0] = t2; } }), Object.defineProperty(Vt2.prototype, "b", { get: function() { return this._matrix[1]; }, set: function(t2) { this._matrix[1] = t2; } }), Object.defineProperty(Vt2.prototype, "c", { get: function() { return this._matrix[2]; }, set: function(t2) { this._matrix[2] = t2; } }), Object.defineProperty(Vt2.prototype, "d", { get: function() { return this._matrix[3]; }, set: function(t2) { this._matrix[3] = t2; } }), Object.defineProperty(Vt2.prototype, "e", { get: function() { return this._matrix[4]; }, set: function(t2) { this._matrix[4] = t2; } }), Object.defineProperty(Vt2.prototype, "f", { get: function() { return this._matrix[5]; }, set: function(t2) { this._matrix[5] = t2; } }), Object.defineProperty(Vt2.prototype, "rotation", { get: function() { return Math.atan2(this.shx, this.sx); } }), Object.defineProperty(Vt2.prototype, "scaleX", { get: function() { return this.decompose().scale.sx; } }), Object.defineProperty(Vt2.prototype, "scaleY", { get: function() { return this.decompose().scale.sy; } }), Object.defineProperty(Vt2.prototype, "isIdentity", { get: function() { return 1 === this.sx && (0 === this.shy && (0 === this.shx && (1 === this.sy && (0 === this.tx && 0 === this.ty)))); } }), Vt2.prototype.join = function(t2) { return [this.sx, this.shy, this.shx, this.sy, this.tx, this.ty].map(O2).join(t2); }, Vt2.prototype.multiply = function(t2) { var e2 = t2.sx * this.sx + t2.shy * this.shx, r2 = t2.sx * this.shy + t2.shy * this.sy, n2 = t2.shx * this.sx + t2.sy * this.shx, i3 = t2.shx * this.shy + t2.sy * this.sy, a2 = t2.tx * this.sx + t2.ty * this.shx + this.tx, o3 = t2.tx * this.shy + t2.ty * this.sy + this.ty; return new Vt2(e2, r2, n2, i3, a2, o3); }, Vt2.prototype.decompose = function() { var t2 = this.sx, e2 = this.shy, r2 = this.shx, n2 = this.sy, i3 = this.tx, a2 = this.ty, o3 = Math.sqrt(t2 * t2 + e2 * e2), s3 = (t2 /= o3) * r2 + (e2 /= o3) * n2; r2 -= t2 * s3, n2 -= e2 * s3; var c3 = Math.sqrt(r2 * r2 + n2 * n2); return s3 /= c3, t2 * (n2 /= c3) < e2 * (r2 /= c3) && (t2 = -t2, e2 = -e2, s3 = -s3, o3 = -o3), { scale: new Vt2(o3, 0, 0, c3, 0, 0), translate: new Vt2(1, 0, 0, 1, i3, a2), rotate: new Vt2(t2, e2, -e2, t2, 0, 0), skew: new Vt2(1, 0, s3, 1, 0, 0) }; }, Vt2.prototype.toString = function(t2) { return this.join(" "); }, Vt2.prototype.inversed = function() { var t2 = this.sx, e2 = this.shy, r2 = this.shx, n2 = this.sy, i3 = this.tx, a2 = this.ty, o3 = 1 / (t2 * n2 - e2 * r2), s3 = n2 * o3, c3 = -e2 * o3, u3 = -r2 * o3, h2 = t2 * o3; return new Vt2(s3, c3, u3, h2, -s3 * i3 - u3 * a2, -c3 * i3 - h2 * a2); }, Vt2.prototype.applyToPoint = function(t2) { var e2 = t2.x * this.sx + t2.y * this.shx + this.tx, r2 = t2.x * this.shy + t2.y * this.sy + this.ty; return new Cr(e2, r2); }, Vt2.prototype.applyToRectangle = function(t2) { var e2 = this.applyToPoint(t2), r2 = this.applyToPoint(new Cr(t2.x + t2.w, t2.y + t2.h)); return new jr(e2.x, e2.y, r2.x - e2.x, r2.y - e2.y); }, Vt2.prototype.clone = function() { var t2 = this.sx, e2 = this.shy, r2 = this.shx, n2 = this.sy, i3 = this.tx, a2 = this.ty; return new Vt2(t2, e2, r2, n2, i3, a2); }, y2.Matrix = Vt2; var Gt2 = y2.matrixMult = function(t2, e2) { return e2.multiply(t2); }, Yt2 = new Vt2(1, 0, 0, 1, 0, 0); y2.unitMatrix = y2.identityMatrix = Yt2; var Jt2 = function(t2, e2) { if (!Bt2[t2]) { var r2 = (e2 instanceof B ? "Sh" : "P") + (Object.keys(Ot2).length + 1).toString(10); e2.id = r2, Bt2[t2] = r2, Ot2[r2] = e2, Tt2.publish("addPattern", e2); } }; y2.ShadingPattern = B, y2.TilingPattern = M, y2.addShadingPattern = function(t2, e2) { return q2("addShadingPattern()"), Jt2(t2, e2), this; }, y2.beginTilingPattern = function(t2) { q2("beginTilingPattern()"), Br(t2.boundingBox[0], t2.boundingBox[1], t2.boundingBox[2] - t2.boundingBox[0], t2.boundingBox[3] - t2.boundingBox[1], t2.matrix); }, y2.endTilingPattern = function(t2, e2) { q2("endTilingPattern()"), e2.stream = ot2[$2].join("\n"), Jt2(t2, e2), Tt2.publish("endTilingPattern", e2), Wt2.pop().restore(); }; var Xt2 = y2.__private__.newObject = function() { var t2 = Kt2(); return Zt2(t2, true), t2; }, Kt2 = y2.__private__.newObjectDeferred = function() { return et3++, rt2[et3] = function() { return it2; }, et3; }, Zt2 = function(t2, e2) { return e2 = "boolean" == typeof e2 && e2, rt2[t2] = it2, e2 && lt2(t2 + " 0 obj"), t2; }, $t2 = y2.__private__.newAdditionalObject = function() { var t2 = { objId: Kt2(), content: "" }; return at2.push(t2), t2; }, Qt2 = Kt2(), te3 = Kt2(), ee2 = y2.__private__.decodeColorString = function(t2) { var e2 = t2.split(" "); if (2 !== e2.length || "g" !== e2[1] && "G" !== e2[1]) { if (5 === e2.length && ("k" === e2[4] || "K" === e2[4])) { e2 = [(1 - e2[0]) * (1 - e2[3]), (1 - e2[1]) * (1 - e2[3]), (1 - e2[2]) * (1 - e2[3]), "r"]; } } else { var r2 = parseFloat(e2[0]); e2 = [r2, r2, r2, "r"]; } for (var n2 = "#", i3 = 0; i3 < 3; i3++) n2 += ("0" + Math.floor(255 * parseFloat(e2[i3])).toString(16)).slice(-2); return n2; }, re2 = y2.__private__.encodeColorString = function(e2) { var r2; "string" == typeof e2 && (e2 = { ch1: e2 }); var n2 = e2.ch1, i3 = e2.ch2, a2 = e2.ch3, o3 = e2.ch4, s3 = "draw" === e2.pdfColorType ? ["G", "RG", "K"] : ["g", "rg", "k"]; if ("string" == typeof n2 && "#" !== n2.charAt(0)) { var c3 = new f(n2); if (c3.ok) n2 = c3.toHex(); else if (!/^\d*\.?\d*$/.test(n2)) throw new Error('Invalid color "' + n2 + '" passed to jsPDF.encodeColorString.'); } if ("string" == typeof n2 && /^#[0-9A-Fa-f]{3}$/.test(n2) && (n2 = "#" + n2[1] + n2[1] + n2[2] + n2[2] + n2[3] + n2[3]), "string" == typeof n2 && /^#[0-9A-Fa-f]{6}$/.test(n2)) { var u3 = parseInt(n2.substr(1), 16); n2 = u3 >> 16 & 255, i3 = u3 >> 8 & 255, a2 = 255 & u3; } if (void 0 === i3 || void 0 === o3 && n2 === i3 && i3 === a2) if ("string" == typeof n2) r2 = n2 + " " + s3[0]; else switch (e2.precision) { case 2: r2 = R2(n2 / 255) + " " + s3[0]; break; case 3: default: r2 = T2(n2 / 255) + " " + s3[0]; } else if (void 0 === o3 || "object" === _typeof(o3)) { if (o3 && !isNaN(o3.a) && 0 === o3.a) return r2 = ["1.", "1.", "1.", s3[1]].join(" "); if ("string" == typeof n2) r2 = [n2, i3, a2, s3[1]].join(" "); else switch (e2.precision) { case 2: r2 = [R2(n2 / 255), R2(i3 / 255), R2(a2 / 255), s3[1]].join(" "); break; default: case 3: r2 = [T2(n2 / 255), T2(i3 / 255), T2(a2 / 255), s3[1]].join(" "); } } else if ("string" == typeof n2) r2 = [n2, i3, a2, o3, s3[2]].join(" "); else switch (e2.precision) { case 2: r2 = [R2(n2), R2(i3), R2(a2), R2(o3), s3[2]].join(" "); break; case 3: default: r2 = [T2(n2), T2(i3), T2(a2), T2(o3), s3[2]].join(" "); } return r2; }, ne2 = y2.__private__.getFilters = function() { return u2; }, ie2 = y2.__private__.putStream = function(t2) { var e2 = (t2 = t2 || {}).data || "", r2 = t2.filters || ne2(), n2 = t2.alreadyAppliedFilters || [], i3 = t2.addLength1 || false, a2 = e2.length, o3 = t2.objectId, s3 = function(t3) { return t3; }; if (null !== m2 && void 0 === o3) throw new Error("ObjectId must be passed to putStream for file encryption"); null !== m2 && (s3 = Ye.encryptor(o3, 0)); var c3 = {}; true === r2 && (r2 = ["FlateEncode"]); var u3 = t2.additionalKeyValues || [], h2 = (c3 = void 0 !== E.API.processDataByFilters ? E.API.processDataByFilters(e2, r2) : { data: e2, reverseChain: [] }).reverseChain + (Array.isArray(n2) ? n2.join(" ") : n2.toString()); if (0 !== c3.data.length && (u3.push({ key: "Length", value: c3.data.length }), true === i3 && u3.push({ key: "Length1", value: a2 })), 0 != h2.length) if (h2.split("/").length - 1 == 1) u3.push({ key: "Filter", value: h2 }); else { u3.push({ key: "Filter", value: "[" + h2 + "]" }); for (var l2 = 0; l2 < u3.length; l2 += 1) if ("DecodeParms" === u3[l2].key) { for (var f2 = [], d3 = 0; d3 < c3.reverseChain.split("/").length - 1; d3 += 1) f2.push("null"); f2.push(u3[l2].value), u3[l2].value = "[" + f2.join(" ") + "]"; } } lt2("<<"); for (var p3 = 0; p3 < u3.length; p3++) lt2("/" + u3[p3].key + " " + u3[p3].value); lt2(">>"), 0 !== c3.data.length && (lt2("stream"), lt2(s3(c3.data)), lt2("endstream")); }, ae2 = y2.__private__.putPage = function(t2) { var e2 = t2.number, r2 = t2.data, n2 = t2.objId, i3 = t2.contentsObjId; Zt2(n2, true), lt2("<>"), lt2("endobj"); var a2 = r2.join("\n"); return S2 === x2.ADVANCED && (a2 += "\nQ"), Zt2(i3, true), ie2({ data: a2, filters: ne2(), objectId: i3 }), lt2("endobj"), n2; }, oe2 = y2.__private__.putPages = function() { var t2, e2, r2 = []; for (t2 = 1; t2 <= Dt2; t2++) Rt2[t2].objId = Kt2(), Rt2[t2].contentsObjId = Kt2(); for (t2 = 1; t2 <= Dt2; t2++) r2.push(ae2({ number: t2, data: ot2[t2], objId: Rt2[t2].objId, contentsObjId: Rt2[t2].contentsObjId, mediaBox: Rt2[t2].mediaBox, cropBox: Rt2[t2].cropBox, bleedBox: Rt2[t2].bleedBox, trimBox: Rt2[t2].trimBox, artBox: Rt2[t2].artBox, userUnit: Rt2[t2].userUnit, rootDictionaryObjId: Qt2, resourceDictionaryObjId: te3 })); Zt2(Qt2, true), lt2("<>"), lt2("endobj"), Tt2.publish("postPutPages"); }, se2 = function(t2) { Tt2.publish("putFont", { font: t2, out: lt2, newObject: Xt2, putStream: ie2 }), true !== t2.isAlreadyPutted && (t2.objectNumber = Xt2(), lt2("<<"), lt2("/Type /Font"), lt2("/BaseFont /" + F(t2.postScriptName)), lt2("/Subtype /Type1"), "string" == typeof t2.encoding && lt2("/Encoding /" + t2.encoding), lt2("/FirstChar 32"), lt2("/LastChar 255"), lt2(">>"), lt2("endobj")); }, ce2 = function() { for (var t2 in Ft2) Ft2.hasOwnProperty(t2) && (false === v2 || true === v2 && b3.hasOwnProperty(t2)) && se2(Ft2[t2]); }, ue2 = function(t2) { t2.objectNumber = Xt2(); var e2 = []; e2.push({ key: "Type", value: "/XObject" }), e2.push({ key: "Subtype", value: "/Form" }), e2.push({ key: "BBox", value: "[" + [O2(t2.x), O2(t2.y), O2(t2.x + t2.width), O2(t2.y + t2.height)].join(" ") + "]" }), e2.push({ key: "Matrix", value: "[" + t2.matrix.toString() + "]" }); var r2 = t2.pages[1].join("\n"); ie2({ data: r2, additionalKeyValues: e2, objectId: t2.objectNumber }), lt2("endobj"); }, he2 = function() { for (var t2 in zt2) zt2.hasOwnProperty(t2) && ue2(zt2[t2]); }, le2 = function(t2, e2) { var r2, n2 = [], i3 = 1 / (e2 - 1); for (r2 = 0; r2 < 1; r2 += i3) n2.push(r2); if (n2.push(1), 0 != t2[0].offset) { var a2 = { offset: 0, color: t2[0].color }; t2.unshift(a2); } if (1 != t2[t2.length - 1].offset) { var o3 = { offset: 1, color: t2[t2.length - 1].color }; t2.push(o3); } for (var s3 = "", c3 = 0, u3 = 0; u3 < n2.length; u3++) { for (r2 = n2[u3]; r2 > t2[c3 + 1].offset; ) c3++; var h2 = t2[c3].offset, l2 = (r2 - h2) / (t2[c3 + 1].offset - h2), f2 = t2[c3].color, d3 = t2[c3 + 1].color; s3 += tt2(Math.round((1 - l2) * f2[0] + l2 * d3[0]).toString(16)) + tt2(Math.round((1 - l2) * f2[1] + l2 * d3[1]).toString(16)) + tt2(Math.round((1 - l2) * f2[2] + l2 * d3[2]).toString(16)); } return s3.trim(); }, fe2 = function(t2, e2) { e2 || (e2 = 21); var r2 = Xt2(), n2 = le2(t2.colors, e2), i3 = []; i3.push({ key: "FunctionType", value: "0" }), i3.push({ key: "Domain", value: "[0.0 1.0]" }), i3.push({ key: "Size", value: "[" + e2 + "]" }), i3.push({ key: "BitsPerSample", value: "8" }), i3.push({ key: "Range", value: "[0.0 1.0 0.0 1.0 0.0 1.0]" }), i3.push({ key: "Decode", value: "[0.0 1.0 0.0 1.0 0.0 1.0]" }), ie2({ data: n2, additionalKeyValues: i3, alreadyAppliedFilters: ["/ASCIIHexDecode"], objectId: r2 }), lt2("endobj"), t2.objectNumber = Xt2(), lt2("<< /ShadingType " + t2.type), lt2("/ColorSpace /DeviceRGB"); var a2 = "/Coords [" + O2(parseFloat(t2.coords[0])) + " " + O2(parseFloat(t2.coords[1])) + " "; 2 === t2.type ? a2 += O2(parseFloat(t2.coords[2])) + " " + O2(parseFloat(t2.coords[3])) : a2 += O2(parseFloat(t2.coords[2])) + " " + O2(parseFloat(t2.coords[3])) + " " + O2(parseFloat(t2.coords[4])) + " " + O2(parseFloat(t2.coords[5])), lt2(a2 += "]"), t2.matrix && lt2("/Matrix [" + t2.matrix.toString() + "]"), lt2("/Function " + r2 + " 0 R"), lt2("/Extend [true true]"), lt2(">>"), lt2("endobj"); }, de2 = function(t2, e2) { var r2 = Kt2(), n2 = Xt2(); e2.push({ resourcesOid: r2, objectOid: n2 }), t2.objectNumber = n2; var i3 = []; i3.push({ key: "Type", value: "/Pattern" }), i3.push({ key: "PatternType", value: "1" }), i3.push({ key: "PaintType", value: "1" }), i3.push({ key: "TilingType", value: "1" }), i3.push({ key: "BBox", value: "[" + t2.boundingBox.map(O2).join(" ") + "]" }), i3.push({ key: "XStep", value: O2(t2.xStep) }), i3.push({ key: "YStep", value: O2(t2.yStep) }), i3.push({ key: "Resources", value: r2 + " 0 R" }), t2.matrix && i3.push({ key: "Matrix", value: "[" + t2.matrix.toString() + "]" }), ie2({ data: t2.stream, additionalKeyValues: i3, objectId: t2.objectNumber }), lt2("endobj"); }, pe2 = function(t2) { var e2; for (e2 in Ot2) Ot2.hasOwnProperty(e2) && (Ot2[e2] instanceof B ? fe2(Ot2[e2]) : Ot2[e2] instanceof M && de2(Ot2[e2], t2)); }, ge2 = function(t2) { for (var e2 in t2.objectNumber = Xt2(), lt2("<<"), t2) switch (e2) { case "opacity": lt2("/ca " + R2(t2[e2])); break; case "stroke-opacity": lt2("/CA " + R2(t2[e2])); } lt2(">>"), lt2("endobj"); }, me2 = function() { var t2; for (t2 in Mt2) Mt2.hasOwnProperty(t2) && ge2(Mt2[t2]); }, ve2 = function() { for (var t2 in lt2("/XObject <<"), zt2) zt2.hasOwnProperty(t2) && zt2[t2].objectNumber >= 0 && lt2("/" + t2 + " " + zt2[t2].objectNumber + " 0 R"); Tt2.publish("putXobjectDict"), lt2(">>"); }, be2 = function() { Ye.oid = Xt2(), lt2("<<"), lt2("/Filter /Standard"), lt2("/V " + Ye.v), lt2("/R " + Ye.r), lt2("/U <" + Ye.toHexString(Ye.U) + ">"), lt2("/O <" + Ye.toHexString(Ye.O) + ">"), lt2("/P " + Ye.P), lt2(">>"), lt2("endobj"); }, ye2 = function() { for (var t2 in lt2("/Font <<"), Ft2) Ft2.hasOwnProperty(t2) && (false === v2 || true === v2 && b3.hasOwnProperty(t2)) && lt2("/" + t2 + " " + Ft2[t2].objectNumber + " 0 R"); lt2(">>"); }, we2 = function() { if (Object.keys(Ot2).length > 0) { for (var t2 in lt2("/Shading <<"), Ot2) Ot2.hasOwnProperty(t2) && Ot2[t2] instanceof B && Ot2[t2].objectNumber >= 0 && lt2("/" + t2 + " " + Ot2[t2].objectNumber + " 0 R"); Tt2.publish("putShadingPatternDict"), lt2(">>"); } }, Ne2 = function(t2) { if (Object.keys(Ot2).length > 0) { for (var e2 in lt2("/Pattern <<"), Ot2) Ot2.hasOwnProperty(e2) && Ot2[e2] instanceof y2.TilingPattern && Ot2[e2].objectNumber >= 0 && Ot2[e2].objectNumber < t2 && lt2("/" + e2 + " " + Ot2[e2].objectNumber + " 0 R"); Tt2.publish("putTilingPatternDict"), lt2(">>"); } }, Le2 = function() { if (Object.keys(Mt2).length > 0) { var t2; for (t2 in lt2("/ExtGState <<"), Mt2) Mt2.hasOwnProperty(t2) && Mt2[t2].objectNumber >= 0 && lt2("/" + t2 + " " + Mt2[t2].objectNumber + " 0 R"); Tt2.publish("putGStateDict"), lt2(">>"); } }, Ae = function(t2) { Zt2(t2.resourcesOid, true), lt2("<<"), lt2("/ProcSet [/PDF /Text /ImageB /ImageC /ImageI]"), ye2(), we2(), Ne2(t2.objectOid), Le2(), ve2(), lt2(">>"), lt2("endobj"); }, xe = function() { var t2 = []; ce2(), me2(), he2(), pe2(t2), Tt2.publish("putResources"), t2.forEach(Ae), Ae({ resourcesOid: te3, objectOid: Number.MAX_SAFE_INTEGER }), Tt2.publish("postPutResources"); }, Se = function() { Tt2.publish("putAdditionalObjects"); for (var t2 = 0; t2 < at2.length; t2++) { var e2 = at2[t2]; Zt2(e2.objId, true), lt2(e2.content), lt2("endobj"); } Tt2.publish("postPutAdditionalObjects"); }, _e = function(t2) { Ct2[t2.fontName] = Ct2[t2.fontName] || {}, Ct2[t2.fontName][t2.fontStyle] = t2.id; }, Pe = function(t2, e2, r2, n2, i3) { var a2 = { id: "F" + (Object.keys(Ft2).length + 1).toString(10), postScriptName: t2, fontName: e2, fontStyle: r2, encoding: n2, isStandardFont: i3 || false, metadata: {} }; return Tt2.publish("addFont", { font: a2, instance: this }), Ft2[a2.id] = a2, _e(a2), a2.id; }, ke = function(t2) { for (var e2 = 0, r2 = pt2.length; e2 < r2; e2++) { var n2 = Pe.call(this, t2[e2][0], t2[e2][1], t2[e2][2], pt2[e2][3], true); false === v2 && (b3[n2] = true); var i3 = t2[e2][0].split("-"); _e({ id: n2, fontName: i3[0], fontStyle: i3[1] || "" }); } Tt2.publish("addFonts", { fonts: Ft2, dictionary: Ct2 }); }, Ie = function(t2) { return t2.foo = function() { try { return t2.apply(this, arguments); } catch (t3) { var e2 = t3.stack || ""; ~e2.indexOf(" at ") && (e2 = e2.split(" at ")[1]); var r2 = "Error in function " + e2.split("\n")[0].split("<")[0] + ": " + t3.message; if (!n.console) throw new Error(r2); n.console.error(r2, t3), n.alert && alert(r2); } }, t2.foo.bar = t2, t2.foo; }, Fe = function(t2, e2) { var r2, n2, i3, a2, o3, s3, c3, u3, h2; if (i3 = (e2 = e2 || {}).sourceEncoding || "Unicode", o3 = e2.outputEncoding, (e2.autoencode || o3) && Ft2[St2].metadata && Ft2[St2].metadata[i3] && Ft2[St2].metadata[i3].encoding && (a2 = Ft2[St2].metadata[i3].encoding, !o3 && Ft2[St2].encoding && (o3 = Ft2[St2].encoding), !o3 && a2.codePages && (o3 = a2.codePages[0]), "string" == typeof o3 && (o3 = a2[o3]), o3)) { for (c3 = false, s3 = [], r2 = 0, n2 = t2.length; r2 < n2; r2++) (u3 = o3[t2.charCodeAt(r2)]) ? s3.push(String.fromCharCode(u3)) : s3.push(t2[r2]), s3[r2].charCodeAt(0) >> 8 && (c3 = true); t2 = s3.join(""); } for (r2 = t2.length; void 0 === c3 && 0 !== r2; ) t2.charCodeAt(r2 - 1) >> 8 && (c3 = true), r2--; if (!c3) return t2; for (s3 = e2.noBOM ? [] : [254, 255], r2 = 0, n2 = t2.length; r2 < n2; r2++) { if ((h2 = (u3 = t2.charCodeAt(r2)) >> 8) >> 8) throw new Error("Character at position " + r2 + " of string '" + t2 + "' exceeds 16bits. Cannot be encoded into UCS-2 BE"); s3.push(h2), s3.push(u3 - (h2 << 8)); } return String.fromCharCode.apply(void 0, s3); }, Ce = y2.__private__.pdfEscape = y2.pdfEscape = function(t2, e2) { return Fe(t2, e2).replace(/\\/g, "\\\\").replace(/\(/g, "\\(").replace(/\)/g, "\\)"); }, je = y2.__private__.beginPage = function(t2) { ot2[++Dt2] = [], Rt2[Dt2] = { objId: 0, contentsObjId: 0, userUnit: Number(d2), artBox: null, bleedBox: null, cropBox: null, trimBox: null, mediaBox: { bottomLeftX: 0, bottomLeftY: 0, topRightX: Number(t2[0]), topRightY: Number(t2[1]) } }, Me(Dt2), ht2(ot2[$2]); }, Oe = function(t2, e2) { var r2, n2, o3; switch (i2 = e2 || i2, "string" == typeof t2 && (r2 = A2(t2.toLowerCase()), Array.isArray(r2) && (n2 = r2[0], o3 = r2[1])), Array.isArray(t2) && (n2 = t2[0] * _t2, o3 = t2[1] * _t2), isNaN(n2) && (n2 = s2[0], o3 = s2[1]), (n2 > 14400 || o3 > 14400) && (a.warn("A page in a PDF can not be wider or taller than 14400 userUnit. jsPDF limits the width/height to 14400"), n2 = Math.min(14400, n2), o3 = Math.min(14400, o3)), s2 = [n2, o3], i2.substr(0, 1)) { case "l": o3 > n2 && (s2 = [o3, n2]); break; case "p": n2 > o3 && (s2 = [o3, n2]); } je(s2), pr(fr), lt2(Lr), 0 !== kr && lt2(kr + " J"), 0 !== Ir && lt2(Ir + " j"), Tt2.publish("addPage", { pageNumber: Dt2 }); }, Be = function(t2) { t2 > 0 && t2 <= Dt2 && (ot2.splice(t2, 1), Rt2.splice(t2, 1), Dt2--, $2 > Dt2 && ($2 = Dt2), this.setPage($2)); }, Me = function(t2) { t2 > 0 && t2 <= Dt2 && ($2 = t2); }, Ee = y2.__private__.getNumberOfPages = y2.getNumberOfPages = function() { return ot2.length - 1; }, qe = function(t2, e2, r2) { var n2, i3 = void 0; return r2 = r2 || {}, t2 = void 0 !== t2 ? t2 : Ft2[St2].fontName, e2 = void 0 !== e2 ? e2 : Ft2[St2].fontStyle, n2 = t2.toLowerCase(), void 0 !== Ct2[n2] && void 0 !== Ct2[n2][e2] ? i3 = Ct2[n2][e2] : void 0 !== Ct2[t2] && void 0 !== Ct2[t2][e2] ? i3 = Ct2[t2][e2] : false === r2.disableWarning && a.warn("Unable to look up font label for font '" + t2 + "', '" + e2 + "'. Refer to getFontList() for available fonts."), i3 || r2.noFallback || null == (i3 = Ct2.times[e2]) && (i3 = Ct2.times.normal), i3; }, De = y2.__private__.putInfo = function() { var t2 = Xt2(), e2 = function(t3) { return t3; }; for (var r2 in null !== m2 && (e2 = Ye.encryptor(t2, 0)), lt2("<<"), lt2("/Producer (" + Ce(e2("jsPDF " + E.version)) + ")"), xt2) xt2.hasOwnProperty(r2) && xt2[r2] && lt2("/" + r2.substr(0, 1).toUpperCase() + r2.substr(1) + " (" + Ce(e2(xt2[r2])) + ")"); lt2("/CreationDate (" + Ce(e2(W2)) + ")"), lt2(">>"), lt2("endobj"); }, Re = y2.__private__.putCatalog = function(t2) { var e2 = (t2 = t2 || {}).rootDictionaryObjId || Qt2; switch (Xt2(), lt2("<<"), lt2("/Type /Catalog"), lt2("/Pages " + e2 + " 0 R"), mt2 || (mt2 = "fullwidth"), mt2) { case "fullwidth": lt2("/OpenAction [3 0 R /FitH null]"); break; case "fullheight": lt2("/OpenAction [3 0 R /FitV null]"); break; case "fullpage": lt2("/OpenAction [3 0 R /Fit]"); break; case "original": lt2("/OpenAction [3 0 R /XYZ null null 1]"); break; default: var r2 = "" + mt2; "%" === r2.substr(r2.length - 1) && (mt2 = parseInt(mt2) / 100), "number" == typeof mt2 && lt2("/OpenAction [3 0 R /XYZ null null " + R2(mt2) + "]"); } switch (Nt2 || (Nt2 = "continuous"), Nt2) { case "continuous": lt2("/PageLayout /OneColumn"); break; case "single": lt2("/PageLayout /SinglePage"); break; case "two": case "twoleft": lt2("/PageLayout /TwoColumnLeft"); break; case "tworight": lt2("/PageLayout /TwoColumnRight"); } yt2 && lt2("/PageMode /" + yt2), Tt2.publish("putCatalog"), lt2(">>"), lt2("endobj"); }, Te = y2.__private__.putTrailer = function() { lt2("trailer"), lt2("<<"), lt2("/Size " + (et3 + 1)), lt2("/Root " + et3 + " 0 R"), lt2("/Info " + (et3 - 1) + " 0 R"), null !== m2 && lt2("/Encrypt " + Ye.oid + " 0 R"), lt2("/ID [ <" + V2 + "> <" + V2 + "> ]"), lt2(">>"); }, Ue = y2.__private__.putHeader = function() { lt2("%PDF-" + w2), lt2("%ºß¬à"); }, ze = y2.__private__.putXRef = function() { var t2 = "0000000000"; lt2("xref"), lt2("0 " + (et3 + 1)), lt2("0000000000 65535 f "); for (var e2 = 1; e2 <= et3; e2++) { "function" == typeof rt2[e2] ? lt2((t2 + rt2[e2]()).slice(-10) + " 00000 n ") : void 0 !== rt2[e2] ? lt2((t2 + rt2[e2]).slice(-10) + " 00000 n ") : lt2("0000000000 00000 n "); } }, He = y2.__private__.buildDocument = function() { ut2(), ht2(nt2), Tt2.publish("buildDocument"), Ue(), oe2(), Se(), xe(), null !== m2 && be2(), De(), Re(); var t2 = it2; return ze(), Te(), lt2("startxref"), lt2("" + t2), lt2("%%EOF"), ht2(ot2[$2]), nt2.join("\n"); }, We = y2.__private__.getBlob = function(t2) { return new Blob([dt2(t2)], { type: "application/pdf" }); }, Ve = y2.output = y2.__private__.output = Ie(function(t2, e2) { switch ("string" == typeof (e2 = e2 || {}) ? e2 = { filename: e2 } : e2.filename = e2.filename || "generated.pdf", t2) { case void 0: return He(); case "save": y2.save(e2.filename); break; case "arraybuffer": return dt2(He()); case "blob": return We(He()); case "bloburi": case "bloburl": if (void 0 !== n.URL && "function" == typeof n.URL.createObjectURL) return n.URL && n.URL.createObjectURL(We(He())) || void 0; a.warn("bloburl is not supported by your system, because URL.createObjectURL is not supported by your browser."); break; case "datauristring": case "dataurlstring": var r2 = "", i3 = He(); try { r2 = h(i3); } catch (t3) { r2 = h(unescape(encodeURIComponent(i3))); } return "data:application/pdf;filename=" + e2.filename + ";base64," + r2; case "pdfobjectnewwindow": if ("[object Window]" === Object.prototype.toString.call(n)) { var o3 = "https://cdnjs.cloudflare.com/ajax/libs/pdfobject/2.1.1/pdfobject.min.js", s3 = ' integrity="sha512-4ze/a9/4jqu+tX9dfOqJYSvyYd5M6qum/3HpCLr+/Jqf0whc37VUbkpNGHR7/8pSnCFw47T1fmIpwBV7UySh3g==" crossorigin="anonymous"'; e2.pdfObjectUrl && (o3 = e2.pdfObjectUrl, s3 = ""); var c3 = '