!function (t) { "function" == typeof define && define.amd ? define(t) : t() }(function () { "use strict"; /** @license * jsPDF - PDF Document creation from JavaScript * Version 1.5.3 Built on 2018-12-27T14:11:42.696Z * CommitID d93d28db14 * * Copyright (c) 2010-2016 James Hall , https://github.com/MrRio/jsPDF * 2010 Aaron Spike, https://github.com/acspike * 2012 Willow Systems Corporation, willow-systems.com * 2012 Pablo Hess, https://github.com/pablohess * 2012 Florian Jenett, https://github.com/fjenett * 2013 Warren Weckesser, https://github.com/warrenweckesser * 2013 Youssef Beddad, https://github.com/lifof * 2013 Lee Driscoll, https://github.com/lsdriscoll * 2013 Stefan Slonevskiy, https://github.com/stefslon * 2013 Jeremy Morel, https://github.com/jmorel * 2013 Christoph Hartmann, https://github.com/chris-rock * 2014 Juan Pablo Gaviria, https://github.com/juanpgaviria * 2014 James Makes, https://github.com/dollaruw * 2014 Diego Casorran, https://github.com/diegocr * 2014 Steven Spungin, https://github.com/Flamenco * 2014 Kenneth Glassey, https://github.com/Gavvers * * Licensed under the MIT License * * Contributor(s): * siefkenj, ahwolf, rickygu, Midnith, saintclair, eaparango, * kim3er, mfo, alnorth, Flamenco */function se(t) { return (se = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (t) { return typeof t } : function (t) { return t && "function" == typeof Symbol && t.constructor === Symbol && t !== Symbol.prototype ? "symbol" : typeof t })(t) } !function (t) { if ("object" !== se(t.console)) { t.console = {}; for (var e, n, r = t.console, i = function () { }, o = ["memory"], a = "assert,clear,count,debug,dir,dirxml,error,exception,group,groupCollapsed,groupEnd,info,log,markTimeline,profile,profiles,profileEnd,show,table,time,timeEnd,timeline,timelineEnd,timeStamp,trace,warn".split(","); e = o.pop();)r[e] || (r[e] = {}); for (; n = a.pop();)r[n] || (r[n] = i) } var s, l, h, u, c = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/="; void 0 === t.btoa && (t.btoa = function (t) { var e, n, r, i, o, a = 0, s = 0, l = "", h = []; if (!t) return t; for (; e = (o = t.charCodeAt(a++) << 16 | t.charCodeAt(a++) << 8 | t.charCodeAt(a++)) >> 18 & 63, n = o >> 12 & 63, r = o >> 6 & 63, i = 63 & o, h[s++] = c.charAt(e) + c.charAt(n) + c.charAt(r) + c.charAt(i), a < t.length;); l = h.join(""); var u = t.length % 3; return (u ? l.slice(0, u - 3) : l) + "===".slice(u || 3) }), void 0 === t.atob && (t.atob = function (t) { var e, n, r, i, o, a, s = 0, l = 0, h = []; if (!t) return t; for (t += ""; e = (a = c.indexOf(t.charAt(s++)) << 18 | c.indexOf(t.charAt(s++)) << 12 | (i = c.indexOf(t.charAt(s++))) << 6 | (o = c.indexOf(t.charAt(s++)))) >> 16 & 255, n = a >> 8 & 255, r = 255 & a, h[l++] = 64 == i ? String.fromCharCode(e) : 64 == o ? String.fromCharCode(e, n) : String.fromCharCode(e, n, r), s < t.length;); return h.join("") }), Array.prototype.map || (Array.prototype.map = function (t) { if (null == this || "function" != typeof t) throw new TypeError; for (var e = Object(this), n = e.length >>> 0, r = new Array(n), i = 1 < arguments.length ? arguments[1] : void 0, o = 0; o < n; o++)o in e && (r[o] = t.call(i, e[o], o, e)); return r }), Array.isArray || (Array.isArray = function (t) { return "[object Array]" === Object.prototype.toString.call(t) }), Array.prototype.forEach || (Array.prototype.forEach = function (t, e) { if (null == this || "function" != typeof t) throw new TypeError; for (var n = Object(this), r = n.length >>> 0, i = 0; i < r; i++)i in n && t.call(e, n[i], i, n) }), Array.prototype.find || Object.defineProperty(Array.prototype, "find", { value: function (t) { if (null == this) throw new TypeError('"this" is null or not defined'); var e = Object(this), n = e.length >>> 0; if ("function" != typeof t) throw new TypeError("predicate must be a function"); for (var r = arguments[1], i = 0; i < n;) { var o = e[i]; if (t.call(r, o, i, e)) return o; i++ } }, configurable: !0, writable: !0 }), Object.keys || (Object.keys = (s = Object.prototype.hasOwnProperty, l = !{ toString: null }.propertyIsEnumerable("toString"), u = (h = ["toString", "toLocaleString", "valueOf", "hasOwnProperty", "isPrototypeOf", "propertyIsEnumerable", "constructor"]).length, function (t) { if ("object" !== se(t) && ("function" != typeof t || null === t)) throw new TypeError; var e, n, r = []; for (e in t) s.call(t, e) && r.push(e); if (l) for (n = 0; n < u; n++)s.call(t, h[n]) && r.push(h[n]); return r })), "function" != typeof Object.assign && (Object.assign = function (t) { if (null == t) throw new TypeError("Cannot convert undefined or null to object"); t = Object(t); for (var e = 1; e < arguments.length; e++) { var n = arguments[e]; if (null != n) for (var r in n) Object.prototype.hasOwnProperty.call(n, r) && (t[r] = n[r]) } return t }), String.prototype.trim || (String.prototype.trim = function () { return this.replace(/^\s+|\s+$/g, "") }), String.prototype.trimLeft || (String.prototype.trimLeft = function () { return this.replace(/^\s+/g, "") }), String.prototype.trimRight || (String.prototype.trimRight = function () { return this.replace(/\s+$/g, "") }), Number.isInteger = Number.isInteger || function (t) { return "number" == typeof t && isFinite(t) && Math.floor(t) === t } }("undefined" != typeof self && self || "undefined" != typeof window && window || "undefined" != typeof global && global || Function('return typeof this === "object" && this.content')() || Function("return this")()); var t, e, n, _, l, F, P, p, d, k, a, o, s, h, u, c, r, i, f, g, m, y, v, w, b, x, I, C, B, N, L, A, S, j, E, M, O, q, T, R, D, U, z, H, W, V, G, Y, J, X, K, Z, Q, $, tt, et, nt, rt, it, ot, at, st, lt = function (ie) { function oe(o) { if ("object" !== se(o)) throw new Error("Invalid Context passed to initialize PubSub (jsPDF-module)"); var a = {}; this.subscribe = function (t, e, 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)"); a.hasOwnProperty(t) || (a[t] = {}); var r = Math.random().toString(35); return a[t][r] = [e, !!n], r }, this.unsubscribe = function (t) { for (var e in a) if (a[e][t]) return delete a[e][t], 0 === Object.keys(a[e]).length && delete a[e], !0; return !1 }, this.publish = function (t) { if (a.hasOwnProperty(t)) { var e = Array.prototype.slice.call(arguments, 1), n = []; for (var r in a[t]) { var i = a[t][r]; try { i[0].apply(o, e) } catch (t) { ie.console && console.error("jsPDF PubSub Error", t.message, t) } i[1] && n.push(r) } n.length && n.forEach(this.unsubscribe) } }, this.getTopics = function () { return a } } function ae(t, e, i, n) { var r = {}, o = [], a = 1; "object" === se(t) && (t = (r = t).orientation, e = r.unit || e, i = r.format || i, n = r.compress || r.compressPdf || n, o = r.filters || (!0 === n ? ["FlateEncode"] : o), a = "number" == typeof r.userUnit ? Math.abs(r.userUnit) : 1), e = e || "mm", t = ("" + (t || "P")).toLowerCase(); var s = r.putOnlyUsedFonts || !0, K = {}, l = { internal: {}, __private__: {} }; l.__private__.PubSub = oe; var h = "1.3", u = l.__private__.getPdfVersion = function () { return h }, c = (l.__private__.setPdfVersion = function (t) { h = t }, { a0: [2383.94, 3370.39], a1: [1683.78, 2383.94], a2: [1190.55, 1683.78], a3: [841.89, 1190.55], a4: [595.28, 841.89], a5: [419.53, 595.28], a6: [297.64, 419.53], a7: [209.76, 297.64], a8: [147.4, 209.76], a9: [104.88, 147.4], a10: [73.7, 104.88], b0: [2834.65, 4008.19], b1: [2004.09, 2834.65], b2: [1417.32, 2004.09], b3: [1000.63, 1417.32], b4: [708.66, 1000.63], b5: [498.9, 708.66], b6: [354.33, 498.9], b7: [249.45, 354.33], b8: [175.75, 249.45], b9: [124.72, 175.75], b10: [87.87, 124.72], c0: [2599.37, 3676.54], c1: [1836.85, 2599.37], c2: [1298.27, 1836.85], c3: [918.43, 1298.27], c4: [649.13, 918.43], c5: [459.21, 649.13], c6: [323.15, 459.21], c7: [229.61, 323.15], c8: [161.57, 229.61], c9: [113.39, 161.57], c10: [79.37, 113.39], dl: [311.81, 623.62], letter: [612, 792], "government-letter": [576, 756], legal: [612, 1008], "junior-legal": [576, 360], ledger: [1224, 792], tabloid: [792, 1224], "credit-card": [153, 243] }), f = (l.__private__.getPageFormats = function () { return c }, l.__private__.getPageFormat = function (t) { return c[t] }); "string" == typeof i && (i = f(i)), i = i || f("a4"); var p, Z = l.f2 = l.__private__.f2 = function (t) { if (isNaN(t)) throw new Error("Invalid argument passed to jsPDF.f2"); return t.toFixed(2) }, Q = l.__private__.f3 = function (t) { if (isNaN(t)) throw new Error("Invalid argument passed to jsPDF.f3"); return t.toFixed(3) }, d = "00000000000000000000000000000000", g = l.__private__.getFileId = function () { return d }, m = l.__private__.setFileId = function (t) { return t = t || "12345678901234567890123456789012".split("").map(function () { return "ABCDEF0123456789".charAt(Math.floor(16 * Math.random())) }).join(""), d = t }; l.setFileId = function (t) { return m(t), this }, l.getFileId = function () { return g() }; var y = l.__private__.convertDateToPDFDate = function (t) { var e = t.getTimezoneOffset(), n = e < 0 ? "+" : "-", r = Math.floor(Math.abs(e / 60)), i = Math.abs(e % 60), o = [n, P(r), "'", P(i), "'"].join(""); return ["D:", t.getFullYear(), P(t.getMonth() + 1), P(t.getDate()), P(t.getHours()), P(t.getMinutes()), P(t.getSeconds()), o].join("") }, v = l.__private__.convertPDFDateToDate = function (t) { var e = parseInt(t.substr(2, 4), 10), n = parseInt(t.substr(6, 2), 10) - 1, r = parseInt(t.substr(8, 2), 10), i = parseInt(t.substr(10, 2), 10), o = parseInt(t.substr(12, 2), 10), a = parseInt(t.substr(14, 2), 10); parseInt(t.substr(16, 2), 10), parseInt(t.substr(20, 2), 10); return new Date(e, n, r, i, o, a, 0) }, w = l.__private__.setCreationDate = function (t) { var e; if (void 0 === t && (t = new Date), "object" === se(t) && "[object Date]" === Object.prototype.toString.call(t)) e = y(t); 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(t)) throw new Error("Invalid argument passed to jsPDF.setCreationDate"); e = t } return p = e }, b = l.__private__.getCreationDate = function (t) { var e = p; return "jsDate" === t && (e = v(p)), e }; l.setCreationDate = function (t) { return w(t), this }, l.getCreationDate = function (t) { return b(t) }; var x, N, L, A, S, $, _, F, P = l.__private__.padd2 = function (t) { return ("0" + parseInt(t)).slice(-2) }, k = !1, I = [], C = [], B = 0, tt = (l.__private__.setCustomOutputDestination = function (t) { N = t }, l.__private__.resetCustomOutputDestination = function (t) { N = void 0 }, l.__private__.out = function (t) { var e; return t = "string" == typeof t ? t : t.toString(), (e = void 0 === N ? k ? I[x] : C : N).push(t), k || (B += t.length + 1), e }), j = l.__private__.write = function (t) { return tt(1 === arguments.length ? t.toString() : Array.prototype.join.call(arguments, " ")) }, E = l.__private__.getArrayBuffer = function (t) { for (var e = t.length, n = new ArrayBuffer(e), r = new Uint8Array(n); e--;)r[e] = t.charCodeAt(e); return n }, M = [["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]], et = (l.__private__.getStandardFonts = function (t) { return M }, r.fontSize || 16), O = (l.__private__.setFontSize = l.setFontSize = function (t) { return et = t, this }, l.__private__.getFontSize = l.getFontSize = function () { return et }), nt = r.R2L || !1, q = (l.__private__.setR2L = l.setR2L = function (t) { return nt = t, this }, l.__private__.getR2L = l.getR2L = function (t) { return nt }, l.__private__.setZoomMode = function (t) { var e = [void 0, null, "fullwidth", "fullheight", "fullpage", "original"]; if (/^\d*\.?\d*\%$/.test(t)) L = t; else if (isNaN(t)) { 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.'); L = t } else L = parseInt(t, 10) }), T = (l.__private__.getZoomMode = function () { return L }, l.__private__.setPageMode = function (t) { 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.'); A = t }), R = (l.__private__.getPageMode = function () { return A }, l.__private__.setLayoutMode = function (t) { 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.'); S = t }), D = (l.__private__.getLayoutMode = function () { return S }, l.__private__.setDisplayMode = l.setDisplayMode = function (t, e, n) { return q(t), R(e), T(n), this }, { title: "", subject: "", author: "", keywords: "", creator: "" }), U = (l.__private__.getDocumentProperty = function (t) { if (-1 === Object.keys(D).indexOf(t)) throw new Error("Invalid argument passed to jsPDF.getDocumentProperty"); return D[t] }, l.__private__.getDocumentProperties = function (t) { return D }, l.__private__.setDocumentProperties = l.setProperties = l.setDocumentProperties = function (t) { for (var e in D) D.hasOwnProperty(e) && t[e] && (D[e] = t[e]); return this }, l.__private__.setDocumentProperty = function (t, e) { if (-1 === Object.keys(D).indexOf(t)) throw new Error("Invalid arguments passed to jsPDF.setDocumentProperty"); return D[t] = e }, 0), z = [], rt = {}, H = {}, W = 0, V = [], G = [], it = new oe(l), Y = r.hotfixes || [], J = l.__private__.newObject = function () { var t = X(); return ot(t, !0), t }, X = l.__private__.newObjectDeferred = function () { return z[++U] = function () { return B }, U }, ot = function (t, e) { return e = "boolean" == typeof e && e, z[t] = B, e && tt(t + " 0 obj"), t }, at = l.__private__.newAdditionalObject = function () { var t = { objId: X(), content: "" }; return G.push(t), t }, st = X(), lt = X(), ht = l.__private__.decodeColorString = function (t) { var e = t.split(" "); if (2 === e.length && ("g" === e[1] || "G" === e[1])) { var n = parseFloat(e[0]); e = [n, n, n, "r"] } for (var r = "#", i = 0; i < 3; i++)r += ("0" + Math.floor(255 * parseFloat(e[i])).toString(16)).slice(-2); return r }, ut = l.__private__.encodeColorString = function (t) { var e; "string" == typeof t && (t = { ch1: t }); var n = t.ch1, r = t.ch2, i = t.ch3, o = t.ch4, a = (t.precision, "draw" === t.pdfColorType ? ["G", "RG", "K"] : ["g", "rg", "k"]); if ("string" == typeof n && "#" !== n.charAt(0)) { var s = new RGBColor(n); if (s.ok) n = s.toHex(); else if (!/^\d*\.?\d*$/.test(n)) throw new Error('Invalid color "' + n + '" passed to jsPDF.encodeColorString.') } 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)) { var l = parseInt(n.substr(1), 16); n = l >> 16 & 255, r = l >> 8 & 255, i = 255 & l } if (void 0 === r || void 0 === o && n === r && r === i) if ("string" == typeof n) e = n + " " + a[0]; else switch (t.precision) { case 2: e = Z(n / 255) + " " + a[0]; break; case 3: default: e = Q(n / 255) + " " + a[0] } else if (void 0 === o || "object" === se(o)) { if (o && !isNaN(o.a) && 0 === o.a) return e = ["1.000", "1.000", "1.000", a[1]].join(" "); if ("string" == typeof n) e = [n, r, i, a[1]].join(" "); else switch (t.precision) { case 2: e = [Z(n / 255), Z(r / 255), Z(i / 255), a[1]].join(" "); break; default: case 3: e = [Q(n / 255), Q(r / 255), Q(i / 255), a[1]].join(" ") } } else if ("string" == typeof n) e = [n, r, i, o, a[2]].join(" "); else switch (t.precision) { case 2: e = [Z(n / 255), Z(r / 255), Z(i / 255), Z(o / 255), a[2]].join(" "); break; case 3: default: e = [Q(n / 255), Q(r / 255), Q(i / 255), Q(o / 255), a[2]].join(" ") }return e }, ct = l.__private__.getFilters = function () { return o }, ft = l.__private__.putStream = function (t) { var e = (t = t || {}).data || "", n = t.filters || ct(), r = t.alreadyAppliedFilters || [], i = t.addLength1 || !1, o = e.length, a = {}; !0 === n && (n = ["FlateEncode"]); var s = t.additionalKeyValues || [], l = (a = void 0 !== ae.API.processDataByFilters ? ae.API.processDataByFilters(e, n) : { data: e, reverseChain: [] }).reverseChain + (Array.isArray(r) ? r.join(" ") : r.toString()); 0 !== a.data.length && (s.push({ key: "Length", value: a.data.length }), !0 === i && s.push({ key: "Length1", value: o })), 0 != l.length && (l.split("/").length - 1 == 1 ? s.push({ key: "Filter", value: l }) : s.push({ key: "Filter", value: "[" + l + "]" })), tt("<<"); for (var h = 0; h < s.length; h++)tt("/" + s[h].key + " " + s[h].value); tt(">>"), 0 !== a.data.length && (tt("stream"), tt(a.data), tt("endstream")) }, pt = l.__private__.putPage = function (t) { t.mediaBox; var e = t.number, n = t.data, r = t.objId, i = t.contentsObjId; ot(r, !0); V[x].mediaBox.topRightX, V[x].mediaBox.bottomLeftX, V[x].mediaBox.topRightY, V[x].mediaBox.bottomLeftY; tt("<>"), tt("endobj"); var o = n.join("\n"); return ot(i, !0), ft({ data: o, filters: ct() }), tt("endobj"), r }, dt = l.__private__.putPages = function () { var t, e, n = []; for (t = 1; t <= W; t++)V[t].objId = X(), V[t].contentsObjId = X(); for (t = 1; t <= W; t++)n.push(pt({ number: t, data: I[t], objId: V[t].objId, contentsObjId: V[t].contentsObjId, mediaBox: V[t].mediaBox, cropBox: V[t].cropBox, bleedBox: V[t].bleedBox, trimBox: V[t].trimBox, artBox: V[t].artBox, userUnit: V[t].userUnit, rootDictionaryObjId: st, resourceDictionaryObjId: lt })); ot(st, !0), tt("<>"), tt("endobj"), it.publish("postPutPages") }, gt = function () { !function () { for (var t in rt) rt.hasOwnProperty(t) && (!1 === s || !0 === s && K.hasOwnProperty(t)) && (e = rt[t], it.publish("putFont", { font: e, out: tt, newObject: J, putStream: ft }), !0 !== e.isAlreadyPutted && (e.objectNumber = J(), tt("<<"), tt("/Type /Font"), tt("/BaseFont /" + e.postScriptName), tt("/Subtype /Type1"), "string" == typeof e.encoding && tt("/Encoding /" + e.encoding), tt("/FirstChar 32"), tt("/LastChar 255"), tt(">>"), tt("endobj"))); var e }(), it.publish("putResources"), ot(lt, !0), tt("<<"), function () { for (var t in tt("/ProcSet [/PDF /Text /ImageB /ImageC /ImageI]"), tt("/Font <<"), rt) rt.hasOwnProperty(t) && (!1 === s || !0 === s && K.hasOwnProperty(t)) && tt("/" + t + " " + rt[t].objectNumber + " 0 R"); tt(">>"), tt("/XObject <<"), it.publish("putXobjectDict"), tt(">>") }(), tt(">>"), tt("endobj"), it.publish("postPutResources") }, mt = function (t, e, n) { H.hasOwnProperty(e) || (H[e] = {}), H[e][n] = t }, yt = function (t, e, n, r, i) { i = i || !1; var o = "F" + (Object.keys(rt).length + 1).toString(10), a = { id: o, postScriptName: t, fontName: e, fontStyle: n, encoding: r, isStandardFont: i, metadata: {} }; return it.publish("addFont", { font: a, instance: this }), void 0 !== o && (rt[o] = a, mt(o, e, n)), o }, vt = l.__private__.pdfEscape = l.pdfEscape = function (t, e) { return function (t, e) { var n, r, i, o, a, s, l, h, u; if (i = (e = e || {}).sourceEncoding || "Unicode", a = e.outputEncoding, (e.autoencode || a) && rt[$].metadata && rt[$].metadata[i] && rt[$].metadata[i].encoding && (o = rt[$].metadata[i].encoding, !a && rt[$].encoding && (a = rt[$].encoding), !a && o.codePages && (a = o.codePages[0]), "string" == typeof a && (a = o[a]), a)) { for (l = !1, s = [], n = 0, r = t.length; n < r; n++)(h = a[t.charCodeAt(n)]) ? s.push(String.fromCharCode(h)) : s.push(t[n]), s[n].charCodeAt(0) >> 8 && (l = !0); t = s.join("") } for (n = t.length; void 0 === l && 0 !== n;)t.charCodeAt(n - 1) >> 8 && (l = !0), n--; if (!l) return t; for (s = e.noBOM ? [] : [254, 255], n = 0, r = t.length; n < r; n++) { if ((u = (h = t.charCodeAt(n)) >> 8) >> 8) throw new Error("Character at position " + n + " of string '" + t + "' exceeds 16bits. Cannot be encoded into UCS-2 BE"); s.push(u), s.push(h - (u << 8)) } return String.fromCharCode.apply(void 0, s) }(t, e).replace(/\\/g, "\\\\").replace(/\(/g, "\\(").replace(/\)/g, "\\)") }, wt = l.__private__.beginPage = function (t, e) { var n, r = "string" == typeof e && e.toLowerCase(); if ("string" == typeof t && (n = f(t.toLowerCase())) && (t = n[0], e = n[1]), Array.isArray(t) && (e = t[1], t = t[0]), (isNaN(t) || isNaN(e)) && (t = i[0], e = i[1]), r) { switch (r.substr(0, 1)) { case "l": t < e && (r = "s"); break; case "p": e < t && (r = "s") }"s" === r && (n = t, t = e, e = n) } (14400 < t || 14400 < e) && (console.warn("A page in a PDF can not be wider or taller than 14400 userUnit. jsPDF limits the width/height to 14400"), t = Math.min(14400, t), e = Math.min(14400, e)), i = [t, e], k = !0, I[++W] = [], V[W] = { objId: 0, contentsObjId: 0, userUnit: Number(a), artBox: null, bleedBox: null, cropBox: null, trimBox: null, mediaBox: { bottomLeftX: 0, bottomLeftY: 0, topRightX: Number(t), topRightY: Number(e) } }, xt(W) }, bt = function () { wt.apply(this, arguments), Dt(Rt), tt(Jt), 0 !== te && tt(te + " J"), 0 !== ne && tt(ne + " j"), it.publish("addPage", { pageNumber: W }) }, xt = function (t) { 0 < t && t <= W && (x = t) }, Nt = l.__private__.getNumberOfPages = l.getNumberOfPages = function () { return I.length - 1 }, Lt = function (t, e, n) { var r, i = void 0; return n = n || {}, t = void 0 !== t ? t : rt[$].fontName, e = void 0 !== e ? e : rt[$].fontStyle, r = t.toLowerCase(), void 0 !== H[r] && void 0 !== H[r][e] ? i = H[r][e] : void 0 !== H[t] && void 0 !== H[t][e] ? i = H[t][e] : !1 === n.disableWarning && console.warn("Unable to look up font label for font '" + t + "', '" + e + "'. Refer to getFontList() for available fonts."), i || n.noFallback || null == (i = H.times[e]) && (i = H.times.normal), i }, At = l.__private__.putInfo = function () { for (var t in J(), tt("<<"), tt("/Producer (jsPDF " + ae.version + ")"), D) D.hasOwnProperty(t) && D[t] && tt("/" + t.substr(0, 1).toUpperCase() + t.substr(1) + " (" + vt(D[t]) + ")"); tt("/CreationDate (" + p + ")"), tt(">>"), tt("endobj") }, St = l.__private__.putCatalog = function (t) { var e = (t = t || {}).rootDictionaryObjId || st; switch (J(), tt("<<"), tt("/Type /Catalog"), tt("/Pages " + e + " 0 R"), L || (L = "fullwidth"), L) { case "fullwidth": tt("/OpenAction [3 0 R /FitH null]"); break; case "fullheight": tt("/OpenAction [3 0 R /FitV null]"); break; case "fullpage": tt("/OpenAction [3 0 R /Fit]"); break; case "original": tt("/OpenAction [3 0 R /XYZ null null 1]"); break; default: var n = "" + L; "%" === n.substr(n.length - 1) && (L = parseInt(L) / 100), "number" == typeof L && tt("/OpenAction [3 0 R /XYZ null null " + Z(L) + "]") }switch (S || (S = "continuous"), S) { case "continuous": tt("/PageLayout /OneColumn"); break; case "single": tt("/PageLayout /SinglePage"); break; case "two": case "twoleft": tt("/PageLayout /TwoColumnLeft"); break; case "tworight": tt("/PageLayout /TwoColumnRight") }A && tt("/PageMode /" + A), it.publish("putCatalog"), tt(">>"), tt("endobj") }, _t = l.__private__.putTrailer = function () { tt("trailer"), tt("<<"), tt("/Size " + (U + 1)), tt("/Root " + U + " 0 R"), tt("/Info " + (U - 1) + " 0 R"), tt("/ID [ <" + d + "> <" + d + "> ]"), tt(">>") }, Ft = l.__private__.putHeader = function () { tt("%PDF-" + h), tt("%ºß¬à") }, Pt = l.__private__.putXRef = function () { var t = 1, e = "0000000000"; for (tt("xref"), tt("0 " + (U + 1)), tt("0000000000 65535 f "), t = 1; t <= U; t++) { "function" == typeof z[t] ? tt((e + z[t]()).slice(-10) + " 00000 n ") : void 0 !== z[t] ? tt((e + z[t]).slice(-10) + " 00000 n ") : tt("0000000000 00000 n ") } }, kt = l.__private__.buildDocument = function () { k = !1, B = U = 0, C = [], z = [], G = [], st = X(), lt = X(), it.publish("buildDocument"), Ft(), dt(), function () { it.publish("putAdditionalObjects"); for (var t = 0; t < G.length; t++) { var e = G[t]; ot(e.objId, !0), tt(e.content), tt("endobj") } it.publish("postPutAdditionalObjects") }(), gt(), At(), St(); var t = B; return Pt(), _t(), tt("startxref"), tt("" + t), tt("%%EOF"), k = !0, C.join("\n") }, It = l.__private__.getBlob = function (t) { return new Blob([E(t)], { type: "application/pdf" }) }, Ct = l.output = l.__private__.output = ((F = function (t, e) { e = e || {}; var n = kt(); switch ("string" == typeof e ? e = { filename: e } : e.filename = e.filename || "generated.pdf", t) { case void 0: return n; case "save": l.save(e.filename); break; case "arraybuffer": return E(n); case "blob": return It(n); case "bloburi": case "bloburl": if (void 0 !== ie.URL && "function" == typeof ie.URL.createObjectURL) return ie.URL && ie.URL.createObjectURL(It(n)) || void 0; console.warn("bloburl is not supported by your system, because URL.createObjectURL is not supported by your browser."); break; case "datauristring": case "dataurlstring": return "data:application/pdf;filename=" + e.filename + ";base64," + btoa(n); case "dataurlnewwindow": var r = '', i = ie.open(); if (null !== i && i.document.write(r), i || "undefined" == typeof safari) return i; case "datauri": case "dataurl": return ie.document.location.href = "data:application/pdf;filename=" + e.filename + ";base64," + btoa(n); default: return null } }).foo = function () { try { return F.apply(this, arguments) } catch (t) { var e = t.stack || ""; ~e.indexOf(" at ") && (e = e.split(" at ")[1]); var n = "Error in function " + e.split("\n")[0].split("<")[0] + ": " + t.message; if (!ie.console) throw new Error(n); ie.console.error(n, t), ie.alert && alert(n) } }, (F.foo.bar = F).foo), Bt = function (t) { return !0 === Array.isArray(Y) && -1 < Y.indexOf(t) }; switch (e) { case "pt": _ = 1; break; case "mm": _ = 72 / 25.4; break; case "cm": _ = 72 / 2.54; break; case "in": _ = 72; break; case "px": _ = 1 == Bt("px_scaling") ? .75 : 96 / 72; break; case "pc": case "em": _ = 12; break; case "ex": _ = 6; break; default: throw new Error("Invalid unit: " + e) }w(), m(); var jt = l.__private__.getPageInfo = function (t) { if (isNaN(t) || t % 1 != 0) throw new Error("Invalid argument passed to jsPDF.getPageInfo"); return { objId: V[t].objId, pageNumber: t, pageContext: V[t] } }, Et = l.__private__.getPageInfoByObjId = function (t) { for (var e in V) if (V[e].objId === t) break; if (isNaN(t) || t % 1 != 0) throw new Error("Invalid argument passed to jsPDF.getPageInfoByObjId"); return jt(e) }, Mt = l.__private__.getCurrentPageInfo = function () { return { objId: V[x].objId, pageNumber: x, pageContext: V[x] } }; l.addPage = function () { return bt.apply(this, arguments), this }, l.setPage = function () { return xt.apply(this, arguments), this }, l.insertPage = function (t) { return this.addPage(), this.movePage(x, t), this }, l.movePage = function (t, e) { if (e < t) { for (var n = I[t], r = V[t], i = t; e < i; i--)I[i] = I[i - 1], V[i] = V[i - 1]; I[e] = n, V[e] = r, this.setPage(e) } else if (t < e) { for (n = I[t], r = V[t], i = t; i < e; i++)I[i] = I[i + 1], V[i] = V[i + 1]; I[e] = n, V[e] = r, this.setPage(e) } return this }, l.deletePage = function () { return function (t) { 0 < t && t <= W && (I.splice(t, 1), --W < x && (x = W), this.setPage(x)) }.apply(this, arguments), this }; l.__private__.text = l.text = function (t, e, n, i) { var r; "number" != typeof t || "number" != typeof e || "string" != typeof n && !Array.isArray(n) || (r = n, n = e, e = t, t = r); var o = arguments[3], a = arguments[4], s = arguments[5]; if ("object" === se(o) && null !== o || ("string" == typeof a && (s = a, a = null), "string" == typeof o && (s = o, o = null), "number" == typeof o && (a = o, o = null), i = { flags: o, angle: a, align: s }), (o = o || {}).noBOM = o.noBOM || !0, o.autoencode = o.autoencode || !0, isNaN(e) || isNaN(n) || null == t) throw new Error("Invalid arguments passed to jsPDF.text"); if (0 === t.length) return c; var l, h = "", u = "number" == typeof i.lineHeightFactor ? i.lineHeightFactor : Tt, c = i.scope || this; function f(t) { for (var e, n = t.concat(), r = [], i = n.length; i--;)"string" == typeof (e = n.shift()) ? r.push(e) : Array.isArray(t) && 1 === e.length ? r.push(e[0]) : r.push([e[0], e[1], e[2]]); return r } function p(t, e) { var n; if ("string" == typeof t) n = e(t)[0]; else if (Array.isArray(t)) { for (var r, i, o = t.concat(), a = [], s = o.length; s--;)"string" == typeof (r = o.shift()) ? a.push(e(r)[0]) : Array.isArray(r) && "string" === r[0] && (i = e(r[0], r[1], r[2]), a.push([i[0], i[1], i[2]])); n = a } return n } var d = !1, g = !0; if ("string" == typeof t) d = !0; else if (Array.isArray(t)) { for (var m, y = t.concat(), v = [], w = y.length; w--;)("string" != typeof (m = y.shift()) || Array.isArray(m) && "string" != typeof m[0]) && (g = !1); d = g } if (!1 === d) throw new Error('Type of text must be string or Array. "' + t + '" is not recognized.'); var b = rt[$].encoding; "WinAnsiEncoding" !== b && "StandardEncoding" !== b || (t = p(t, function (t, e, n) { return [(r = t, r = r.split("\t").join(Array(i.TabLen || 9).join(" ")), vt(r, o)), e, n]; var r })), "string" == typeof t && (t = t.match(/[\r?\n]/) ? t.split(/\r\n|\r|\n/g) : [t]); var x = et / c.internal.scaleFactor, N = x * (Tt - 1); switch (i.baseline) { case "bottom": n -= N; break; case "top": n += x - N; break; case "hanging": n += x - 2 * N; break; case "middle": n += x / 2 - N }0 < (O = i.maxWidth || 0) && ("string" == typeof t ? t = c.splitTextToSize(t, O) : "[object Array]" === Object.prototype.toString.call(t) && (t = c.splitTextToSize(t.join(" "), O))); var L = { text: t, x: e, y: n, options: i, mutex: { pdfEscape: vt, activeFontKey: $, fonts: rt, activeFontSize: et } }; it.publish("preProcessText", L), t = L.text; a = (i = L.options).angle; var A = c.internal.scaleFactor, S = []; if (a) { a *= Math.PI / 180; var _ = Math.cos(a), F = Math.sin(a); S = [Z(_), Z(F), Z(-1 * F), Z(_)] } void 0 !== (M = i.charSpace) && (h += Q(M * A) + " Tc\n"); i.lang; var P = -1, k = void 0 !== i.renderingMode ? i.renderingMode : i.stroke, I = c.internal.getCurrentPageInfo().pageContext; switch (k) { case 0: case !1: case "fill": P = 0; break; case 1: case !0: case "stroke": P = 1; break; case 2: case "fillThenStroke": P = 2; break; case 3: case "invisible": P = 3; break; case 4: case "fillAndAddForClipping": P = 4; break; case 5: case "strokeAndAddPathForClipping": P = 5; break; case 6: case "fillThenStrokeAndAddToPathForClipping": P = 6; break; case 7: case "addToPathForClipping": P = 7 }var C = void 0 !== I.usedRenderingMode ? I.usedRenderingMode : -1; -1 !== P ? h += P + " Tr\n" : -1 !== C && (h += "0 Tr\n"), -1 !== P && (I.usedRenderingMode = P); s = i.align || "left"; var B = et * u, j = c.internal.pageSize.getWidth(), E = (A = c.internal.scaleFactor, rt[$]), M = i.charSpace || Qt, O = i.maxWidth || 0, q = (o = {}, []); if ("[object Array]" === Object.prototype.toString.call(t)) { var T, R; v = f(t); "left" !== s && (R = v.map(function (t) { return c.getStringUnitWidth(t, { font: E, charSpace: M, fontSize: et }) * et / A })); var D, U = Math.max.apply(Math, R), z = 0; if ("right" === s) { e -= R[0], t = []; var H = 0; for (w = v.length; H < w; H++)U - R[H], T = 0 === H ? (D = Wt(e), Vt(n)) : (D = (z - R[H]) * A, -B), t.push([v[H], D, T]), z = R[H] } else if ("center" === s) { e -= R[0] / 2, t = []; for (H = 0, w = v.length; H < w; H++)(U - R[H]) / 2, T = 0 === H ? (D = Wt(e), Vt(n)) : (D = (z - R[H]) / 2 * A, -B), t.push([v[H], D, T]), z = R[H] } else if ("left" === s) { t = []; for (H = 0, w = v.length; H < w; H++)T = 0 === H ? Vt(n) : -B, D = 0 === H ? Wt(e) : 0, t.push(v[H]) } else { if ("justify" !== s) throw new Error('Unrecognized alignment option, use "left", "center", "right" or "justify".'); t = []; for (O = 0 !== O ? O : j, H = 0, w = v.length; H < w; H++)T = 0 === H ? Vt(n) : -B, D = 0 === H ? Wt(e) : 0, H < w - 1 && q.push(((O - R[H]) / (v[H].split(" ").length - 1) * A).toFixed(2)), t.push([v[H], D, T]) } } !0 === ("boolean" == typeof i.R2L ? i.R2L : nt) && (t = p(t, function (t, e, n) { return [t.split("").reverse().join(""), e, n] })); L = { text: t, x: e, y: n, options: i, mutex: { pdfEscape: vt, activeFontKey: $, fonts: rt, activeFontSize: et } }; it.publish("postProcessText", L), t = L.text, l = L.mutex.isHex; v = f(t); t = []; var W, V, G, Y = 0, J = (w = v.length, ""); for (H = 0; H < w; H++)J = "", Array.isArray(v[H]) ? (W = parseFloat(v[H][1]), V = parseFloat(v[H][2]), G = (l ? "<" : "(") + v[H][0] + (l ? ">" : ")"), Y = 1) : (W = Wt(e), V = Vt(n), G = (l ? "<" : "(") + v[H] + (l ? ">" : ")")), void 0 !== q && void 0 !== q[H] && (J = q[H] + " Tw\n"), 0 !== S.length && 0 === H ? t.push(J + S.join(" ") + " " + W.toFixed(2) + " " + V.toFixed(2) + " Tm\n" + G) : 1 === Y || 0 === Y && 0 === H ? t.push(J + W.toFixed(2) + " " + V.toFixed(2) + " Td\n" + G) : t.push(J + G); t = 0 === Y ? t.join(" Tj\nT* ") : t.join(" Tj\n"), t += " Tj\n"; var X = "BT\n/" + $ + " " + et + " Tf\n" + (et * u).toFixed(2) + " TL\n" + Kt + "\n"; return X += h, X += t, tt(X += "ET"), K[$] = !0, c }, l.__private__.lstext = l.lstext = function (t, e, n, r) { return console.warn("jsPDF.lstext is deprecated"), this.text(t, e, n, { charSpace: r }) }, l.__private__.clip = l.clip = function (t) { tt("evenodd" === t ? "W*" : "W"), tt("n") }, l.__private__.clip_fixed = l.clip_fixed = function (t) { console.log("clip_fixed is deprecated"), l.clip(t) }; var Ot = l.__private__.isValidStyle = function (t) { var e = !1; return -1 !== [void 0, null, "S", "F", "DF", "FD", "f", "f*", "B", "B*"].indexOf(t) && (e = !0), e }, qt = l.__private__.getStyle = function (t) { var e = "S"; return "F" === t ? e = "f" : "FD" === t || "DF" === t ? e = "B" : "f" !== t && "f*" !== t && "B" !== t && "B*" !== t || (e = t), e }; l.__private__.line = l.line = function (t, e, n, r) { if (isNaN(t) || isNaN(e) || isNaN(n) || isNaN(r)) throw new Error("Invalid arguments passed to jsPDF.line"); return this.lines([[n - t, r - e]], t, e) }, l.__private__.lines = l.lines = function (t, e, n, r, i, o) { var a, s, l, h, u, c, f, p, d, g, m, y; if ("number" == typeof t && (y = n, n = e, e = t, t = y), r = r || [1, 1], o = o || !1, isNaN(e) || isNaN(n) || !Array.isArray(t) || !Array.isArray(r) || !Ot(i) || "boolean" != typeof o) throw new Error("Invalid arguments passed to jsPDF.lines"); for (tt(Q(Wt(e)) + " " + Q(Vt(n)) + " m "), a = r[0], s = r[1], h = t.length, g = e, m = n, l = 0; l < h; l++)2 === (u = t[l]).length ? (g = u[0] * a + g, m = u[1] * s + m, tt(Q(Wt(g)) + " " + Q(Vt(m)) + " l")) : (c = u[0] * a + g, f = u[1] * s + m, p = u[2] * a + g, d = u[3] * s + m, g = u[4] * a + g, m = u[5] * s + m, tt(Q(Wt(c)) + " " + Q(Vt(f)) + " " + Q(Wt(p)) + " " + Q(Vt(d)) + " " + Q(Wt(g)) + " " + Q(Vt(m)) + " c")); return o && tt(" h"), null !== i && tt(qt(i)), this }, l.__private__.rect = l.rect = function (t, e, n, r, i) { if (isNaN(t) || isNaN(e) || isNaN(n) || isNaN(r) || !Ot(i)) throw new Error("Invalid arguments passed to jsPDF.rect"); return tt([Z(Wt(t)), Z(Vt(e)), Z(n * _), Z(-r * _), "re"].join(" ")), null !== i && tt(qt(i)), this }, l.__private__.triangle = l.triangle = function (t, e, n, r, i, o, a) { if (isNaN(t) || isNaN(e) || isNaN(n) || isNaN(r) || isNaN(i) || isNaN(o) || !Ot(a)) throw new Error("Invalid arguments passed to jsPDF.triangle"); return this.lines([[n - t, r - e], [i - n, o - r], [t - i, e - o]], t, e, [1, 1], a, !0), this }, l.__private__.roundedRect = l.roundedRect = function (t, e, n, r, i, o, a) { if (isNaN(t) || isNaN(e) || isNaN(n) || isNaN(r) || isNaN(i) || isNaN(o) || !Ot(a)) throw new Error("Invalid arguments passed to jsPDF.roundedRect"); var s = 4 / 3 * (Math.SQRT2 - 1); return this.lines([[n - 2 * i, 0], [i * s, 0, i, o - o * s, i, o], [0, r - 2 * o], [0, o * s, -i * s, o, -i, o], [2 * i - n, 0], [-i * s, 0, -i, -o * s, -i, -o], [0, 2 * o - r], [0, -o * s, i * s, -o, i, -o]], t + i, e, [1, 1], a), this }, l.__private__.ellipse = l.ellipse = function (t, e, n, r, i) { if (isNaN(t) || isNaN(e) || isNaN(n) || isNaN(r) || !Ot(i)) throw new Error("Invalid arguments passed to jsPDF.ellipse"); var o = 4 / 3 * (Math.SQRT2 - 1) * n, a = 4 / 3 * (Math.SQRT2 - 1) * r; return tt([Z(Wt(t + n)), Z(Vt(e)), "m", Z(Wt(t + n)), Z(Vt(e - a)), Z(Wt(t + o)), Z(Vt(e - r)), Z(Wt(t)), Z(Vt(e - r)), "c"].join(" ")), tt([Z(Wt(t - o)), Z(Vt(e - r)), Z(Wt(t - n)), Z(Vt(e - a)), Z(Wt(t - n)), Z(Vt(e)), "c"].join(" ")), tt([Z(Wt(t - n)), Z(Vt(e + a)), Z(Wt(t - o)), Z(Vt(e + r)), Z(Wt(t)), Z(Vt(e + r)), "c"].join(" ")), tt([Z(Wt(t + o)), Z(Vt(e + r)), Z(Wt(t + n)), Z(Vt(e + a)), Z(Wt(t + n)), Z(Vt(e)), "c"].join(" ")), null !== i && tt(qt(i)), this }, l.__private__.circle = l.circle = function (t, e, n, r) { if (isNaN(t) || isNaN(e) || isNaN(n) || !Ot(r)) throw new Error("Invalid arguments passed to jsPDF.circle"); return this.ellipse(t, e, n, n, r) }; l.setFont = function (t, e) { return $ = Lt(t, e, { disableWarning: !1 }), this }, l.setFontStyle = l.setFontType = function (t) { return $ = Lt(void 0, t), this }; l.__private__.getFontList = l.getFontList = function () { var t, e, n, r = {}; for (t in H) if (H.hasOwnProperty(t)) for (e in r[t] = n = [], H[t]) H[t].hasOwnProperty(e) && n.push(e); return r }; l.addFont = function (t, e, n, r) { yt.call(this, t, e, n, r = r || "Identity-H") }; var Tt, Rt = r.lineWidth || .200025, Dt = l.__private__.setLineWidth = l.setLineWidth = function (t) { return tt((t * _).toFixed(2) + " w"), this }, Ut = (l.__private__.setLineDash = ae.API.setLineDash = function (t, e) { if (t = t || [], e = e || 0, isNaN(e) || !Array.isArray(t)) throw new Error("Invalid arguments passed to jsPDF.setLineDash"); return t = t.map(function (t) { return (t * _).toFixed(3) }).join(" "), e = parseFloat((e * _).toFixed(3)), tt("[" + t + "] " + e + " d"), this }, l.__private__.getLineHeight = l.getLineHeight = function () { return et * Tt }), zt = (Ut = l.__private__.getLineHeight = l.getLineHeight = function () { return et * Tt }, l.__private__.setLineHeightFactor = l.setLineHeightFactor = function (t) { return "number" == typeof (t = t || 1.15) && (Tt = t), this }), Ht = l.__private__.getLineHeightFactor = l.getLineHeightFactor = function () { return Tt }; zt(r.lineHeight); var Wt = l.__private__.getHorizontalCoordinate = function (t) { return t * _ }, Vt = l.__private__.getVerticalCoordinate = function (t) { return V[x].mediaBox.topRightY - V[x].mediaBox.bottomLeftY - t * _ }, Gt = l.__private__.getHorizontalCoordinateString = function (t) { return Z(t * _) }, Yt = l.__private__.getVerticalCoordinateString = function (t) { return Z(V[x].mediaBox.topRightY - V[x].mediaBox.bottomLeftY - t * _) }, Jt = r.strokeColor || "0 G", Xt = (l.__private__.getStrokeColor = l.getDrawColor = function () { return ht(Jt) }, l.__private__.setStrokeColor = l.setDrawColor = function (t, e, n, r) { return Jt = ut({ ch1: t, ch2: e, ch3: n, ch4: r, pdfColorType: "draw", precision: 2 }), tt(Jt), this }, r.fillColor || "0 g"), Kt = (l.__private__.getFillColor = l.getFillColor = function () { return ht(Xt) }, l.__private__.setFillColor = l.setFillColor = function (t, e, n, r) { return Xt = ut({ ch1: t, ch2: e, ch3: n, ch4: r, pdfColorType: "fill", precision: 2 }), tt(Xt), this }, r.textColor || "0 g"), Zt = l.__private__.getTextColor = l.getTextColor = function () { return ht(Kt) }, Qt = (l.__private__.setTextColor = l.setTextColor = function (t, e, n, r) { return Kt = ut({ ch1: t, ch2: e, ch3: n, ch4: r, pdfColorType: "text", precision: 3 }), this }, r.charSpace || 0), $t = l.__private__.getCharSpace = l.getCharSpace = function () { return Qt }, te = (l.__private__.setCharSpace = l.setCharSpace = function (t) { if (isNaN(t)) throw new Error("Invalid argument passed to jsPDF.setCharSpace"); return Qt = t, this }, 0); l.CapJoinStyles = { 0: 0, butt: 0, but: 0, miter: 0, 1: 1, round: 1, rounded: 1, circle: 1, 2: 2, projecting: 2, project: 2, square: 2, bevel: 2 }; l.__private__.setLineCap = l.setLineCap = function (t) { var e = l.CapJoinStyles[t]; if (void 0 === e) throw new Error("Line cap style of '" + t + "' is not recognized. See or extend .CapJoinStyles property for valid styles"); return tt((te = e) + " J"), this }; var ee, ne = 0; l.__private__.setLineJoin = l.setLineJoin = function (t) { var e = l.CapJoinStyles[t]; if (void 0 === e) throw new Error("Line join style of '" + t + "' is not recognized. See or extend .CapJoinStyles property for valid styles"); return tt((ne = e) + " j"), this }, l.__private__.setMiterLimit = l.setMiterLimit = function (t) { if (t = t || 0, isNaN(t)) throw new Error("Invalid argument passed to jsPDF.setMiterLimit"); return ee = parseFloat(Z(t * _)), tt(ee + " M"), this }; for (var re in l.save = function (r, t) { if (r = r || "generated.pdf", (t = t || {}).returnPromise = t.returnPromise || !1, !1 !== t.returnPromise) return new Promise(function (t, e) { try { var n = le(It(kt()), r); "function" == typeof le.unload && ie.setTimeout && setTimeout(le.unload, 911), t(n) } catch (t) { e(t.message) } }); le(It(kt()), r), "function" == typeof le.unload && ie.setTimeout && setTimeout(le.unload, 911) }, ae.API) ae.API.hasOwnProperty(re) && ("events" === re && ae.API.events.length ? function (t, e) { var n, r, i; for (i = e.length - 1; -1 !== i; i--)n = e[i][0], r = e[i][1], t.subscribe.apply(t, [n].concat("function" == typeof r ? [r] : r)) }(it, ae.API.events) : l[re] = ae.API[re]); return l.internal = { pdfEscape: vt, getStyle: qt, getFont: function () { return rt[Lt.apply(l, arguments)] }, getFontSize: O, getCharSpace: $t, getTextColor: Zt, getLineHeight: Ut, getLineHeightFactor: Ht, write: j, getHorizontalCoordinate: Wt, getVerticalCoordinate: Vt, getCoordinateString: Gt, getVerticalCoordinateString: Yt, collections: {}, newObject: J, newAdditionalObject: at, newObjectDeferred: X, newObjectDeferredBegin: ot, getFilters: ct, putStream: ft, events: it, scaleFactor: _, pageSize: { getWidth: function () { return (V[x].mediaBox.topRightX - V[x].mediaBox.bottomLeftX) / _ }, setWidth: function (t) { V[x].mediaBox.topRightX = t * _ + V[x].mediaBox.bottomLeftX }, getHeight: function () { return (V[x].mediaBox.topRightY - V[x].mediaBox.bottomLeftY) / _ }, setHeight: function (t) { V[x].mediaBox.topRightY = t * _ + V[x].mediaBox.bottomLeftY } }, output: Ct, getNumberOfPages: Nt, pages: I, out: tt, f2: Z, f3: Q, getPageInfo: jt, getPageInfoByObjId: Et, getCurrentPageInfo: Mt, getPDFVersion: u, hasHotfix: Bt }, Object.defineProperty(l.internal.pageSize, "width", { get: function () { return (V[x].mediaBox.topRightX - V[x].mediaBox.bottomLeftX) / _ }, set: function (t) { V[x].mediaBox.topRightX = t * _ + V[x].mediaBox.bottomLeftX }, enumerable: !0, configurable: !0 }), Object.defineProperty(l.internal.pageSize, "height", { get: function () { return (V[x].mediaBox.topRightY - V[x].mediaBox.bottomLeftY) / _ }, set: function (t) { V[x].mediaBox.topRightY = t * _ + V[x].mediaBox.bottomLeftY }, enumerable: !0, configurable: !0 }), function (t) { for (var e = 0, n = M.length; e < n; e++) { var r = yt(t[e][0], t[e][1], t[e][2], M[e][3], !0); K[r] = !0; var i = t[e][0].split("-"); mt(r, i[0], i[1] || "") } it.publish("addFonts", { fonts: rt, dictionary: H }) }(M), $ = "F1", bt(i, t), it.publish("initialized"), l } return ae.API = { events: [] }, ae.version = "1.5.3", "function" == typeof define && define.amd ? define("jsPDF", function () { return ae }) : "undefined" != typeof module && module.exports ? (module.exports = ae, module.exports.jsPDF = ae) : ie.jsPDF = ae, ae }("undefined" != typeof self && self || "undefined" != typeof window && window || "undefined" != typeof global && global || Function('return typeof this === "object" && this.content')() || Function("return this")()); /** * @license * Copyright (c) 2016 Alexander Weidt, * https://github.com/BiggA94 * * Licensed under the MIT License. http://opensource.org/licenses/mit-license */ (function (t, e) { var A, n = 1, S = function (t) { return t.replace(/\\/g, "\\\\").replace(/\(/g, "\\(").replace(/\)/g, "\\)") }, y = function (t) { return t.replace(/\\\\/g, "\\").replace(/\\\(/g, "(").replace(/\\\)/g, ")") }, _ = function (t) { if (isNaN(t)) throw new Error("Invalid argument passed to jsPDF.f2"); return t.toFixed(2) }, s = function (t) { if (isNaN(t)) throw new Error("Invalid argument passed to jsPDF.f2"); return t.toFixed(5) }; t.__acroform__ = {}; var r = function (t, e) { t.prototype = Object.create(e.prototype), t.prototype.constructor = t }, v = function (t) { return t * n }, w = function (t) { return t / n }, l = function (t) { var e = new j, n = Y.internal.getHeight(t) || 0, r = Y.internal.getWidth(t) || 0; return e.BBox = [0, 0, Number(_(r)), Number(_(n))], e }, i = t.__acroform__.setBit = function (t, e) { if (t = t || 0, e = e || 0, isNaN(t) || isNaN(e)) throw new Error("Invalid arguments passed to jsPDF.API.__acroform__.setBit"); return t |= 1 << e }, o = t.__acroform__.clearBit = function (t, e) { if (t = t || 0, e = e || 0, isNaN(t) || isNaN(e)) throw new Error("Invalid arguments passed to jsPDF.API.__acroform__.clearBit"); return t &= ~(1 << e) }, a = t.__acroform__.getBit = function (t, e) { if (isNaN(t) || isNaN(e)) throw new Error("Invalid arguments passed to jsPDF.API.__acroform__.getBit"); return 0 == (t & 1 << e) ? 0 : 1 }, b = t.__acroform__.getBitForPdf = function (t, e) { if (isNaN(t) || isNaN(e)) throw new Error("Invalid arguments passed to jsPDF.API.__acroform__.getBitForPdf"); return a(t, e - 1) }, x = t.__acroform__.setBitForPdf = function (t, e) { if (isNaN(t) || isNaN(e)) throw new Error("Invalid arguments passed to jsPDF.API.__acroform__.setBitForPdf"); return i(t, e - 1) }, N = t.__acroform__.clearBitForPdf = function (t, e, n) { if (isNaN(t) || isNaN(e)) throw new Error("Invalid arguments passed to jsPDF.API.__acroform__.clearBitForPdf"); return o(t, e - 1) }, c = t.__acroform__.calculateCoordinates = function (t) { var e = this.internal.getHorizontalCoordinate, n = this.internal.getVerticalCoordinate, r = t[0], i = t[1], o = t[2], a = t[3], s = {}; return s.lowerLeft_X = e(r) || 0, s.lowerLeft_Y = n(i + a) || 0, s.upperRight_X = e(r + o) || 0, s.upperRight_Y = n(i) || 0, [Number(_(s.lowerLeft_X)), Number(_(s.lowerLeft_Y)), Number(_(s.upperRight_X)), Number(_(s.upperRight_Y))] }, f = function (t) { if (t.appearanceStreamContent) return t.appearanceStreamContent; if (t.V || t.DV) { var e = [], n = t.V || t.DV, r = h(t, n), i = A.internal.getFont(t.fontName, t.fontStyle).id; e.push("/Tx BMC"), e.push("q"), e.push("BT"), e.push(A.__private__.encodeColorString(t.color)), e.push("/" + i + " " + _(r.fontSize) + " Tf"), e.push("1 0 0 1 0 0 Tm"), e.push(r.text), e.push("ET"), e.push("Q"), e.push("EMC"); var o = new l(t); return o.stream = e.join("\n"), o } }, h = function (i, t) { var e = i.maxFontSize || 12, n = (i.fontName, { text: "", fontSize: "" }), o = (t = ")" == (t = "(" == t.substr(0, 1) ? t.substr(1) : t).substr(t.length - 1) ? t.substr(0, t.length - 1) : t).split(" "), r = (A.__private__.encodeColorString(i.color), e), a = Y.internal.getHeight(i) || 0; a = a < 0 ? -a : a; var s = Y.internal.getWidth(i) || 0; s = s < 0 ? -s : s; var l = function (t, e, n) { if (t + 1 < o.length) { var r = e + " " + o[t + 1]; return F(r, i, n).width <= s - 4 } return !1 }; r++; t: for (; ;) { t = ""; var h = F("3", i, --r).height, u = i.multiline ? a - r : (a - h) / 2, c = -2, f = u += 2, p = 0, d = 0, g = 0; if (r <= 0) { t = "(...) Tj\n", t += "% Width of Text: " + F(t, i, r = 12).width + ", FieldWidth:" + s + "\n"; break } g = F(o[0] + " ", i, r).width; var m = "", y = 0; for (var v in o) if (o.hasOwnProperty(v)) { m = " " == (m += o[v] + " ").substr(m.length - 1) ? m.substr(0, m.length - 1) : m; var w = parseInt(v); g = F(m + " ", i, r).width; var b = l(w, m, r), x = v >= o.length - 1; if (b && !x) { m += " "; continue } if (b || x) { if (x) d = w; else if (i.multiline && a < (h + 2) * (y + 2) + 2) continue t } else { if (!i.multiline) continue t; if (a < (h + 2) * (y + 2) + 2) continue t; d = w } for (var N = "", L = p; L <= d; L++)N += o[L] + " "; switch (N = " " == N.substr(N.length - 1) ? N.substr(0, N.length - 1) : N, g = F(N, i, r).width, i.textAlign) { case "right": c = s - g - 2; break; case "center": c = (s - g) / 2; break; case "left": default: c = 2 }t += _(c) + " " + _(f) + " Td\n", t += "(" + S(N) + ") Tj\n", t += -_(c) + " 0 Td\n", f = -(r + 2), g = 0, p = d + 1, y++, m = "" } else; break } return n.text = t, n.fontSize = r, n }, F = function (t, e, n) { var r = A.internal.getFont(e.fontName, e.fontStyle), i = A.getStringUnitWidth(t, { font: r, fontSize: parseFloat(n), charSpace: 0 }) * parseFloat(n); return { height: A.getStringUnitWidth("3", { font: r, fontSize: parseFloat(n), charSpace: 0 }) * parseFloat(n) * 1.5, width: i } }, u = { fields: [], xForms: [], acroFormDictionaryRoot: null, printedOut: !1, internal: null, isInitialized: !1 }, p = function () { A.internal.acroformPlugin.acroFormDictionaryRoot.objId = void 0; var t = A.internal.acroformPlugin.acroFormDictionaryRoot.Fields; for (var e in t) if (t.hasOwnProperty(e)) { var n = t[e]; n.objId = void 0, n.hasAnnotation && d.call(A, n) } }, d = function (t) { var e = { type: "reference", object: t }; void 0 === A.internal.getPageInfo(t.page).pageContext.annotations.find(function (t) { return t.type === e.type && t.object === e.object }) && A.internal.getPageInfo(t.page).pageContext.annotations.push(e) }, g = function () { if (void 0 === A.internal.acroformPlugin.acroFormDictionaryRoot) throw new Error("putCatalogCallback: Root missing."); A.internal.write("/AcroForm " + A.internal.acroformPlugin.acroFormDictionaryRoot.objId + " 0 R") }, m = function () { A.internal.events.unsubscribe(A.internal.acroformPlugin.acroFormDictionaryRoot._eventID), delete A.internal.acroformPlugin.acroFormDictionaryRoot._eventID, A.internal.acroformPlugin.printedOut = !0 }, L = function (t) { var e = !t; t || (A.internal.newObjectDeferredBegin(A.internal.acroformPlugin.acroFormDictionaryRoot.objId, !0), A.internal.acroformPlugin.acroFormDictionaryRoot.putStream()); t = t || A.internal.acroformPlugin.acroFormDictionaryRoot.Kids; for (var n in t) if (t.hasOwnProperty(n)) { var r = t[n], i = [], o = r.Rect; if (r.Rect && (r.Rect = c.call(this, r.Rect)), A.internal.newObjectDeferredBegin(r.objId, !0), r.DA = Y.createDefaultAppearanceStream(r), "object" === se(r) && "function" == typeof r.getKeyValueListForStream && (i = r.getKeyValueListForStream()), r.Rect = o, r.hasAppearanceStream && !r.appearanceStreamContent) { var a = f.call(this, r); i.push({ key: "AP", value: "<>" }), A.internal.acroformPlugin.xForms.push(a) } if (r.appearanceStreamContent) { var s = ""; for (var l in r.appearanceStreamContent) if (r.appearanceStreamContent.hasOwnProperty(l)) { var h = r.appearanceStreamContent[l]; if (s += "/" + l + " ", s += "<<", 1 <= Object.keys(h).length || Array.isArray(h)) for (var n in h) { var u; if (h.hasOwnProperty(n)) "function" == typeof (u = h[n]) && (u = u.call(this, r)), s += "/" + n + " " + u + " ", 0 <= A.internal.acroformPlugin.xForms.indexOf(u) || A.internal.acroformPlugin.xForms.push(u) } else "function" == typeof (u = h) && (u = u.call(this, r)), s += "/" + n + " " + u, 0 <= A.internal.acroformPlugin.xForms.indexOf(u) || A.internal.acroformPlugin.xForms.push(u); s += ">>" } i.push({ key: "AP", value: "<<\n" + s + ">>" }) } A.internal.putStream({ additionalKeyValues: i }), A.internal.out("endobj") } e && P.call(this, A.internal.acroformPlugin.xForms) }, P = function (t) { for (var e in t) if (t.hasOwnProperty(e)) { var n = e, r = t[e]; A.internal.newObjectDeferredBegin(r && r.objId, !0), "object" === se(r) && "function" == typeof r.putStream && r.putStream(), delete t[n] } }, k = function () { if (void 0 !== this.internal && (void 0 === this.internal.acroformPlugin || !1 === this.internal.acroformPlugin.isInitialized)) { if (A = this, M.FieldNum = 0, this.internal.acroformPlugin = JSON.parse(JSON.stringify(u)), this.internal.acroformPlugin.acroFormDictionaryRoot) throw new Error("Exception while creating AcroformDictionary"); n = A.internal.scaleFactor, A.internal.acroformPlugin.acroFormDictionaryRoot = new E, A.internal.acroformPlugin.acroFormDictionaryRoot._eventID = A.internal.events.subscribe("postPutResources", m), A.internal.events.subscribe("buildDocument", p), A.internal.events.subscribe("putCatalog", g), A.internal.events.subscribe("postPutPages", L), A.internal.acroformPlugin.isInitialized = !0 } }, I = t.__acroform__.arrayToPdfArray = function (t) { if (Array.isArray(t)) { for (var e = "[", n = 0; n < t.length; n++)switch (0 !== n && (e += " "), se(t[n])) { case "boolean": case "number": case "object": e += t[n].toString(); break; case "string": "/" !== t[n].substr(0, 1) ? e += "(" + S(t[n].toString()) + ")" : e += t[n].toString() }return e += "]" } throw new Error("Invalid argument passed to jsPDF.__acroform__.arrayToPdfArray") }; var C = function (t) { return (t = t || "").toString(), t = "(" + S(t) + ")" }, B = function () { var e; Object.defineProperty(this, "objId", { configurable: !0, get: function () { if (e || (e = A.internal.newObjectDeferred()), !e) throw new Error("AcroFormPDFObject: Couldn't create Object ID"); return e }, set: function (t) { e = t } }) }; B.prototype.toString = function () { return this.objId + " 0 R" }, B.prototype.putStream = function () { var t = this.getKeyValueListForStream(); A.internal.putStream({ data: this.stream, additionalKeyValues: t }), A.internal.out("endobj") }, B.prototype.getKeyValueListForStream = function () { return function (t) { var e = [], n = Object.getOwnPropertyNames(t).filter(function (t) { return "content" != t && "appearanceStreamContent" != t && "_" != t.substring(0, 1) }); for (var r in n) if (!1 === Object.getOwnPropertyDescriptor(t, n[r]).configurable) { var i = n[r], o = t[i]; o && (Array.isArray(o) ? e.push({ key: i, value: I(o) }) : o instanceof B ? e.push({ key: i, value: o.objId + " 0 R" }) : "function" != typeof o && e.push({ key: i, value: o })) } return e }(this) }; var j = function () { B.call(this), Object.defineProperty(this, "Type", { value: "/XObject", configurable: !1, writeable: !0 }), Object.defineProperty(this, "Subtype", { value: "/Form", configurable: !1, writeable: !0 }), Object.defineProperty(this, "FormType", { value: 1, configurable: !1, writeable: !0 }); var e, n = []; Object.defineProperty(this, "BBox", { configurable: !1, writeable: !0, get: function () { return n }, set: function (t) { n = t } }), Object.defineProperty(this, "Resources", { value: "2 0 R", configurable: !1, writeable: !0 }), Object.defineProperty(this, "stream", { enumerable: !1, configurable: !0, set: function (t) { e = t.trim() }, get: function () { return e || null } }) }; r(j, B); var E = function () { B.call(this); var e, t = []; Object.defineProperty(this, "Kids", { enumerable: !1, configurable: !0, get: function () { return 0 < t.length ? t : void 0 } }), Object.defineProperty(this, "Fields", { enumerable: !1, configurable: !1, get: function () { return t } }), Object.defineProperty(this, "DA", { enumerable: !1, configurable: !1, get: function () { if (e) return "(" + e + ")" }, set: function (t) { e = t } }) }; r(E, B); var M = function t() { B.call(this); var e = 4; Object.defineProperty(this, "F", { enumerable: !1, configurable: !1, get: function () { return e }, set: function (t) { if (isNaN(t)) throw new Error('Invalid value "' + t + '" for attribute F supplied.'); e = t } }), Object.defineProperty(this, "showWhenPrinted", { enumerable: !0, configurable: !0, get: function () { return Boolean(b(e, 3)) }, set: function (t) { !0 === Boolean(t) ? this.F = x(e, 3) : this.F = N(e, 3) } }); var n = 0; Object.defineProperty(this, "Ff", { enumerable: !1, configurable: !1, get: function () { return n }, set: function (t) { if (isNaN(t)) throw new Error('Invalid value "' + t + '" for attribute Ff supplied.'); n = t } }); var r = []; Object.defineProperty(this, "Rect", { enumerable: !1, configurable: !1, get: function () { if (0 !== r.length) return r }, set: function (t) { r = void 0 !== t ? t : [] } }), Object.defineProperty(this, "x", { enumerable: !0, configurable: !0, get: function () { return !r || isNaN(r[0]) ? 0 : w(r[0]) }, set: function (t) { r[0] = v(t) } }), Object.defineProperty(this, "y", { enumerable: !0, configurable: !0, get: function () { return !r || isNaN(r[1]) ? 0 : w(r[1]) }, set: function (t) { r[1] = v(t) } }), Object.defineProperty(this, "width", { enumerable: !0, configurable: !0, get: function () { return !r || isNaN(r[2]) ? 0 : w(r[2]) }, set: function (t) { r[2] = v(t) } }), Object.defineProperty(this, "height", { enumerable: !0, configurable: !0, get: function () { return !r || isNaN(r[3]) ? 0 : w(r[3]) }, set: function (t) { r[3] = v(t) } }); var i = ""; Object.defineProperty(this, "FT", { enumerable: !0, configurable: !1, get: function () { return i }, set: function (t) { switch (t) { case "/Btn": case "/Tx": case "/Ch": case "/Sig": i = t; break; default: throw new Error('Invalid value "' + t + '" for attribute FT supplied.') } } }); var o = null; Object.defineProperty(this, "T", { enumerable: !0, configurable: !1, get: function () { if (!o || o.length < 1) { if (this instanceof H) return; o = "FieldObject" + t.FieldNum++ } return "(" + S(o) + ")" }, set: function (t) { o = t.toString() } }), Object.defineProperty(this, "fieldName", { configurable: !0, enumerable: !0, get: function () { return o }, set: function (t) { o = t } }); var a = "helvetica"; Object.defineProperty(this, "fontName", { enumerable: !0, configurable: !0, get: function () { return a }, set: function (t) { a = t } }); var s = "normal"; Object.defineProperty(this, "fontStyle", { enumerable: !0, configurable: !0, get: function () { return s }, set: function (t) { s = t } }); var l = 0; Object.defineProperty(this, "fontSize", { enumerable: !0, configurable: !0, get: function () { return w(l) }, set: function (t) { l = v(t) } }); var h = 50; Object.defineProperty(this, "maxFontSize", { enumerable: !0, configurable: !0, get: function () { return w(h) }, set: function (t) { h = v(t) } }); var u = "black"; Object.defineProperty(this, "color", { enumerable: !0, configurable: !0, get: function () { return u }, set: function (t) { u = t } }); var c = "/F1 0 Tf 0 g"; Object.defineProperty(this, "DA", { enumerable: !0, configurable: !1, get: function () { if (!(!c || this instanceof H || this instanceof V)) return C(c) }, set: function (t) { t = t.toString(), c = t } }); var f = null; Object.defineProperty(this, "DV", { enumerable: !1, configurable: !1, get: function () { if (f) return this instanceof D == !1 ? C(f) : f }, set: function (t) { t = t.toString(), f = this instanceof D == !1 ? "(" === t.substr(0, 1) ? y(t.substr(1, t.length - 2)) : y(t) : t } }), Object.defineProperty(this, "defaultValue", { enumerable: !0, configurable: !0, get: function () { return this instanceof D == !0 ? y(f.substr(1, f.length - 1)) : f }, set: function (t) { t = t.toString(), f = this instanceof D == !0 ? "/" + t : t } }); var p = null; Object.defineProperty(this, "V", { enumerable: !1, configurable: !1, get: function () { if (p) return this instanceof D == !1 ? C(p) : p }, set: function (t) { t = t.toString(), p = this instanceof D == !1 ? "(" === t.substr(0, 1) ? y(t.substr(1, t.length - 2)) : y(t) : t } }), Object.defineProperty(this, "value", { enumerable: !0, configurable: !0, get: function () { return this instanceof D == !0 ? y(p.substr(1, p.length - 1)) : p }, set: function (t) { t = t.toString(), p = this instanceof D == !0 ? "/" + t : t } }), Object.defineProperty(this, "hasAnnotation", { enumerable: !0, configurable: !0, get: function () { return this.Rect } }), Object.defineProperty(this, "Type", { enumerable: !0, configurable: !1, get: function () { return this.hasAnnotation ? "/Annot" : null } }), Object.defineProperty(this, "Subtype", { enumerable: !0, configurable: !1, get: function () { return this.hasAnnotation ? "/Widget" : null } }); var d, g = !1; Object.defineProperty(this, "hasAppearanceStream", { enumerable: !0, configurable: !0, writeable: !0, get: function () { return g }, set: function (t) { t = Boolean(t), g = t } }), Object.defineProperty(this, "page", { enumerable: !0, configurable: !0, writeable: !0, get: function () { if (d) return d }, set: function (t) { d = t } }), Object.defineProperty(this, "readOnly", { enumerable: !0, configurable: !0, get: function () { return Boolean(b(this.Ff, 1)) }, set: function (t) { !0 === Boolean(t) ? this.Ff = x(this.Ff, 1) : this.Ff = N(this.Ff, 1) } }), Object.defineProperty(this, "required", { enumerable: !0, configurable: !0, get: function () { return Boolean(b(this.Ff, 2)) }, set: function (t) { !0 === Boolean(t) ? this.Ff = x(this.Ff, 2) : this.Ff = N(this.Ff, 2) } }), Object.defineProperty(this, "noExport", { enumerable: !0, configurable: !0, get: function () { return Boolean(b(this.Ff, 3)) }, set: function (t) { !0 === Boolean(t) ? this.Ff = x(this.Ff, 3) : this.Ff = N(this.Ff, 3) } }); var m = null; Object.defineProperty(this, "Q", { enumerable: !0, configurable: !1, get: function () { if (null !== m) return m }, set: function (t) { if (-1 === [0, 1, 2].indexOf(t)) throw new Error('Invalid value "' + t + '" for attribute Q supplied.'); m = t } }), Object.defineProperty(this, "textAlign", { get: function () { var t = "left"; switch (m) { case 0: default: t = "left"; break; case 1: t = "center"; break; case 2: t = "right" }return t }, configurable: !0, enumerable: !0, set: function (t) { switch (t) { case "right": case 2: m = 2; break; case "center": case 1: m = 1; break; case "left": case 0: default: m = 0 } } }) }; r(M, B); var O = function () { M.call(this), this.FT = "/Ch", this.V = "()", this.fontName = "zapfdingbats"; var e = 0; Object.defineProperty(this, "TI", { enumerable: !0, configurable: !1, get: function () { return e }, set: function (t) { e = t } }), Object.defineProperty(this, "topIndex", { enumerable: !0, configurable: !0, get: function () { return e }, set: function (t) { e = t } }); var r = []; Object.defineProperty(this, "Opt", { enumerable: !0, configurable: !1, get: function () { return I(r) }, set: function (t) { var e, n; n = [], "string" == typeof (e = t) && (n = function (t, e, n) { n || (n = 1); for (var r, i = []; r = e.exec(t);)i.push(r[n]); return i }(e, /\((.*?)\)/g)), r = n } }), this.getOptions = function () { return r }, this.setOptions = function (t) { r = t, this.sort && r.sort() }, this.addOption = function (t) { t = (t = t || "").toString(), r.push(t), this.sort && r.sort() }, this.removeOption = function (t, e) { for (e = e || !1, t = (t = t || "").toString(); -1 !== r.indexOf(t) && (r.splice(r.indexOf(t), 1), !1 !== e);); }, Object.defineProperty(this, "combo", { enumerable: !0, configurable: !0, get: function () { return Boolean(b(this.Ff, 18)) }, set: function (t) { !0 === Boolean(t) ? this.Ff = x(this.Ff, 18) : this.Ff = N(this.Ff, 18) } }), Object.defineProperty(this, "edit", { enumerable: !0, configurable: !0, get: function () { return Boolean(b(this.Ff, 19)) }, set: function (t) { !0 === this.combo && (!0 === Boolean(t) ? this.Ff = x(this.Ff, 19) : this.Ff = N(this.Ff, 19)) } }), Object.defineProperty(this, "sort", { enumerable: !0, configurable: !0, get: function () { return Boolean(b(this.Ff, 20)) }, set: function (t) { !0 === Boolean(t) ? (this.Ff = x(this.Ff, 20), r.sort()) : this.Ff = N(this.Ff, 20) } }), Object.defineProperty(this, "multiSelect", { enumerable: !0, configurable: !0, get: function () { return Boolean(b(this.Ff, 22)) }, set: function (t) { !0 === Boolean(t) ? this.Ff = x(this.Ff, 22) : this.Ff = N(this.Ff, 22) } }), Object.defineProperty(this, "doNotSpellCheck", { enumerable: !0, configurable: !0, get: function () { return Boolean(b(this.Ff, 23)) }, set: function (t) { !0 === Boolean(t) ? this.Ff = x(this.Ff, 23) : this.Ff = N(this.Ff, 23) } }), Object.defineProperty(this, "commitOnSelChange", { enumerable: !0, configurable: !0, get: function () { return Boolean(b(this.Ff, 27)) }, set: function (t) { !0 === Boolean(t) ? this.Ff = x(this.Ff, 27) : this.Ff = N(this.Ff, 27) } }), this.hasAppearanceStream = !1 }; r(O, M); var q = function () { O.call(this), this.fontName = "helvetica", this.combo = !1 }; r(q, O); var T = function () { q.call(this), this.combo = !0 }; r(T, q); var R = function () { T.call(this), this.edit = !0 }; r(R, T); var D = function () { M.call(this), this.FT = "/Btn", Object.defineProperty(this, "noToggleToOff", { enumerable: !0, configurable: !0, get: function () { return Boolean(b(this.Ff, 15)) }, set: function (t) { !0 === Boolean(t) ? this.Ff = x(this.Ff, 15) : this.Ff = N(this.Ff, 15) } }), Object.defineProperty(this, "radio", { enumerable: !0, configurable: !0, get: function () { return Boolean(b(this.Ff, 16)) }, set: function (t) { !0 === Boolean(t) ? this.Ff = x(this.Ff, 16) : this.Ff = N(this.Ff, 16) } }), Object.defineProperty(this, "pushButton", { enumerable: !0, configurable: !0, get: function () { return Boolean(b(this.Ff, 17)) }, set: function (t) { !0 === Boolean(t) ? this.Ff = x(this.Ff, 17) : this.Ff = N(this.Ff, 17) } }), Object.defineProperty(this, "radioIsUnison", { enumerable: !0, configurable: !0, get: function () { return Boolean(b(this.Ff, 26)) }, set: function (t) { !0 === Boolean(t) ? this.Ff = x(this.Ff, 26) : this.Ff = N(this.Ff, 26) } }); var e, n = {}; Object.defineProperty(this, "MK", { enumerable: !1, configurable: !1, get: function () { if (0 !== Object.keys(n).length) { var t, e = []; for (t in e.push("<<"), n) e.push("/" + t + " (" + n[t] + ")"); return e.push(">>"), e.join("\n") } }, set: function (t) { "object" === se(t) && (n = t) } }), Object.defineProperty(this, "caption", { enumerable: !0, configurable: !0, get: function () { return n.CA || "" }, set: function (t) { "string" == typeof t && (n.CA = t) } }), Object.defineProperty(this, "AS", { enumerable: !1, configurable: !1, get: function () { return e }, set: function (t) { e = t } }), Object.defineProperty(this, "appearanceState", { enumerable: !0, configurable: !0, get: function () { return e.substr(1, e.length - 1) }, set: function (t) { e = "/" + t } }) }; r(D, M); var U = function () { D.call(this), this.pushButton = !0 }; r(U, D); var z = function () { D.call(this), this.radio = !0, this.pushButton = !1; var e = []; Object.defineProperty(this, "Kids", { enumerable: !0, configurable: !1, get: function () { return e }, set: function (t) { e = void 0 !== t ? t : [] } }) }; r(z, D); var H = function () { var e, n; M.call(this), Object.defineProperty(this, "Parent", { enumerable: !1, configurable: !1, get: function () { return e }, set: function (t) { e = t } }), Object.defineProperty(this, "optionName", { enumerable: !1, configurable: !0, get: function () { return n }, set: function (t) { n = t } }); var r, i = {}; Object.defineProperty(this, "MK", { enumerable: !1, configurable: !1, get: function () { var t, e = []; for (t in e.push("<<"), i) e.push("/" + t + " (" + i[t] + ")"); return e.push(">>"), e.join("\n") }, set: function (t) { "object" === se(t) && (i = t) } }), Object.defineProperty(this, "caption", { enumerable: !0, configurable: !0, get: function () { return i.CA || "" }, set: function (t) { "string" == typeof t && (i.CA = t) } }), Object.defineProperty(this, "AS", { enumerable: !1, configurable: !1, get: function () { return r }, set: function (t) { r = t } }), Object.defineProperty(this, "appearanceState", { enumerable: !0, configurable: !0, get: function () { return r.substr(1, r.length - 1) }, set: function (t) { r = "/" + t } }), this.optionName = name, this.caption = "l", this.appearanceState = "Off", this._AppearanceType = Y.RadioButton.Circle, this.appearanceStreamContent = this._AppearanceType.createAppearanceStream(name) }; r(H, M), z.prototype.setAppearance = function (t) { if (!("createAppearanceStream" in t && "getCA" in t)) throw new Error("Couldn't assign Appearance to RadioButton. Appearance was Invalid!"); for (var e in this.Kids) if (this.Kids.hasOwnProperty(e)) { var n = this.Kids[e]; n.appearanceStreamContent = t.createAppearanceStream(n.optionName), n.caption = t.getCA() } }, z.prototype.createOption = function (t) { this.Kids.length; var e = new H; return e.Parent = this, e.optionName = t, this.Kids.push(e), J.call(this, e), e }; var W = function () { D.call(this), this.fontName = "zapfdingbats", this.caption = "3", this.appearanceState = "On", this.value = "On", this.textAlign = "center", this.appearanceStreamContent = Y.CheckBox.createAppearanceStream() }; r(W, D); var V = function () { M.call(this), this.FT = "/Tx", Object.defineProperty(this, "multiline", { enumerable: !0, configurable: !0, get: function () { return Boolean(b(this.Ff, 13)) }, set: function (t) { !0 === Boolean(t) ? this.Ff = x(this.Ff, 13) : this.Ff = N(this.Ff, 13) } }), Object.defineProperty(this, "fileSelect", { enumerable: !0, configurable: !0, get: function () { return Boolean(b(this.Ff, 21)) }, set: function (t) { !0 === Boolean(t) ? this.Ff = x(this.Ff, 21) : this.Ff = N(this.Ff, 21) } }), Object.defineProperty(this, "doNotSpellCheck", { enumerable: !0, configurable: !0, get: function () { return Boolean(b(this.Ff, 23)) }, set: function (t) { !0 === Boolean(t) ? this.Ff = x(this.Ff, 23) : this.Ff = N(this.Ff, 23) } }), Object.defineProperty(this, "doNotScroll", { enumerable: !0, configurable: !0, get: function () { return Boolean(b(this.Ff, 24)) }, set: function (t) { !0 === Boolean(t) ? this.Ff = x(this.Ff, 24) : this.Ff = N(this.Ff, 24) } }), Object.defineProperty(this, "comb", { enumerable: !0, configurable: !0, get: function () { return Boolean(b(this.Ff, 25)) }, set: function (t) { !0 === Boolean(t) ? this.Ff = x(this.Ff, 25) : this.Ff = N(this.Ff, 25) } }), Object.defineProperty(this, "richText", { enumerable: !0, configurable: !0, get: function () { return Boolean(b(this.Ff, 26)) }, set: function (t) { !0 === Boolean(t) ? this.Ff = x(this.Ff, 26) : this.Ff = N(this.Ff, 26) } }); var e = null; Object.defineProperty(this, "MaxLen", { enumerable: !0, configurable: !1, get: function () { return e }, set: function (t) { e = t } }), Object.defineProperty(this, "maxLength", { enumerable: !0, configurable: !0, get: function () { return e }, set: function (t) { Number.isInteger(t) && (e = t) } }), Object.defineProperty(this, "hasAppearanceStream", { enumerable: !0, configurable: !0, get: function () { return this.V || this.DV } }) }; r(V, M); var G = function () { V.call(this), Object.defineProperty(this, "password", { enumerable: !0, configurable: !0, get: function () { return Boolean(b(this.Ff, 14)) }, set: function (t) { !0 === Boolean(t) ? this.Ff = x(this.Ff, 14) : this.Ff = N(this.Ff, 14) } }), this.password = !0 }; r(G, V); var Y = { CheckBox: { createAppearanceStream: function () { return { N: { On: Y.CheckBox.YesNormal }, D: { On: Y.CheckBox.YesPushDown, Off: Y.CheckBox.OffPushDown } } }, YesPushDown: function (t) { var e = l(t), n = [], r = A.internal.getFont(t.fontName, t.fontStyle).id, i = A.__private__.encodeColorString(t.color), o = h(t, t.caption); return n.push("0.749023 g"), n.push("0 0 " + _(Y.internal.getWidth(t)) + " " + _(Y.internal.getHeight(t)) + " re"), n.push("f"), n.push("BMC"), n.push("q"), n.push("0 0 1 rg"), n.push("/" + r + " " + _(o.fontSize) + " Tf " + i), n.push("BT"), n.push(o.text), n.push("ET"), n.push("Q"), n.push("EMC"), e.stream = n.join("\n"), e }, YesNormal: function (t) { var e = l(t), n = A.internal.getFont(t.fontName, t.fontStyle).id, r = A.__private__.encodeColorString(t.color), i = [], o = Y.internal.getHeight(t), a = Y.internal.getWidth(t), s = h(t, t.caption); return i.push("1 g"), i.push("0 0 " + _(a) + " " + _(o) + " re"), i.push("f"), i.push("q"), i.push("0 0 1 rg"), i.push("0 0 " + _(a - 1) + " " + _(o - 1) + " re"), i.push("W"), i.push("n"), i.push("0 g"), i.push("BT"), i.push("/" + n + " " + _(s.fontSize) + " Tf " + r), i.push(s.text), i.push("ET"), i.push("Q"), e.stream = i.join("\n"), e }, OffPushDown: function (t) { var e = l(t), n = []; return n.push("0.749023 g"), n.push("0 0 " + _(Y.internal.getWidth(t)) + " " + _(Y.internal.getHeight(t)) + " re"), n.push("f"), e.stream = n.join("\n"), e } }, RadioButton: { Circle: { createAppearanceStream: function (t) { var e = { D: { Off: Y.RadioButton.Circle.OffPushDown }, N: {} }; return e.N[t] = Y.RadioButton.Circle.YesNormal, e.D[t] = Y.RadioButton.Circle.YesPushDown, e }, getCA: function () { return "l" }, YesNormal: function (t) { var e = l(t), n = [], r = Y.internal.getWidth(t) <= Y.internal.getHeight(t) ? Y.internal.getWidth(t) / 4 : Y.internal.getHeight(t) / 4; r = Number((.9 * r).toFixed(5)); var i = Y.internal.Bezier_C, o = Number((r * i).toFixed(5)); return n.push("q"), n.push("1 0 0 1 " + s(Y.internal.getWidth(t) / 2) + " " + s(Y.internal.getHeight(t) / 2) + " cm"), n.push(r + " 0 m"), n.push(r + " " + o + " " + o + " " + r + " 0 " + r + " c"), n.push("-" + o + " " + r + " -" + r + " " + o + " -" + r + " 0 c"), n.push("-" + r + " -" + o + " -" + o + " -" + r + " 0 -" + r + " c"), n.push(o + " -" + r + " " + r + " -" + o + " " + r + " 0 c"), n.push("f"), n.push("Q"), e.stream = n.join("\n"), e }, YesPushDown: function (t) { var e = l(t), n = [], r = Y.internal.getWidth(t) <= Y.internal.getHeight(t) ? Y.internal.getWidth(t) / 4 : Y.internal.getHeight(t) / 4, i = (r = Number((.9 * r).toFixed(5)), Number((2 * r).toFixed(5))), o = Number((i * Y.internal.Bezier_C).toFixed(5)), a = Number((r * Y.internal.Bezier_C).toFixed(5)); return n.push("0.749023 g"), n.push("q"), n.push("1 0 0 1 " + s(Y.internal.getWidth(t) / 2) + " " + s(Y.internal.getHeight(t) / 2) + " cm"), n.push(i + " 0 m"), n.push(i + " " + o + " " + o + " " + i + " 0 " + i + " c"), n.push("-" + o + " " + i + " -" + i + " " + o + " -" + i + " 0 c"), n.push("-" + i + " -" + o + " -" + o + " -" + i + " 0 -" + i + " c"), n.push(o + " -" + i + " " + i + " -" + o + " " + i + " 0 c"), n.push("f"), n.push("Q"), n.push("0 g"), n.push("q"), n.push("1 0 0 1 " + s(Y.internal.getWidth(t) / 2) + " " + s(Y.internal.getHeight(t) / 2) + " cm"), n.push(r + " 0 m"), n.push(r + " " + a + " " + a + " " + r + " 0 " + r + " c"), n.push("-" + a + " " + r + " -" + r + " " + a + " -" + r + " 0 c"), n.push("-" + r + " -" + a + " -" + a + " -" + r + " 0 -" + r + " c"), n.push(a + " -" + r + " " + r + " -" + a + " " + r + " 0 c"), n.push("f"), n.push("Q"), e.stream = n.join("\n"), e }, OffPushDown: function (t) { var e = l(t), n = [], r = Y.internal.getWidth(t) <= Y.internal.getHeight(t) ? Y.internal.getWidth(t) / 4 : Y.internal.getHeight(t) / 4, i = (r = Number((.9 * r).toFixed(5)), Number((2 * r).toFixed(5))), o = Number((i * Y.internal.Bezier_C).toFixed(5)); return n.push("0.749023 g"), n.push("q"), n.push("1 0 0 1 " + s(Y.internal.getWidth(t) / 2) + " " + s(Y.internal.getHeight(t) / 2) + " cm"), n.push(i + " 0 m"), n.push(i + " " + o + " " + o + " " + i + " 0 " + i + " c"), n.push("-" + o + " " + i + " -" + i + " " + o + " -" + i + " 0 c"), n.push("-" + i + " -" + o + " -" + o + " -" + i + " 0 -" + i + " c"), n.push(o + " -" + i + " " + i + " -" + o + " " + i + " 0 c"), n.push("f"), n.push("Q"), e.stream = n.join("\n"), e } }, Cross: { createAppearanceStream: function (t) { var e = { D: { Off: Y.RadioButton.Cross.OffPushDown }, N: {} }; return e.N[t] = Y.RadioButton.Cross.YesNormal, e.D[t] = Y.RadioButton.Cross.YesPushDown, e }, getCA: function () { return "8" }, YesNormal: function (t) { var e = l(t), n = [], r = Y.internal.calculateCross(t); return n.push("q"), n.push("1 1 " + _(Y.internal.getWidth(t) - 2) + " " + _(Y.internal.getHeight(t) - 2) + " re"), n.push("W"), n.push("n"), n.push(_(r.x1.x) + " " + _(r.x1.y) + " m"), n.push(_(r.x2.x) + " " + _(r.x2.y) + " l"), n.push(_(r.x4.x) + " " + _(r.x4.y) + " m"), n.push(_(r.x3.x) + " " + _(r.x3.y) + " l"), n.push("s"), n.push("Q"), e.stream = n.join("\n"), e }, YesPushDown: function (t) { var e = l(t), n = Y.internal.calculateCross(t), r = []; return r.push("0.749023 g"), r.push("0 0 " + _(Y.internal.getWidth(t)) + " " + _(Y.internal.getHeight(t)) + " re"), r.push("f"), r.push("q"), r.push("1 1 " + _(Y.internal.getWidth(t) - 2) + " " + _(Y.internal.getHeight(t) - 2) + " re"), r.push("W"), r.push("n"), r.push(_(n.x1.x) + " " + _(n.x1.y) + " m"), r.push(_(n.x2.x) + " " + _(n.x2.y) + " l"), r.push(_(n.x4.x) + " " + _(n.x4.y) + " m"), r.push(_(n.x3.x) + " " + _(n.x3.y) + " l"), r.push("s"), r.push("Q"), e.stream = r.join("\n"), e }, OffPushDown: function (t) { var e = l(t), n = []; return n.push("0.749023 g"), n.push("0 0 " + _(Y.internal.getWidth(t)) + " " + _(Y.internal.getHeight(t)) + " re"), n.push("f"), e.stream = n.join("\n"), e } } }, createDefaultAppearanceStream: function (t) { var e = A.internal.getFont(t.fontName, t.fontStyle).id, n = A.__private__.encodeColorString(t.color); return "/" + e + " " + t.fontSize + " Tf " + n } }; Y.internal = { Bezier_C: .551915024494, calculateCross: function (t) { var e = Y.internal.getWidth(t), n = Y.internal.getHeight(t), r = Math.min(e, n); return { x1: { x: (e - r) / 2, y: (n - r) / 2 + r }, x2: { x: (e - r) / 2 + r, y: (n - r) / 2 }, x3: { x: (e - r) / 2, y: (n - r) / 2 }, x4: { x: (e - r) / 2 + r, y: (n - r) / 2 + r } } } }, Y.internal.getWidth = function (t) { var e = 0; return "object" === se(t) && (e = v(t.Rect[2])), e }, Y.internal.getHeight = function (t) { var e = 0; return "object" === se(t) && (e = v(t.Rect[3])), e }; var J = t.addField = function (t) { if (k.call(this), !(t instanceof M)) throw new Error("Invalid argument passed to jsPDF.addField."); return function (t) { A.internal.acroformPlugin.printedOut && (A.internal.acroformPlugin.printedOut = !1, A.internal.acroformPlugin.acroFormDictionaryRoot = null), A.internal.acroformPlugin.acroFormDictionaryRoot || k.call(A), A.internal.acroformPlugin.acroFormDictionaryRoot.Fields.push(t) }.call(this, t), t.page = A.internal.getCurrentPageInfo().pageNumber, this }; t.addButton = function (t) { if (t instanceof D == !1) throw new Error("Invalid argument passed to jsPDF.addButton."); return J.call(this, t) }, t.addTextField = function (t) { if (t instanceof V == !1) throw new Error("Invalid argument passed to jsPDF.addTextField."); return J.call(this, t) }, t.addChoiceField = function (t) { if (t instanceof O == !1) throw new Error("Invalid argument passed to jsPDF.addChoiceField."); return J.call(this, t) }; "object" == se(e) && void 0 === e.ChoiceField && void 0 === e.ListBox && void 0 === e.ComboBox && void 0 === e.EditBox && void 0 === e.Button && void 0 === e.PushButton && void 0 === e.RadioButton && void 0 === e.CheckBox && void 0 === e.TextField && void 0 === e.PasswordField ? (e.ChoiceField = O, e.ListBox = q, e.ComboBox = T, e.EditBox = R, e.Button = D, e.PushButton = U, e.RadioButton = z, e.CheckBox = W, e.TextField = V, e.PasswordField = G, e.AcroForm = { Appearance: Y }) : console.warn("AcroForm-Classes are not populated into global-namespace, because the class-Names exist already."), t.AcroFormChoiceField = O, t.AcroFormListBox = q, t.AcroFormComboBox = T, t.AcroFormEditBox = R, t.AcroFormButton = D, t.AcroFormPushButton = U, t.AcroFormRadioButton = z, t.AcroFormCheckBox = W, t.AcroFormTextField = V, t.AcroFormPasswordField = G, t.AcroFormAppearance = Y, t.AcroForm = { ChoiceField: O, ListBox: q, ComboBox: T, EditBox: R, Button: D, PushButton: U, RadioButton: z, CheckBox: W, TextField: V, PasswordField: G, Appearance: Y } })((window.tmp = lt).API, "undefined" != typeof window && window || "undefined" != typeof global && global), /** @license * jsPDF addImage plugin * Copyright (c) 2012 Jason Siefken, https://github.com/siefkenj/ * 2013 Chris Dowling, https://github.com/gingerchris * 2013 Trinh Ho, https://github.com/ineedfat * 2013 Edwin Alejandro Perez, https://github.com/eaparango * 2013 Norah Smith, https://github.com/burnburnrocket * 2014 Diego Casorran, https://github.com/diegocr * 2014 James Robb, https://github.com/jamesbrobb * * */ function (x) { var N = "addImage_", l = { PNG: [[137, 80, 78, 71]], TIFF: [[77, 77, 0, 42], [73, 73, 42, 0]], JPEG: [[255, 216, 255, 224, void 0, void 0, 74, 70, 73, 70, 0], [255, 216, 255, 225, void 0, void 0, 69, 120, 105, 102, 0, 0]], JPEG2000: [[0, 0, 0, 12, 106, 80, 32, 32]], GIF87a: [[71, 73, 70, 56, 55, 97]], GIF89a: [[71, 73, 70, 56, 57, 97]], BMP: [[66, 77], [66, 65], [67, 73], [67, 80], [73, 67], [80, 84]] }, h = x.getImageFileTypeByImageData = function (t, e) { var n, r; e = e || "UNKNOWN"; var i, o, a, s = "UNKNOWN"; for (a in x.isArrayBufferView(t) && (t = x.arrayBufferToBinaryString(t)), l) for (i = l[a], n = 0; n < i.length; n += 1) { for (o = !0, r = 0; r < i[n].length; r += 1)if (void 0 !== i[n][r] && i[n][r] !== t.charCodeAt(r)) { o = !1; break } if (!0 === o) { s = a; break } } return "UNKNOWN" === s && "UNKNOWN" !== e && (console.warn('FileType of Image not recognized. Processing image as "' + e + '".'), s = e), s }, n = function t(e) { for (var n = this.internal.newObject(), r = this.internal.write, i = this.internal.putStream, o = (0, this.internal.getFilters)(); -1 !== o.indexOf("FlateEncode");)o.splice(o.indexOf("FlateEncode"), 1); e.n = n; var a = []; if (a.push({ key: "Type", value: "/XObject" }), a.push({ key: "Subtype", value: "/Image" }), a.push({ key: "Width", value: e.w }), a.push({ key: "Height", value: e.h }), e.cs === this.color_spaces.INDEXED ? a.push({ key: "ColorSpace", value: "[/Indexed /DeviceRGB " + (e.pal.length / 3 - 1) + " " + ("smask" in e ? n + 2 : n + 1) + " 0 R]" }) : (a.push({ key: "ColorSpace", value: "/" + e.cs }), e.cs === this.color_spaces.DEVICE_CMYK && a.push({ key: "Decode", value: "[1 0 1 0 1 0 1 0]" })), a.push({ key: "BitsPerComponent", value: e.bpc }), "dp" in e && a.push({ key: "DecodeParms", value: "<<" + e.dp + ">>" }), "trns" in e && e.trns.constructor == Array) { for (var s = "", l = 0, h = e.trns.length; l < h; l++)s += e.trns[l] + " " + e.trns[l] + " "; a.push({ key: "Mask", value: "[" + s + "]" }) } "smask" in e && a.push({ key: "SMask", value: n + 1 + " 0 R" }); var u = void 0 !== e.f ? ["/" + e.f] : void 0; if (i({ data: e.data, additionalKeyValues: a, alreadyAppliedFilters: u }), r("endobj"), "smask" in e) { var c = "/Predictor " + e.p + " /Colors 1 /BitsPerComponent " + e.bpc + " /Columns " + e.w, f = { w: e.w, h: e.h, cs: "DeviceGray", bpc: e.bpc, dp: c, data: e.smask }; "f" in e && (f.f = e.f), t.call(this, f) } e.cs === this.color_spaces.INDEXED && (this.internal.newObject(), i({ data: this.arrayBufferToBinaryString(new Uint8Array(e.pal)) }), r("endobj")) }, L = function () { var t = this.internal.collections[N + "images"]; for (var e in t) n.call(this, t[e]) }, A = function () { var t, e = this.internal.collections[N + "images"], n = this.internal.write; for (var r in e) n("/I" + (t = e[r]).i, t.n, "0", "R") }, S = function (t) { return "function" == typeof x["process" + t.toUpperCase()] }, _ = function (t) { return "object" === se(t) && 1 === t.nodeType }, F = function (t, e) { if ("IMG" === t.nodeName && t.hasAttribute("src")) { var n = "" + t.getAttribute("src"); if (0 === n.indexOf("data:image/")) return unescape(n); var r = x.loadFile(n); if (void 0 !== r) return btoa(r) } if ("CANVAS" === t.nodeName) { var i = t; return t.toDataURL("image/jpeg", 1) } (i = document.createElement("canvas")).width = t.clientWidth || t.width, i.height = t.clientHeight || t.height; var o = i.getContext("2d"); if (!o) throw "addImage requires canvas to be supported by browser."; return o.drawImage(t, 0, 0, i.width, i.height), i.toDataURL("png" == ("" + e).toLowerCase() ? "image/png" : "image/jpeg") }, P = function (t, e) { var n; if (e) for (var r in e) if (t === e[r].alias) { n = e[r]; break } return n }; x.color_spaces = { DEVICE_RGB: "DeviceRGB", DEVICE_GRAY: "DeviceGray", DEVICE_CMYK: "DeviceCMYK", CAL_GREY: "CalGray", CAL_RGB: "CalRGB", LAB: "Lab", ICC_BASED: "ICCBased", INDEXED: "Indexed", PATTERN: "Pattern", SEPARATION: "Separation", DEVICE_N: "DeviceN" }, x.decode = { DCT_DECODE: "DCTDecode", FLATE_DECODE: "FlateDecode", LZW_DECODE: "LZWDecode", JPX_DECODE: "JPXDecode", JBIG2_DECODE: "JBIG2Decode", ASCII85_DECODE: "ASCII85Decode", ASCII_HEX_DECODE: "ASCIIHexDecode", RUN_LENGTH_DECODE: "RunLengthDecode", CCITT_FAX_DECODE: "CCITTFaxDecode" }, x.image_compression = { NONE: "NONE", FAST: "FAST", MEDIUM: "MEDIUM", SLOW: "SLOW" }, x.sHashCode = function (t) { var e, n = 0; if (0 === (t = t || "").length) return n; for (e = 0; e < t.length; e++)n = (n << 5) - n + t.charCodeAt(e), n |= 0; return n }, x.isString = function (t) { return "string" == typeof t }, x.validateStringAsBase64 = function (t) { (t = t || "").toString().trim(); var e = !0; return 0 === t.length && (e = !1), t.length % 4 != 0 && (e = !1), !1 === /^[A-Za-z0-9+\/]+$/.test(t.substr(0, t.length - 2)) && (e = !1), !1 === /^[A-Za-z0-9\/][A-Za-z0-9+\/]|[A-Za-z0-9+\/]=|==$/.test(t.substr(-2)) && (e = !1), e }, x.extractInfoFromBase64DataURI = function (t) { return /^data:([\w]+?\/([\w]+?));\S*;*base64,(.+)$/g.exec(t) }, x.extractImageFromDataUrl = function (t) { var e = (t = t || "").split("base64,"), n = null; if (2 === e.length) { var r = /^data:(\w*\/\w*);*(charset=[\w=-]*)*;*$/.exec(e[0]); Array.isArray(r) && (n = { mimeType: r[1], charset: r[2], data: e[1] }) } return n }, x.supportsArrayBuffer = function () { return "undefined" != typeof ArrayBuffer && "undefined" != typeof Uint8Array }, x.isArrayBuffer = function (t) { return !!this.supportsArrayBuffer() && t instanceof ArrayBuffer }, x.isArrayBufferView = function (t) { return !!this.supportsArrayBuffer() && ("undefined" != typeof Uint32Array && (t instanceof Int8Array || t instanceof Uint8Array || "undefined" != typeof Uint8ClampedArray && t instanceof Uint8ClampedArray || t instanceof Int16Array || t instanceof Uint16Array || t instanceof Int32Array || t instanceof Uint32Array || t instanceof Float32Array || t instanceof Float64Array)) }, x.binaryStringToUint8Array = function (t) { for (var e = t.length, n = new Uint8Array(e), r = 0; r < e; r++)n[r] = t.charCodeAt(r); return n }, x.arrayBufferToBinaryString = function (t) { if ("function" == typeof atob) return atob(this.arrayBufferToBase64(t)) }, x.arrayBufferToBase64 = function (t) { for (var e, n = "", r = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/", i = new Uint8Array(t), o = i.byteLength, a = o % 3, s = o - a, l = 0; l < s; l += 3)n += r[(16515072 & (e = i[l] << 16 | i[l + 1] << 8 | i[l + 2])) >> 18] + r[(258048 & e) >> 12] + r[(4032 & e) >> 6] + r[63 & e]; return 1 == a ? n += r[(252 & (e = i[s])) >> 2] + r[(3 & e) << 4] + "==" : 2 == a && (n += r[(64512 & (e = i[s] << 8 | i[s + 1])) >> 10] + r[(1008 & e) >> 4] + r[(15 & e) << 2] + "="), n }, x.createImageInfo = function (t, e, n, r, i, o, a, s, l, h, u, c, f) { var p = { alias: s, w: e, h: n, cs: r, bpc: i, i: a, data: t }; return o && (p.f = o), l && (p.dp = l), h && (p.trns = h), u && (p.pal = u), c && (p.smask = c), f && (p.p = f), p }, x.addImage = function (t, e, n, r, i, o, a, s, l) { var h = ""; if ("string" != typeof e) { var u = o; o = i, i = r, r = n, n = e, e = u } if ("object" === se(t) && !_(t) && "imageData" in t) { var c = t; t = c.imageData, e = c.format || e || "UNKNOWN", n = c.x || n || 0, r = c.y || r || 0, i = c.w || i, o = c.h || o, a = c.alias || a, s = c.compression || s, l = c.rotation || c.angle || l } var f = this.internal.getFilters(); if (void 0 === s && -1 !== f.indexOf("FlateEncode") && (s = "SLOW"), "string" == typeof t && (t = unescape(t)), isNaN(n) || isNaN(r)) throw console.error("jsPDF.addImage: Invalid coordinates", arguments), new Error("Invalid coordinates passed to jsPDF.addImage"); var p, d, g, m, y, v, w, b = function () { var t = this.internal.collections[N + "images"]; return t || (this.internal.collections[N + "images"] = t = {}, this.internal.events.subscribe("putResources", L), this.internal.events.subscribe("putXobjectDict", A)), t }.call(this); if (!((p = P(t, b)) || (_(t) && (t = F(t, e)), (null == (w = a) || 0 === w.length) && (a = "string" == typeof (v = t) ? x.sHashCode(v) : x.isArrayBufferView(v) ? x.sHashCode(x.arrayBufferToBinaryString(v)) : null), p = P(a, b)))) { if (this.isString(t) && ("" !== (h = this.convertStringToImageData(t)) ? t = h : void 0 !== (h = x.loadFile(t)) && (t = h)), e = this.getImageFileTypeByImageData(t, e), !S(e)) throw new Error("addImage does not support files of type '" + e + "', please ensure that a plugin for '" + e + "' support is added."); if (this.supportsArrayBuffer() && (t instanceof Uint8Array || (d = t, t = this.binaryStringToUint8Array(t))), !(p = this["process" + e.toUpperCase()](t, (y = 0, (m = b) && (y = Object.keys ? Object.keys(m).length : function (t) { var e = 0; for (var n in t) t.hasOwnProperty(n) && e++; return e }(m)), y), a, ((g = s) && "string" == typeof g && (g = g.toUpperCase()), g in x.image_compression ? g : x.image_compression.NONE), d))) throw new Error("An unknown error occurred whilst processing the image") } return function (t, e, n, r, i, o, a, s) { var l = function (t, e, n) { return t || e || (e = t = -96), t < 0 && (t = -1 * n.w * 72 / t / this.internal.scaleFactor), e < 0 && (e = -1 * n.h * 72 / e / this.internal.scaleFactor), 0 === t && (t = e * n.w / n.h), 0 === e && (e = t * n.h / n.w), [t, e] }.call(this, n, r, i), h = this.internal.getCoordinateString, u = this.internal.getVerticalCoordinateString; if (n = l[0], r = l[1], a[o] = i, s) { s *= Math.PI / 180; var c = Math.cos(s), f = Math.sin(s), p = function (t) { return t.toFixed(4) }, d = [p(c), p(f), p(-1 * f), p(c), 0, 0, "cm"] } this.internal.write("q"), s ? (this.internal.write([1, "0", "0", 1, h(t), u(e + r), "cm"].join(" ")), this.internal.write(d.join(" ")), this.internal.write([h(n), "0", "0", h(r), "0", "0", "cm"].join(" "))) : this.internal.write([h(n), "0", "0", h(r), h(t), u(e + r), "cm"].join(" ")), this.internal.write("/I" + i.i + " Do"), this.internal.write("Q") }.call(this, n, r, i, o, p, p.i, b, l), this }, x.convertStringToImageData = function (t) { var e, n = ""; if (this.isString(t)) { var r; e = null !== (r = this.extractImageFromDataUrl(t)) ? r.data : t; try { n = atob(e) } catch (t) { throw x.validateStringAsBase64(e) ? new Error("atob-Error in jsPDF.convertStringToImageData " + t.message) : new Error("Supplied Data is not a valid base64-String jsPDF.convertStringToImageData ") } } return n }; var u = function (t, e) { return t.subarray(e, e + 5) }; x.processJPEG = function (t, e, n, r, i, o) { var a, s = this.decode.DCT_DECODE; if (!this.isString(t) && !this.isArrayBuffer(t) && !this.isArrayBufferView(t)) return null; if (this.isString(t) && (a = function (t) { var e; if ("JPEG" !== h(t)) throw new Error("getJpegSize requires a binary string jpeg file"); for (var n = 256 * t.charCodeAt(4) + t.charCodeAt(5), r = 4, i = t.length; r < i;) { if (r += n, 255 !== t.charCodeAt(r)) throw new Error("getJpegSize could not find the size of the image"); if (192 === t.charCodeAt(r + 1) || 193 === t.charCodeAt(r + 1) || 194 === t.charCodeAt(r + 1) || 195 === t.charCodeAt(r + 1) || 196 === t.charCodeAt(r + 1) || 197 === t.charCodeAt(r + 1) || 198 === t.charCodeAt(r + 1) || 199 === t.charCodeAt(r + 1)) return e = 256 * t.charCodeAt(r + 5) + t.charCodeAt(r + 6), [256 * t.charCodeAt(r + 7) + t.charCodeAt(r + 8), e, t.charCodeAt(r + 9)]; r += 2, n = 256 * t.charCodeAt(r) + t.charCodeAt(r + 1) } }(t)), this.isArrayBuffer(t) && (t = new Uint8Array(t)), this.isArrayBufferView(t) && (a = function (t) { if (65496 != (t[0] << 8 | t[1])) throw new Error("Supplied data is not a JPEG"); for (var e, n = t.length, r = (t[4] << 8) + t[5], i = 4; i < n;) { if (r = ((e = u(t, i += r))[2] << 8) + e[3], (192 === e[1] || 194 === e[1]) && 255 === e[0] && 7 < r) return { width: ((e = u(t, i + 5))[2] << 8) + e[3], height: (e[0] << 8) + e[1], numcomponents: e[4] }; i += 2 } throw new Error("getJpegSizeFromBytes could not find the size of the image") }(t), t = i || this.arrayBufferToBinaryString(t)), void 0 === o) switch (a.numcomponents) { case 1: o = this.color_spaces.DEVICE_GRAY; break; case 4: o = this.color_spaces.DEVICE_CMYK; break; default: case 3: o = this.color_spaces.DEVICE_RGB }return this.createImageInfo(t, a.width, a.height, o, 8, s, e, n) }, x.processJPG = function () { return this.processJPEG.apply(this, arguments) }, x.getImageProperties = function (t) { var e, n, r = ""; if (_(t) && (t = F(t)), this.isString(t) && ("" !== (r = this.convertStringToImageData(t)) ? t = r : void 0 !== (r = x.loadFile(t)) && (t = r)), n = this.getImageFileTypeByImageData(t), !S(n)) throw new Error("addImage does not support files of type '" + n + "', please ensure that a plugin for '" + n + "' support is added."); if (this.supportsArrayBuffer() && (t instanceof Uint8Array || (t = this.binaryStringToUint8Array(t))), !(e = this["process" + n.toUpperCase()](t))) throw new Error("An unknown error occurred whilst processing the image"); return { fileType: n, width: e.w, height: e.h, colorSpace: e.cs, compressionMode: e.f, bitsPerComponent: e.bpc } } }(lt.API), /** * @license * Copyright (c) 2014 Steven Spungin (TwelveTone LLC) steven@twelvetone.tv * * Licensed under the MIT License. * http://opensource.org/licenses/mit-license */ t = lt.API, lt.API.events.push(["addPage", function (t) { this.internal.getPageInfo(t.pageNumber).pageContext.annotations = [] }]), t.events.push(["putPage", function (t) { for (var e = this.internal.getPageInfoByObjId(t.objId), n = t.pageContext.annotations, r = function (t) { if (void 0 !== t && "" != t) return !0 }, i = !1, o = 0; o < n.length && !i; o++)switch ((l = n[o]).type) { case "link": if (r(l.options.url) || r(l.options.pageNumber)) { i = !0; break } case "reference": case "text": case "freetext": i = !0 }if (0 != i) { this.internal.write("/Annots ["), this.internal.pageSize.height; var a = this.internal.getCoordinateString, s = this.internal.getVerticalCoordinateString; for (o = 0; o < n.length; o++) { var l; switch ((l = n[o]).type) { case "reference": this.internal.write(" " + l.object.objId + " 0 R "); break; case "text": var h = this.internal.newAdditionalObject(), u = this.internal.newAdditionalObject(), c = l.title || "Note"; m = "<>", h.content = m; var f = h.objId + " 0 R"; m = "<>"; else if (l.options.pageNumber) switch (m = "<>"), this.internal.out("endobj") }), this.internal.events.subscribe("putCatalog", function () { this.internal.out("/OpenAction " + e + " 0 R") }) }return this }, /** * @license * Copyright (c) 2014 Steven Spungin (TwelveTone LLC) steven@twelvetone.tv * * Licensed under the MIT License. * http://opensource.org/licenses/mit-license */ e = lt.API, (n = function () { var e = void 0; Object.defineProperty(this, "pdf", { get: function () { return e }, set: function (t) { e = t } }); var n = 150; Object.defineProperty(this, "width", { get: function () { return n }, set: function (t) { n = isNaN(t) || !1 === Number.isInteger(t) || t < 0 ? 150 : t, this.getContext("2d").pageWrapXEnabled && (this.getContext("2d").pageWrapX = n + 1) } }); var r = 300; Object.defineProperty(this, "height", { get: function () { return r }, set: function (t) { r = isNaN(t) || !1 === Number.isInteger(t) || t < 0 ? 300 : t, this.getContext("2d").pageWrapYEnabled && (this.getContext("2d").pageWrapY = r + 1) } }); var i = []; Object.defineProperty(this, "childNodes", { get: function () { return i }, set: function (t) { i = t } }); var o = {}; Object.defineProperty(this, "style", { get: function () { return o }, set: function (t) { o = t } }), Object.defineProperty(this, "parentNode", { get: function () { return !1 } }) }).prototype.getContext = function (t, e) { var n; if ("2d" !== (t = t || "2d")) return null; for (n in e) this.pdf.context2d.hasOwnProperty(n) && (this.pdf.context2d[n] = e[n]); return (this.pdf.context2d._canvas = this).pdf.context2d }, n.prototype.toDataURL = function () { throw new Error("toDataURL is not implemented.") }, e.events.push(["initialized", function () { this.canvas = new n, this.canvas.pdf = this }]), /** * @license * ==================================================================== * Copyright (c) 2013 Youssef Beddad, youssef.beddad@gmail.com * 2013 Eduardo Menezes de Morais, eduardo.morais@usp.br * 2013 Lee Driscoll, https://github.com/lsdriscoll * 2014 Juan Pablo Gaviria, https://github.com/juanpgaviria * 2014 James Hall, james@parall.ax * 2014 Diego Casorran, https://github.com/diegocr * * * ==================================================================== */ _ = lt.API, F = { x: void 0, y: void 0, w: void 0, h: void 0, ln: void 0 }, P = 1, p = function (t, e, n, r, i) { F = { x: t, y: e, w: n, h: r, ln: i } }, d = function () { return F }, k = { left: 0, top: 0, bottom: 0 }, _.setHeaderFunction = function (t) { l = t }, _.getTextDimensions = function (t, e) { var n = this.table_font_size || this.internal.getFontSize(), r = (this.internal.getFont().fontStyle, (e = e || {}).scaleFactor || this.internal.scaleFactor), i = 0, o = 0, a = 0; if ("string" == typeof t) 0 != (i = this.getStringUnitWidth(t) * n) && (o = 1); else { if ("[object Array]" !== Object.prototype.toString.call(t)) throw new Error("getTextDimensions expects text-parameter to be of type String or an Array of Strings."); for (var s = 0; s < t.length; s++)i < (a = this.getStringUnitWidth(t[s]) * n) && (i = a); 0 !== i && (o = t.length) } return { w: i /= r, h: Math.max((o * n * this.getLineHeightFactor() - n * (this.getLineHeightFactor() - 1)) / r, 0) } }, _.cellAddPage = function () { var t = this.margins || k; this.addPage(), p(t.left, t.top, void 0, void 0), P += 1 }, _.cellInitialize = function () { F = { x: void 0, y: void 0, w: void 0, h: void 0, ln: void 0 }, P = 1 }, _.cell = function (t, e, n, r, i, o, a) { var s = d(), l = !1; if (void 0 !== s.ln) if (s.ln === o) t = s.x + s.w, e = s.y; else { var h = this.margins || k; s.y + s.h + r + 13 >= this.internal.pageSize.getHeight() - h.bottom && (this.cellAddPage(), l = !0, this.printHeaders && this.tableHeaderRow && this.printHeaderRow(o, !0)), e = d().y + d().h, l && (e = 23) } if (void 0 !== i[0]) if (this.printingHeaderRow ? this.rect(t, e, n, r, "FD") : this.rect(t, e, n, r), "right" === a) { i instanceof Array || (i = [i]); for (var u = 0; u < i.length; u++) { var c = i[u], f = this.getStringUnitWidth(c) * this.internal.getFontSize() / this.internal.scaleFactor; this.text(c, t + n - f - 3, e + this.internal.getLineHeight() * (u + 1)) } } else this.text(i, t + 3, e + this.internal.getLineHeight()); return p(t, e, n, r, o), this }, _.arrayMax = function (t, e) { var n, r, i, o = t[0]; for (n = 0, r = t.length; n < r; n += 1)i = t[n], e ? -1 === e(o, i) && (o = i) : o < i && (o = i); return o }, _.table = function (t, e, n, r, i) { if (!n) throw "No data for PDF table"; var o, a, s, l, h, u, c, f, p, d, g = [], m = [], y = {}, v = {}, w = [], b = [], x = !1, N = !0, L = 12, A = k; if (A.width = this.internal.pageSize.getWidth(), i && (!0 === i.autoSize && (x = !0), !1 === i.printHeaders && (N = !1), i.fontSize && (L = i.fontSize), i.css && void 0 !== i.css["font-size"] && (L = 16 * i.css["font-size"]), i.margins && (A = i.margins)), this.lnMod = 0, F = { x: void 0, y: void 0, w: void 0, h: void 0, ln: void 0 }, P = 1, this.printHeaders = N, this.margins = A, this.setFontSize(L), this.table_font_size = L, null == r) g = Object.keys(n[0]); else if (r[0] && "string" != typeof r[0]) for (a = 0, s = r.length; a < s; a += 1)o = r[a], g.push(o.name), m.push(o.prompt), v[o.name] = o.width * (19.049976 / 25.4); else g = r; if (x) for (d = function (t) { return t[o] }, a = 0, s = g.length; a < s; a += 1) { for (y[o = g[a]] = n.map(d), w.push(this.getTextDimensions(m[a] || o, { scaleFactor: 1 }).w), c = 0, l = (u = y[o]).length; c < l; c += 1)h = u[c], w.push(this.getTextDimensions(h, { scaleFactor: 1 }).w); v[o] = _.arrayMax(w), w = [] } if (N) { var S = this.calculateLineHeight(g, v, m.length ? m : g); for (a = 0, s = g.length; a < s; a += 1)o = g[a], b.push([t, e, v[o], S, String(m.length ? m[a] : o)]); this.setTableHeaderRow(b), this.printHeaderRow(1, !1) } for (a = 0, s = n.length; a < s; a += 1)for (f = n[a], S = this.calculateLineHeight(g, v, f), c = 0, p = g.length; c < p; c += 1)o = g[c], this.cell(t, e, v[o], S, f[o], a + 2, o.align); return this.lastCellPos = F, this.table_x = t, this.table_y = e, this }, _.calculateLineHeight = function (t, e, n) { for (var r, i = 0, o = 0; o < t.length; o++) { n[r = t[o]] = this.splitTextToSize(String(n[r]), e[r] - 3); var a = this.internal.getLineHeight() * n[r].length + 3; i < a && (i = a) } return i }, _.setTableHeaderRow = function (t) { this.tableHeaderRow = t }, _.printHeaderRow = function (t, e) { if (!this.tableHeaderRow) throw "Property tableHeaderRow does not exist."; var n, r, i, o; if (this.printingHeaderRow = !0, void 0 !== l) { var a = l(this, P); p(a[0], a[1], a[2], a[3], -1) } this.setFontStyle("bold"); var s = []; for (i = 0, o = this.tableHeaderRow.length; i < o; i += 1)this.setFillColor(200, 200, 200), n = this.tableHeaderRow[i], e && (this.margins.top = 13, n[1] = this.margins && this.margins.top || 0, s.push(n)), r = [].concat(n), this.cell.apply(this, r.concat(t)); 0 < s.length && this.setTableHeaderRow(s), this.setFontStyle("normal"), this.printingHeaderRow = !1 }, /** * jsPDF Context2D PlugIn Copyright (c) 2014 Steven Spungin (TwelveTone LLC) steven@twelvetone.tv * * Licensed under the MIT License. http://opensource.org/licenses/mit-license */ function (t, e) { var l, i, o, h, u, c = function (t) { return t = t || {}, this.isStrokeTransparent = t.isStrokeTransparent || !1, this.strokeOpacity = t.strokeOpacity || 1, this.strokeStyle = t.strokeStyle || "#000000", this.fillStyle = t.fillStyle || "#000000", this.isFillTransparent = t.isFillTransparent || !1, this.fillOpacity = t.fillOpacity || 1, this.font = t.font || "10px sans-serif", this.textBaseline = t.textBaseline || "alphabetic", this.textAlign = t.textAlign || "left", this.lineWidth = t.lineWidth || 1, this.lineJoin = t.lineJoin || "miter", this.lineCap = t.lineCap || "butt", this.path = t.path || [], this.transform = void 0 !== t.transform ? t.transform.clone() : new M, this.globalCompositeOperation = t.globalCompositeOperation || "normal", this.globalAlpha = t.globalAlpha || 1, this.clip_path = t.clip_path || [], this.currentPoint = t.currentPoint || new j, this.miterLimit = t.miterLimit || 10, this.lastPoint = t.lastPoint || new j, this.ignoreClearRect = "boolean" != typeof t.ignoreClearRect || t.ignoreClearRect, this }; t.events.push(["initialized", function () { this.context2d = new n(this), l = this.internal.f2, this.internal.f3, i = this.internal.getCoordinateString, o = this.internal.getVerticalCoordinateString, h = this.internal.getHorizontalCoordinate, u = this.internal.getVerticalCoordinate }]); var n = function (t) { Object.defineProperty(this, "canvas", { get: function () { return { parentNode: !1, style: !1 } } }), Object.defineProperty(this, "pdf", { get: function () { return t } }); var e = !1; Object.defineProperty(this, "pageWrapXEnabled", { get: function () { return e }, set: function (t) { e = Boolean(t) } }); var n = !1; Object.defineProperty(this, "pageWrapYEnabled", { get: function () { return n }, set: function (t) { n = Boolean(t) } }); var r = 0; Object.defineProperty(this, "posX", { get: function () { return r }, set: function (t) { isNaN(t) || (r = t) } }); var i = 0; Object.defineProperty(this, "posY", { get: function () { return i }, set: function (t) { isNaN(t) || (i = t) } }); var o = !1; Object.defineProperty(this, "autoPaging", { get: function () { return o }, set: function (t) { o = Boolean(t) } }); var a = 0; Object.defineProperty(this, "lastBreak", { get: function () { return a }, set: function (t) { a = t } }); var s = []; Object.defineProperty(this, "pageBreaks", { get: function () { return s }, set: function (t) { s = t } }); var l = new c; Object.defineProperty(this, "ctx", { get: function () { return l }, set: function (t) { t instanceof c && (l = t) } }), Object.defineProperty(this, "path", { get: function () { return l.path }, set: function (t) { l.path = t } }); var h = []; Object.defineProperty(this, "ctxStack", { get: function () { return h }, set: function (t) { h = t } }), Object.defineProperty(this, "fillStyle", { get: function () { return this.ctx.fillStyle }, set: function (t) { var e; e = f(t), this.ctx.fillStyle = e.style, this.ctx.isFillTransparent = 0 === e.a, this.ctx.fillOpacity = e.a, this.pdf.setFillColor(e.r, e.g, e.b, { a: e.a }), this.pdf.setTextColor(e.r, e.g, e.b, { a: e.a }) } }), Object.defineProperty(this, "strokeStyle", { get: function () { return this.ctx.strokeStyle }, set: function (t) { var e = f(t); this.ctx.strokeStyle = e.style, this.ctx.isStrokeTransparent = 0 === e.a, this.ctx.strokeOpacity = e.a, 0 === e.a ? this.pdf.setDrawColor(255, 255, 255) : (e.a, this.pdf.setDrawColor(e.r, e.g, e.b)) } }), Object.defineProperty(this, "lineCap", { get: function () { return this.ctx.lineCap }, set: function (t) { -1 !== ["butt", "round", "square"].indexOf(t) && (this.ctx.lineCap = t, this.pdf.setLineCap(t)) } }), Object.defineProperty(this, "lineWidth", { get: function () { return this.ctx.lineWidth }, set: function (t) { isNaN(t) || (this.ctx.lineWidth = t, this.pdf.setLineWidth(t)) } }), Object.defineProperty(this, "lineJoin", { get: function () { return this.ctx.lineJoin }, set: function (t) { -1 !== ["bevel", "round", "miter"].indexOf(t) && (this.ctx.lineJoin = t, this.pdf.setLineJoin(t)) } }), Object.defineProperty(this, "miterLimit", { get: function () { return this.ctx.miterLimit }, set: function (t) { isNaN(t) || (this.ctx.miterLimit = t, this.pdf.setMiterLimit(t)) } }), Object.defineProperty(this, "textBaseline", { get: function () { return this.ctx.textBaseline }, set: function (t) { this.ctx.textBaseline = t } }), Object.defineProperty(this, "textAlign", { get: function () { return this.ctx.textAlign }, set: function (t) { -1 !== ["right", "end", "center", "left", "start"].indexOf(t) && (this.ctx.textAlign = t) } }), Object.defineProperty(this, "font", { get: function () { return this.ctx.font }, set: function (t) { var e; if (this.ctx.font = t, null !== (e = /^\s*(?=(?:(?:[-a-z]+\s*){0,2}(italic|oblique))?)(?=(?:(?:[-a-z]+\s*){0,2}(small-caps))?)(?=(?:(?:[-a-z]+\s*){0,2}(bold(?:er)?|lighter|[1-9]00))?)(?:(?:normal|\1|\2|\3)\s*){0,3}((?:xx?-)?(?:small|large)|medium|smaller|larger|[.\d]+(?:\%|in|[cem]m|ex|p[ctx]))(?:\s*\/\s*(normal|[.\d]+(?:\%|in|[cem]m|ex|p[ctx])))?\s*([-_,\"\'\sa-z]+?)\s*$/i.exec(t))) { var n = e[1], r = (e[2], e[3]), i = e[4], o = e[5], a = e[6]; i = "px" === o ? Math.floor(parseFloat(i)) : "em" === o ? Math.floor(parseFloat(i) * this.pdf.getFontSize()) : Math.floor(parseFloat(i)), this.pdf.setFontSize(i); var s = ""; ("bold" === r || 700 <= parseInt(r, 10) || "bold" === n) && (s = "bold"), "italic" === n && (s += "italic"), 0 === s.length && (s = "normal"); for (var l = "", h = a.toLowerCase().replace(/"|'/g, "").split(/\s*,\s*/), u = { arial: "Helvetica", verdana: "Helvetica", helvetica: "Helvetica", "sans-serif": "Helvetica", fixed: "Courier", monospace: "Courier", terminal: "Courier", courier: "Courier", times: "Times", cursive: "Times", fantasy: "Times", serif: "Times" }, c = 0; c < h.length; c++) { if (void 0 !== this.pdf.internal.getFont(h[c], s, { noFallback: !0, disableWarning: !0 })) { l = h[c]; break } if ("bolditalic" === s && void 0 !== this.pdf.internal.getFont(h[c], "bold", { noFallback: !0, disableWarning: !0 })) l = h[c], s = "bold"; else if (void 0 !== this.pdf.internal.getFont(h[c], "normal", { noFallback: !0, disableWarning: !0 })) { l = h[c], s = "normal"; break } } if ("" === l) for (c = 0; c < h.length; c++)if (u[h[c]]) { l = u[h[c]]; break } l = "" === l ? "Times" : l, this.pdf.setFont(l, s) } } }), Object.defineProperty(this, "globalCompositeOperation", { get: function () { return this.ctx.globalCompositeOperation }, set: function (t) { this.ctx.globalCompositeOperation = t } }), Object.defineProperty(this, "globalAlpha", { get: function () { return this.ctx.globalAlpha }, set: function (t) { this.ctx.globalAlpha = t } }), Object.defineProperty(this, "ignoreClearRect", { get: function () { return this.ctx.ignoreClearRect }, set: function (t) { this.ctx.ignoreClearRect = Boolean(t) } }) }; n.prototype.fill = function () { r.call(this, "fill", !1) }, n.prototype.stroke = function () { r.call(this, "stroke", !1) }, n.prototype.beginPath = function () { this.path = [{ type: "begin" }] }, n.prototype.moveTo = function (t, e) { if (isNaN(t) || isNaN(e)) throw console.error("jsPDF.context2d.moveTo: Invalid arguments", arguments), new Error("Invalid arguments passed to jsPDF.context2d.moveTo"); var n = this.ctx.transform.applyToPoint(new j(t, e)); this.path.push({ type: "mt", x: n.x, y: n.y }), this.ctx.lastPoint = new j(t, e) }, n.prototype.closePath = function () { var t = new j(0, 0), e = 0; for (e = this.path.length - 1; -1 !== e; e--)if ("begin" === this.path[e].type && "object" === se(this.path[e + 1]) && "number" == typeof this.path[e + 1].x) { t = new j(this.path[e + 1].x, this.path[e + 1].y), this.path.push({ type: "lt", x: t.x, y: t.y }); break } "object" === se(this.path[e + 2]) && "number" == typeof this.path[e + 2].x && this.path.push(JSON.parse(JSON.stringify(this.path[e + 2]))), this.path.push({ type: "close" }), this.ctx.lastPoint = new j(t.x, t.y) }, n.prototype.lineTo = function (t, e) { if (isNaN(t) || isNaN(e)) throw console.error("jsPDF.context2d.lineTo: Invalid arguments", arguments), new Error("Invalid arguments passed to jsPDF.context2d.lineTo"); var n = this.ctx.transform.applyToPoint(new j(t, e)); this.path.push({ type: "lt", x: n.x, y: n.y }), this.ctx.lastPoint = new j(n.x, n.y) }, n.prototype.clip = function () { this.ctx.clip_path = JSON.parse(JSON.stringify(this.path)), r.call(this, null, !0) }, n.prototype.quadraticCurveTo = function (t, e, n, r) { if (isNaN(n) || isNaN(r) || isNaN(t) || isNaN(e)) throw console.error("jsPDF.context2d.quadraticCurveTo: Invalid arguments", arguments), new Error("Invalid arguments passed to jsPDF.context2d.quadraticCurveTo"); var i = this.ctx.transform.applyToPoint(new j(n, r)), o = this.ctx.transform.applyToPoint(new j(t, e)); this.path.push({ type: "qct", x1: o.x, y1: o.y, x: i.x, y: i.y }), this.ctx.lastPoint = new j(i.x, i.y) }, n.prototype.bezierCurveTo = function (t, e, n, r, i, o) { if (isNaN(i) || isNaN(o) || isNaN(t) || isNaN(e) || isNaN(n) || isNaN(r)) throw console.error("jsPDF.context2d.bezierCurveTo: Invalid arguments", arguments), new Error("Invalid arguments passed to jsPDF.context2d.bezierCurveTo"); var a = this.ctx.transform.applyToPoint(new j(i, o)), s = this.ctx.transform.applyToPoint(new j(t, e)), l = this.ctx.transform.applyToPoint(new j(n, r)); this.path.push({ type: "bct", x1: s.x, y1: s.y, x2: l.x, y2: l.y, x: a.x, y: a.y }), this.ctx.lastPoint = new j(a.x, a.y) }, n.prototype.arc = function (t, e, n, r, i, o) { if (isNaN(t) || isNaN(e) || isNaN(n) || isNaN(r) || isNaN(i)) throw console.error("jsPDF.context2d.arc: Invalid arguments", arguments), new Error("Invalid arguments passed to jsPDF.context2d.arc"); if (o = Boolean(o), !this.ctx.transform.isIdentity) { var a = this.ctx.transform.applyToPoint(new j(t, e)); t = a.x, e = a.y; var s = this.ctx.transform.applyToPoint(new j(0, n)), l = this.ctx.transform.applyToPoint(new j(0, 0)); n = Math.sqrt(Math.pow(s.x - l.x, 2) + Math.pow(s.y - l.y, 2)) } Math.abs(i - r) >= 2 * Math.PI && (r = 0, i = 2 * Math.PI), this.path.push({ type: "arc", x: t, y: e, radius: n, startAngle: r, endAngle: i, counterclockwise: o }) }, n.prototype.arcTo = function (t, e, n, r, i) { throw new Error("arcTo not implemented.") }, n.prototype.rect = function (t, e, n, r) { if (isNaN(t) || isNaN(e) || isNaN(n) || isNaN(r)) throw console.error("jsPDF.context2d.rect: Invalid arguments", arguments), new Error("Invalid arguments passed to jsPDF.context2d.rect"); this.moveTo(t, e), this.lineTo(t + n, e), this.lineTo(t + n, e + r), this.lineTo(t, e + r), this.lineTo(t, e), this.lineTo(t + n, e), this.lineTo(t, e) }, n.prototype.fillRect = function (t, e, n, r) { if (isNaN(t) || isNaN(e) || isNaN(n) || isNaN(r)) throw console.error("jsPDF.context2d.fillRect: Invalid arguments", arguments), new Error("Invalid arguments passed to jsPDF.context2d.fillRect"); if (!N.call(this)) { var i = {}; "butt" !== this.lineCap && (i.lineCap = this.lineCap, this.lineCap = "butt"), "miter" !== this.lineJoin && (i.lineJoin = this.lineJoin, this.lineJoin = "miter"), this.beginPath(), this.rect(t, e, n, r), this.fill(), i.hasOwnProperty("lineCap") && (this.lineCap = i.lineCap), i.hasOwnProperty("lineJoin") && (this.lineJoin = i.lineJoin) } }, n.prototype.strokeRect = function (t, e, n, r) { if (isNaN(t) || isNaN(e) || isNaN(n) || isNaN(r)) throw console.error("jsPDF.context2d.strokeRect: Invalid arguments", arguments), new Error("Invalid arguments passed to jsPDF.context2d.strokeRect"); L.call(this) || (this.beginPath(), this.rect(t, e, n, r), this.stroke()) }, n.prototype.clearRect = function (t, e, n, r) { if (isNaN(t) || isNaN(e) || isNaN(n) || isNaN(r)) throw console.error("jsPDF.context2d.clearRect: Invalid arguments", arguments), new Error("Invalid arguments passed to jsPDF.context2d.clearRect"); this.ignoreClearRect || (this.fillStyle = "#ffffff", this.fillRect(t, e, n, r)) }, n.prototype.save = function (t) { t = "boolean" != typeof t || t; for (var e = this.pdf.internal.getCurrentPageInfo().pageNumber, n = 0; n < this.pdf.internal.getNumberOfPages(); n++)this.pdf.setPage(n + 1), this.pdf.internal.out("q"); if (this.pdf.setPage(e), t) { this.ctx.fontSize = this.pdf.internal.getFontSize(); var r = new c(this.ctx); this.ctxStack.push(this.ctx), this.ctx = r } }, n.prototype.restore = function (t) { t = "boolean" != typeof t || t; for (var e = this.pdf.internal.getCurrentPageInfo().pageNumber, n = 0; n < this.pdf.internal.getNumberOfPages(); n++)this.pdf.setPage(n + 1), this.pdf.internal.out("Q"); this.pdf.setPage(e), t && 0 !== this.ctxStack.length && (this.ctx = this.ctxStack.pop(), this.fillStyle = this.ctx.fillStyle, this.strokeStyle = this.ctx.strokeStyle, this.font = this.ctx.font, this.lineCap = this.ctx.lineCap, this.lineWidth = this.ctx.lineWidth, this.lineJoin = this.ctx.lineJoin) }, n.prototype.toDataURL = function () { throw new Error("toDataUrl not implemented.") }; var f = function (t) { var e, n, r, i; if (!0 === t.isCanvasGradient && (t = t.getColor()), !t) return { r: 0, g: 0, b: 0, a: 0, style: t }; if (/transparent|rgba\s*\(\s*(\d+)\s*,\s*(\d+)\s*,\s*(\d+)\s*,\s*0+\s*\)/.test(t)) i = r = n = e = 0; else { var o = /rgb\s*\(\s*(\d+)\s*,\s*(\d+)\s*,\s*(\d+)\s*\)/.exec(t); if (null !== o) e = parseInt(o[1]), n = parseInt(o[2]), r = parseInt(o[3]), i = 1; else if (null !== (o = /rgba\s*\(\s*(\d+)\s*,\s*(\d+)\s*,\s*(\d+)\s*,\s*([\d\.]+)\s*\)/.exec(t))) e = parseInt(o[1]), n = parseInt(o[2]), r = parseInt(o[3]), i = parseFloat(o[4]); else { if (i = 1, "string" == typeof t && "#" !== t.charAt(0)) { var a = new RGBColor(t); t = a.ok ? a.toHex() : "#000000" } 4 === t.length ? (e = t.substring(1, 2), e += e, n = t.substring(2, 3), n += n, r = t.substring(3, 4), r += r) : (e = t.substring(1, 3), n = t.substring(3, 5), r = t.substring(5, 7)), e = parseInt(e, 16), n = parseInt(n, 16), r = parseInt(r, 16) } } return { r: e, g: n, b: r, a: i, style: t } }, N = function () { return this.ctx.isFillTransparent || 0 == this.globalAlpha }, L = function () { return Boolean(this.ctx.isStrokeTransparent || 0 == this.globalAlpha) }; n.prototype.fillText = function (t, e, n, r) { if (isNaN(e) || isNaN(n) || "string" != typeof t) throw console.error("jsPDF.context2d.fillText: Invalid arguments", arguments), new Error("Invalid arguments passed to jsPDF.context2d.fillText"); if (r = isNaN(r) ? void 0 : r, !N.call(this)) { n = a.call(this, n); var i = B(this.ctx.transform.rotation), o = this.ctx.transform.scaleX; s.call(this, { text: t, x: e, y: n, scale: o, angle: i, align: this.textAlign, maxWidth: r }) } }, n.prototype.strokeText = function (t, e, n, r) { if (isNaN(e) || isNaN(n) || "string" != typeof t) throw console.error("jsPDF.context2d.strokeText: Invalid arguments", arguments), new Error("Invalid arguments passed to jsPDF.context2d.strokeText"); if (!L.call(this)) { r = isNaN(r) ? void 0 : r, n = a.call(this, n); var i = B(this.ctx.transform.rotation), o = this.ctx.transform.scaleX; s.call(this, { text: t, x: e, y: n, scale: o, renderingMode: "stroke", angle: i, align: this.textAlign, maxWidth: r }) } }, n.prototype.measureText = function (t) { if ("string" != typeof t) throw console.error("jsPDF.context2d.measureText: Invalid arguments", arguments), new Error("Invalid arguments passed to jsPDF.context2d.measureText"); var e = this.pdf, n = this.pdf.internal.scaleFactor, r = e.internal.getFontSize(), i = e.getStringUnitWidth(t) * r / e.internal.scaleFactor; return new function (t) { var e = (t = t || {}).width || 0; return Object.defineProperty(this, "width", { get: function () { return e } }), this }({ width: i *= Math.round(96 * n / 72 * 1e4) / 1e4 }) }, n.prototype.scale = function (t, e) { if (isNaN(t) || isNaN(e)) throw console.error("jsPDF.context2d.scale: Invalid arguments", arguments), new Error("Invalid arguments passed to jsPDF.context2d.scale"); var n = new M(t, 0, 0, e, 0, 0); this.ctx.transform = this.ctx.transform.multiply(n) }, n.prototype.rotate = function (t) { if (isNaN(t)) throw console.error("jsPDF.context2d.rotate: Invalid arguments", arguments), new Error("Invalid arguments passed to jsPDF.context2d.rotate"); var e = new M(Math.cos(t), Math.sin(t), -Math.sin(t), Math.cos(t), 0, 0); this.ctx.transform = this.ctx.transform.multiply(e) }, n.prototype.translate = function (t, e) { if (isNaN(t) || isNaN(e)) throw console.error("jsPDF.context2d.translate: Invalid arguments", arguments), new Error("Invalid arguments passed to jsPDF.context2d.translate"); var n = new M(1, 0, 0, 1, t, e); this.ctx.transform = this.ctx.transform.multiply(n) }, n.prototype.transform = function (t, e, n, r, i, o) { if (isNaN(t) || isNaN(e) || isNaN(n) || isNaN(r) || isNaN(i) || isNaN(o)) throw console.error("jsPDF.context2d.transform: Invalid arguments", arguments), new Error("Invalid arguments passed to jsPDF.context2d.transform"); var a = new M(t, e, n, r, i, o); this.ctx.transform = this.ctx.transform.multiply(a) }, n.prototype.setTransform = function (t, e, n, r, i, o) { t = isNaN(t) ? 1 : t, e = isNaN(e) ? 0 : e, n = isNaN(n) ? 0 : n, r = isNaN(r) ? 1 : r, i = isNaN(i) ? 0 : i, o = isNaN(o) ? 0 : o, this.ctx.transform = new M(t, e, n, r, i, o) }, n.prototype.drawImage = function (t, e, n, r, i, o, a, s, l) { var h = this.pdf.getImageProperties(t), u = 1, c = 1, f = 1, p = 1; void 0 !== r && void 0 !== s && (f = s / r, p = l / i, u = h.width / r * s / r, c = h.height / i * l / i), void 0 === o && (o = e, a = n, n = e = 0), void 0 !== r && void 0 === s && (s = r, l = i), void 0 === r && void 0 === s && (s = h.width, l = h.height); var d = this.ctx.transform.decompose(), g = B(d.rotate.shx); d.scale.sx, d.scale.sy; for (var m, y = new M, v = ((y = (y = (y = y.multiply(d.translate)).multiply(d.skew)).multiply(d.scale)).applyToPoint(new j(s, l)), y.applyToRectangle(new E(o - e * f, a - n * p, r * u, i * c))), w = F.call(this, v), b = [], x = 0; x < w.length; x += 1)-1 === b.indexOf(w[x]) && b.push(w[x]); if (b.sort(), this.autoPaging) for (var N = b[0], L = b[b.length - 1], A = N; A < L + 1; A++) { if (this.pdf.setPage(A), 0 !== this.ctx.clip_path.length) { var S = this.path; m = JSON.parse(JSON.stringify(this.ctx.clip_path)), this.path = P(m, this.posX, -1 * this.pdf.internal.pageSize.height * (A - 1) + this.posY), k.call(this, "fill", !0), this.path = S } var _ = JSON.parse(JSON.stringify(v)); _ = P([_], this.posX, -1 * this.pdf.internal.pageSize.height * (A - 1) + this.posY)[0], this.pdf.addImage(t, "jpg", _.x, _.y, _.w, _.h, null, null, g) } else this.pdf.addImage(t, "jpg", v.x, v.y, v.w, v.h, null, null, g) }; var F = function (t, e, n) { var r = []; switch (e = e || this.pdf.internal.pageSize.width, n = n || this.pdf.internal.pageSize.height, t.type) { default: case "mt": case "lt": r.push(Math.floor((t.y + this.posY) / n) + 1); break; case "arc": r.push(Math.floor((t.y + this.posY - t.radius) / n) + 1), r.push(Math.floor((t.y + this.posY + t.radius) / n) + 1); break; case "qct": var i = w(this.ctx.lastPoint.x, this.ctx.lastPoint.y, t.x1, t.y1, t.x, t.y); r.push(Math.floor(i.y / n) + 1), r.push(Math.floor((i.y + i.h) / n) + 1); break; case "bct": var o = b(this.ctx.lastPoint.x, this.ctx.lastPoint.y, t.x1, t.y1, t.x2, t.y2, t.x, t.y); r.push(Math.floor(o.y / n) + 1), r.push(Math.floor((o.y + o.h) / n) + 1); break; case "rect": r.push(Math.floor((t.y + this.posY) / n) + 1), r.push(Math.floor((t.y + t.h + this.posY) / n) + 1) }for (var a = 0; a < r.length; a += 1)for (; this.pdf.internal.getNumberOfPages() < r[a];)v.call(this); return r }, v = function () { var t = this.fillStyle, e = this.strokeStyle, n = this.font, r = this.lineCap, i = this.lineWidth, o = this.lineJoin; this.pdf.addPage(), this.fillStyle = t, this.strokeStyle = e, this.font = n, this.lineCap = r, this.lineWidth = i, this.lineJoin = o }, P = function (t, e, n) { for (var r = 0; r < t.length; r++)switch (t[r].type) { case "bct": t[r].x2 += e, t[r].y2 += n; case "qct": t[r].x1 += e, t[r].y1 += n; case "mt": case "lt": case "arc": default: t[r].x += e, t[r].y += n }return t }, r = function (t, e) { for (var n, r, i = this.fillStyle, o = this.strokeStyle, a = (this.font, this.lineCap), s = this.lineWidth, l = this.lineJoin, h = JSON.parse(JSON.stringify(this.path)), u = JSON.parse(JSON.stringify(this.path)), c = [], f = 0; f < u.length; f++)if (void 0 !== u[f].x) for (var p = F.call(this, u[f]), d = 0; d < p.length; d += 1)-1 === c.indexOf(p[d]) && c.push(p[d]); for (f = 0; f < c.length; f++)for (; this.pdf.internal.getNumberOfPages() < c[f];)v.call(this); if (c.sort(), this.autoPaging) { var g = c[0], m = c[c.length - 1]; for (f = g; f < m + 1; f++) { if (this.pdf.setPage(f), this.fillStyle = i, this.strokeStyle = o, this.lineCap = a, this.lineWidth = s, this.lineJoin = l, 0 !== this.ctx.clip_path.length) { var y = this.path; n = JSON.parse(JSON.stringify(this.ctx.clip_path)), this.path = P(n, this.posX, -1 * this.pdf.internal.pageSize.height * (f - 1) + this.posY), k.call(this, t, !0), this.path = y } r = JSON.parse(JSON.stringify(h)), this.path = P(r, this.posX, -1 * this.pdf.internal.pageSize.height * (f - 1) + this.posY), !1 !== e && 0 !== f || k.call(this, t, e) } } else k.call(this, t, e); this.path = h }, k = function (t, e) { if (("stroke" !== t || e || !L.call(this)) && ("stroke" === t || e || !N.call(this))) { var n = []; this.ctx.globalAlpha; this.ctx.fillOpacity < 1 && this.ctx.fillOpacity; for (var r, i = this.path, o = 0; o < i.length; o++) { var a = i[o]; switch (a.type) { case "begin": n.push({ begin: !0 }); break; case "close": n.push({ close: !0 }); break; case "mt": n.push({ start: a, deltas: [], abs: [] }); break; case "lt": var s = n.length; if (!isNaN(i[o - 1].x)) { var l = [a.x - i[o - 1].x, a.y - i[o - 1].y]; if (0 < s) for (; 0 <= s; s--)if (!0 !== n[s - 1].close && !0 !== n[s - 1].begin) { n[s - 1].deltas.push(l), n[s - 1].abs.push(a); break } } break; case "bct": l = [a.x1 - i[o - 1].x, a.y1 - i[o - 1].y, a.x2 - i[o - 1].x, a.y2 - i[o - 1].y, a.x - i[o - 1].x, a.y - i[o - 1].y]; n[n.length - 1].deltas.push(l); break; case "qct": var h = i[o - 1].x + 2 / 3 * (a.x1 - i[o - 1].x), u = i[o - 1].y + 2 / 3 * (a.y1 - i[o - 1].y), c = a.x + 2 / 3 * (a.x1 - a.x), f = a.y + 2 / 3 * (a.y1 - a.y), p = a.x, d = a.y; l = [h - i[o - 1].x, u - i[o - 1].y, c - i[o - 1].x, f - i[o - 1].y, p - i[o - 1].x, d - i[o - 1].y]; n[n.length - 1].deltas.push(l); break; case "arc": n.push({ deltas: [], abs: [], arc: !0 }), Array.isArray(n[n.length - 1].abs) && n[n.length - 1].abs.push(a) } } r = e ? null : "stroke" === t ? "stroke" : "fill"; for (o = 0; o < n.length; o++) { if (n[o].arc) for (var g = n[o].abs, m = 0; m < g.length; m++) { var y = g[m]; if (void 0 !== y.startAngle) { var v = B(y.startAngle), w = B(y.endAngle), b = y.x, x = y.y; A.call(this, b, x, y.radius, v, w, y.counterclockwise, r, e) } else I.call(this, y.x, y.y) } if (!n[o].arc && !0 !== n[o].close && !0 !== n[o].begin) { b = n[o].start.x, x = n[o].start.y; C.call(this, n[o].deltas, b, x, null, null) } } r && S.call(this, r), e && _.call(this) } }, a = function (t) { var e = this.pdf.internal.getFontSize() / this.pdf.internal.scaleFactor, n = e * (this.pdf.internal.getLineHeightFactor() - 1); switch (this.ctx.textBaseline) { case "bottom": return t - n; case "top": return t + e - n; case "hanging": return t + e - 2 * n; case "middle": return t + e / 2 - n; case "ideographic": return t; case "alphabetic": default: return t } }; n.prototype.createLinearGradient = function () { var t = function () { }; return t.colorStops = [], t.addColorStop = function (t, e) { this.colorStops.push([t, e]) }, t.getColor = function () { return 0 === this.colorStops.length ? "#000000" : this.colorStops[0][1] }, t.isCanvasGradient = !0, t }, n.prototype.createPattern = function () { return this.createLinearGradient() }, n.prototype.createRadialGradient = function () { return this.createLinearGradient() }; var A = function (t, e, n, r, i, o, a, s) { this.pdf.internal.scaleFactor; for (var l = y(r), h = y(i), u = g.call(this, n, l, h, o), c = 0; c < u.length; c++) { var f = u[c]; 0 === c && p.call(this, f.x1 + t, f.y1 + e), d.call(this, t, e, f.x2, f.y2, f.x3, f.y3, f.x4, f.y4) } s ? _.call(this) : S.call(this, a) }, S = function (t) { switch (t) { case "stroke": this.pdf.internal.out("S"); break; case "fill": this.pdf.internal.out("f") } }, _ = function () { this.pdf.clip() }, p = function (t, e) { this.pdf.internal.out(i(t) + " " + o(e) + " m") }, s = function (t) { var e; switch (t.align) { case "right": case "end": e = "right"; break; case "center": e = "center"; break; case "left": case "start": default: e = "left" }var n = this.ctx.transform.applyToPoint(new j(t.x, t.y)), r = this.ctx.transform.decompose(), i = new M; i = (i = (i = i.multiply(r.translate)).multiply(r.skew)).multiply(r.scale); for (var o, a = this.pdf.getTextDimensions(t.text), s = this.ctx.transform.applyToRectangle(new E(t.x, t.y, a.w, a.h)), l = i.applyToRectangle(new E(t.x, t.y - a.h, a.w, a.h)), h = F.call(this, l), u = [], c = 0; c < h.length; c += 1)-1 === u.indexOf(h[c]) && u.push(h[c]); if (u.sort(), !0 === this.autoPaging) for (var f = u[0], p = u[u.length - 1], d = f; d < p + 1; d++) { if (this.pdf.setPage(d), 0 !== this.ctx.clip_path.length) { var g = this.path; o = JSON.parse(JSON.stringify(this.ctx.clip_path)), this.path = P(o, this.posX, -1 * this.pdf.internal.pageSize.height * (d - 1) + this.posY), k.call(this, "fill", !0), this.path = g } var m = JSON.parse(JSON.stringify(s)); if (m = P([m], this.posX, -1 * this.pdf.internal.pageSize.height * (d - 1) + this.posY)[0], .01 <= t.scale) { var y = this.pdf.internal.getFontSize(); this.pdf.setFontSize(y * t.scale) } this.pdf.text(t.text, m.x, m.y, { angle: t.angle, align: e, renderingMode: t.renderingMode, maxWidth: t.maxWidth }), .01 <= t.scale && this.pdf.setFontSize(y) } else { if (.01 <= t.scale) { y = this.pdf.internal.getFontSize(); this.pdf.setFontSize(y * t.scale) } this.pdf.text(t.text, n.x + this.posX, n.y + this.posY, { angle: t.angle, align: e, renderingMode: t.renderingMode, maxWidth: t.maxWidth }), .01 <= t.scale && this.pdf.setFontSize(y) } }, I = function (t, e, n, r) { n = n || 0, r = r || 0, this.pdf.internal.out(i(t + n) + " " + o(e + r) + " l") }, C = function (t, e, n) { return this.pdf.lines(t, e, n, null, null) }, d = function (t, e, n, r, i, o, a, s) { this.pdf.internal.out([l(h(n + t)), l(u(r + e)), l(h(i + t)), l(u(o + e)), l(h(a + t)), l(u(s + e)), "c"].join(" ")) }, g = function (t, e, n, r) { var i = 2 * Math.PI, o = e; (o < i || i < o) && (o %= i); var a = n; (a < i || i < a) && (a %= i); for (var s = [], l = Math.PI / 2, h = r ? -1 : 1, u = e, c = Math.min(i, Math.abs(a - o)); 1e-5 < c;) { var f = u + h * Math.min(c, l); s.push(m.call(this, t, u, f)), c -= Math.abs(f - u), u = f } return s }, m = function (t, e, n) { var r = (n - e) / 2, i = t * Math.cos(r), o = t * Math.sin(r), a = i, s = -o, l = a * a + s * s, h = l + a * i + s * o, u = 4 / 3 * (Math.sqrt(2 * l * h) - h) / (a * o - s * i), c = a - u * s, f = s + u * a, p = c, d = -f, g = r + e, m = Math.cos(g), y = Math.sin(g); return { x1: t * Math.cos(e), y1: t * Math.sin(e), x2: c * m - f * y, y2: c * y + f * m, x3: p * m - d * y, y3: p * y + d * m, x4: t * Math.cos(n), y4: t * Math.sin(n) } }, B = function (t) { return 180 * t / Math.PI }, y = function (t) { return t * Math.PI / 180 }, w = function (t, e, n, r, i, o) { var a = t + .5 * (n - t), s = e + .5 * (r - e), l = i + .5 * (n - i), h = o + .5 * (r - o), u = Math.min(t, i, a, l), c = Math.max(t, i, a, l), f = Math.min(e, o, s, h), p = Math.max(e, o, s, h); return new E(u, f, c - u, p - f) }, b = function (t, e, n, r, i, o, a, s) { for (var l, h, u, c, f, p, d, g, m, y, v, w, b, x = n - t, N = r - e, L = i - n, A = o - r, S = a - i, _ = s - o, F = 0; F < 41; F++)g = (p = (h = t + (l = F / 40) * x) + l * ((c = n + l * L) - h)) + l * (c + l * (i + l * S - c) - p), m = (d = (u = e + l * N) + l * ((f = r + l * A) - u)) + l * (f + l * (o + l * _ - f) - d), b = 0 == F ? (w = y = g, v = m) : (y = Math.min(y, g), v = Math.min(v, m), w = Math.max(w, g), Math.max(b, m)); return new E(Math.round(y), Math.round(v), Math.round(w - y), Math.round(b - v)) }, j = function (t, e) { var n = t || 0; Object.defineProperty(this, "x", { enumerable: !0, get: function () { return n }, set: function (t) { isNaN(t) || (n = parseFloat(t)) } }); var r = e || 0; Object.defineProperty(this, "y", { enumerable: !0, get: function () { return r }, set: function (t) { isNaN(t) || (r = parseFloat(t)) } }); var i = "pt"; return Object.defineProperty(this, "type", { enumerable: !0, get: function () { return i }, set: function (t) { i = t.toString() } }), this }, E = function (t, e, n, r) { j.call(this, t, e), this.type = "rect"; var i = n || 0; Object.defineProperty(this, "w", { enumerable: !0, get: function () { return i }, set: function (t) { isNaN(t) || (i = parseFloat(t)) } }); var o = r || 0; return Object.defineProperty(this, "h", { enumerable: !0, get: function () { return o }, set: function (t) { isNaN(t) || (o = parseFloat(t)) } }), this }, M = function (t, e, n, r, i, o) { var a = []; return Object.defineProperty(this, "sx", { get: function () { return a[0] }, set: function (t) { a[0] = Math.round(1e5 * t) / 1e5 } }), Object.defineProperty(this, "shy", { get: function () { return a[1] }, set: function (t) { a[1] = Math.round(1e5 * t) / 1e5 } }), Object.defineProperty(this, "shx", { get: function () { return a[2] }, set: function (t) { a[2] = Math.round(1e5 * t) / 1e5 } }), Object.defineProperty(this, "sy", { get: function () { return a[3] }, set: function (t) { a[3] = Math.round(1e5 * t) / 1e5 } }), Object.defineProperty(this, "tx", { get: function () { return a[4] }, set: function (t) { a[4] = Math.round(1e5 * t) / 1e5 } }), Object.defineProperty(this, "ty", { get: function () { return a[5] }, set: function (t) { a[5] = Math.round(1e5 * t) / 1e5 } }), Object.defineProperty(this, "rotation", { get: function () { return Math.atan2(this.shx, this.sx) } }), Object.defineProperty(this, "scaleX", { get: function () { return this.decompose().scale.sx } }), Object.defineProperty(this, "scaleY", { get: function () { return this.decompose().scale.sy } }), Object.defineProperty(this, "isIdentity", { get: function () { return 1 === this.sx && (0 === this.shy && (0 === this.shx && (1 === this.sy && (0 === this.tx && 0 === this.ty)))) } }), this.sx = isNaN(t) ? 1 : t, this.shy = isNaN(e) ? 0 : e, this.shx = isNaN(n) ? 0 : n, this.sy = isNaN(r) ? 1 : r, this.tx = isNaN(i) ? 0 : i, this.ty = isNaN(o) ? 0 : o, this }; M.prototype.multiply = function (t) { var e = t.sx * this.sx + t.shy * this.shx, n = t.sx * this.shy + t.shy * this.sy, r = t.shx * this.sx + t.sy * this.shx, i = t.shx * this.shy + t.sy * this.sy, o = t.tx * this.sx + t.ty * this.shx + this.tx, a = t.tx * this.shy + t.ty * this.sy + this.ty; return new M(e, n, r, i, o, a) }, M.prototype.decompose = function () { var t = this.sx, e = this.shy, n = this.shx, r = this.sy, i = this.tx, o = this.ty, a = Math.sqrt(t * t + e * e), s = (t /= a) * n + (e /= a) * r; n -= t * s, r -= e * s; var l = Math.sqrt(n * n + r * r); return s /= l, t * (r /= l) < e * (n /= l) && (t = -t, e = -e, s = -s, a = -a), { scale: new M(a, 0, 0, l, 0, 0), translate: new M(1, 0, 0, 1, i, o), rotate: new M(t, e, -e, t, 0, 0), skew: new M(1, 0, s, 1, 0, 0) } }, M.prototype.applyToPoint = function (t) { var e = t.x * this.sx + t.y * this.shx + this.tx, n = t.x * this.shy + t.y * this.sy + this.ty; return new j(e, n) }, M.prototype.applyToRectangle = function (t) { var e = this.applyToPoint(t), n = this.applyToPoint(new j(t.x + t.w, t.y + t.h)); return new E(e.x, e.y, n.x - e.x, n.y - e.y) }, M.prototype.clone = function () { var t = this.sx, e = this.shy, n = this.shx, r = this.sy, i = this.tx, o = this.ty; return new M(t, e, n, r, i, o) } }(lt.API, "undefined" != typeof self && self || "undefined" != typeof window && window || "undefined" != typeof global && global || Function('return typeof this === "object" && this.content')() || Function("return this")()), /** * jsPDF filters PlugIn * Copyright (c) 2014 Aras Abbasi * * Licensed under the MIT License. * http://opensource.org/licenses/mit-license */ a = lt.API, o = function (t) { var r, e, n, i, o, a, s, l, h, u; for (/[^\x00-\xFF]/.test(t), e = [], n = 0, i = (t += r = "\0\0\0\0".slice(t.length % 4 || 4)).length; n < i; n += 4)0 !== (o = (t.charCodeAt(n) << 24) + (t.charCodeAt(n + 1) << 16) + (t.charCodeAt(n + 2) << 8) + t.charCodeAt(n + 3)) ? (a = (o = ((o = ((o = ((o = (o - (u = o % 85)) / 85) - (h = o % 85)) / 85) - (l = o % 85)) / 85) - (s = o % 85)) / 85) % 85, e.push(a + 33, s + 33, l + 33, h + 33, u + 33)) : e.push(122); return function (t, e) { for (var n = r.length; 0 < n; n--)t.pop() }(e), String.fromCharCode.apply(String, e) + "~>" }, s = function (t) { var r, e, n, i, o, a = String, s = "length", l = "charCodeAt", h = "slice", u = "replace"; for (t[h](-2), t = t[h](0, -2)[u](/\s/g, "")[u]("z", "!!!!!"), n = [], i = 0, o = (t += r = "uuuuu"[h](t[s] % 5 || 5))[s]; i < o; i += 5)e = 52200625 * (t[l](i) - 33) + 614125 * (t[l](i + 1) - 33) + 7225 * (t[l](i + 2) - 33) + 85 * (t[l](i + 3) - 33) + (t[l](i + 4) - 33), n.push(255 & e >> 24, 255 & e >> 16, 255 & e >> 8, 255 & e); return function (t, e) { for (var n = r[s]; 0 < n; n--)t.pop() }(n), a.fromCharCode.apply(a, n) }, h = function (t) { for (var e = "", n = 0; n < t.length; n += 1)e += ("0" + t.charCodeAt(n).toString(16)).slice(-2); return e += ">" }, u = function (t) { var e = new RegExp(/^([0-9A-Fa-f]{2})+$/); if (-1 !== (t = t.replace(/\s/g, "")).indexOf(">") && (t = t.substr(0, t.indexOf(">"))), t.length % 2 && (t += "0"), !1 === e.test(t)) return ""; for (var n = "", r = 0; r < t.length; r += 2)n += String.fromCharCode("0x" + (t[r] + t[r + 1])); return n }, c = function (t, e) { e = Object.assign({ predictor: 1, colors: 1, bitsPerComponent: 8, columns: 1 }, e); for (var n, r, i = [], o = t.length; o--;)i[o] = t.charCodeAt(o); return n = a.adler32cs.from(t), (r = new Deflater(6)).append(new Uint8Array(i)), t = r.flush(), (i = new Uint8Array(t.length + 6)).set(new Uint8Array([120, 156])), i.set(t, 2), i.set(new Uint8Array([255 & n, n >> 8 & 255, n >> 16 & 255, n >> 24 & 255]), t.length + 2), t = String.fromCharCode.apply(null, i) }, a.processDataByFilters = function (t, e) { var n = 0, r = t || "", i = []; for ("string" == typeof (e = e || []) && (e = [e]), n = 0; n < e.length; n += 1)switch (e[n]) { case "ASCII85Decode": case "/ASCII85Decode": r = s(r), i.push("/ASCII85Encode"); break; case "ASCII85Encode": case "/ASCII85Encode": r = o(r), i.push("/ASCII85Decode"); break; case "ASCIIHexDecode": case "/ASCIIHexDecode": r = u(r), i.push("/ASCIIHexEncode"); break; case "ASCIIHexEncode": case "/ASCIIHexEncode": r = h(r), i.push("/ASCIIHexDecode"); break; case "FlateEncode": case "/FlateEncode": r = c(r), i.push("/FlateDecode"); break; default: throw 'The filter: "' + e[n] + '" is not implemented' }return { data: r, reverseChain: i.reverse().join(" ") } }, ( /** * jsPDF fileloading PlugIn * Copyright (c) 2018 Aras Abbasi (aras.abbasi@gmail.com) * * Licensed under the MIT License. * http://opensource.org/licenses/mit-license */ r = lt.API).loadFile = function (t, e, n) { var r; e = e || !0, n = n || function () { }; try { r = function (t, e, n) { var r = new XMLHttpRequest, i = [], o = 0, a = function (t) { var e = t.length, n = String.fromCharCode; for (o = 0; o < e; o += 1)i.push(n(255 & t.charCodeAt(o))); return i.join("") }; if (r.open("GET", t, !e), r.overrideMimeType("text/plain; charset=x-user-defined"), !1 === e && (r.onload = function () { return a(this.responseText) }), r.send(null), 200 === r.status) return e ? a(r.responseText) : void 0; console.warn('Unable to load file "' + t + '"') }(t, e) } catch (t) { r = void 0 } return r }, r.loadImageFile = r.loadFile, /** * Copyright (c) 2018 Erik Koopmans * Released under the MIT License. * * Licensed under the MIT License. * http://opensource.org/licenses/mit-license */ i = lt.API, f = "undefined" != typeof window && window || "undefined" != typeof global && global, g = function (t) { var e = se(t); return "undefined" === e ? "undefined" : "string" === e || t instanceof String ? "string" : "number" === e || t instanceof Number ? "number" : "function" === e || t instanceof Function ? "function" : t && t.constructor === Array ? "array" : t && 1 === t.nodeType ? "element" : "object" === e ? "object" : "unknown" }, m = function (t, e) { var n = document.createElement(t); if (e.className && (n.className = e.className), e.innerHTML) { n.innerHTML = e.innerHTML; for (var r = n.getElementsByTagName("script"), i = r.length; 0 < i--; null)r[i].parentNode.removeChild(r[i]) } for (var o in e.style) n.style[o] = e.style[o]; return n }, (((y = function t(e) { var n = Object.assign(t.convert(Promise.resolve()), JSON.parse(JSON.stringify(t.template))), r = t.convert(Promise.resolve(), n); return r = (r = r.setProgress(1, t, 1, [t])).set(e) }).prototype = Object.create(Promise.prototype)).constructor = y).convert = function (t, e) { return t.__proto__ = e || y.prototype, t }, y.template = { prop: { src: null, container: null, overlay: null, canvas: null, img: null, pdf: null, pageSize: null, callback: function () { } }, progress: { val: 0, state: null, n: 0, stack: [] }, opt: { filename: "file.pdf", margin: [0, 0, 0, 0], enableLinks: !0, x: 0, y: 0, html2canvas: {}, jsPDF: {} } }, y.prototype.from = function (t, e) { return this.then(function () { switch (e = e || function (t) { switch (g(t)) { case "string": return "string"; case "element": return "canvas" === t.nodeName.toLowerCase ? "canvas" : "element"; default: return "unknown" } }(t)) { case "string": return this.set({ src: m("div", { innerHTML: t }) }); case "element": return this.set({ src: t }); case "canvas": return this.set({ canvas: t }); case "img": return this.set({ img: t }); default: return this.error("Unknown source type.") } }) }, y.prototype.to = function (t) { switch (t) { case "container": return this.toContainer(); case "canvas": return this.toCanvas(); case "img": return this.toImg(); case "pdf": return this.toPdf(); default: return this.error("Invalid target.") } }, y.prototype.toContainer = function () { return this.thenList([function () { return this.prop.src || this.error("Cannot duplicate - no source HTML.") }, function () { return this.prop.pageSize || this.setPageSize() }]).then(function () { var t = { position: "relative", display: "inline-block", width: Math.max(this.prop.src.clientWidth, this.prop.src.scrollWidth, this.prop.src.offsetWidth) + "px", left: 0, right: 0, top: 0, margin: "auto", backgroundColor: "white" }, e = function t(e, n) { for (var r = 3 === e.nodeType ? document.createTextNode(e.nodeValue) : e.cloneNode(!1), i = e.firstChild; i; i = i.nextSibling)!0 !== n && 1 === i.nodeType && "SCRIPT" === i.nodeName || r.appendChild(t(i, n)); return 1 === e.nodeType && ("CANVAS" === e.nodeName ? (r.width = e.width, r.height = e.height, r.getContext("2d").drawImage(e, 0, 0)) : "TEXTAREA" !== e.nodeName && "SELECT" !== e.nodeName || (r.value = e.value), r.addEventListener("load", function () { r.scrollTop = e.scrollTop, r.scrollLeft = e.scrollLeft }, !0)), r }(this.prop.src, this.opt.html2canvas.javascriptEnabled); "BODY" === e.tagName && (t.height = Math.max(document.body.scrollHeight, document.body.offsetHeight, document.documentElement.clientHeight, document.documentElement.scrollHeight, document.documentElement.offsetHeight) + "px"), this.prop.overlay = m("div", { className: "html2pdf__overlay", style: { position: "fixed", overflow: "hidden", zIndex: 1e3, left: "-100000px", right: 0, bottom: 0, top: 0 } }), this.prop.container = m("div", { className: "html2pdf__container", style: t }), this.prop.container.appendChild(e), this.prop.container.firstChild.appendChild(m("div", { style: { clear: "both", border: "0 none transparent", margin: 0, padding: 0, height: 0 } })), this.prop.container.style.float = "none", this.prop.overlay.appendChild(this.prop.container), document.body.appendChild(this.prop.overlay), this.prop.container.firstChild.style.position = "relative", this.prop.container.height = Math.max(this.prop.container.firstChild.clientHeight, this.prop.container.firstChild.scrollHeight, this.prop.container.firstChild.offsetHeight) + "px" }) }, y.prototype.toCanvas = function () { var t = [function () { return document.body.contains(this.prop.container) || this.toContainer() }]; return this.thenList(t).then(function () { var t = Object.assign({}, this.opt.html2canvas); if (delete t.onrendered, this.isHtml2CanvasLoaded()) return html2canvas(this.prop.container, t) }).then(function (t) { (this.opt.html2canvas.onrendered || function () { })(t), this.prop.canvas = t, document.body.removeChild(this.prop.overlay) }) }, y.prototype.toContext2d = function () { var t = [function () { return document.body.contains(this.prop.container) || this.toContainer() }]; return this.thenList(t).then(function () { var t = this.opt.jsPDF, e = Object.assign({ async: !0, allowTaint: !0, backgroundColor: "#ffffff", imageTimeout: 15e3, logging: !0, proxy: null, removeContainer: !0, foreignObjectRendering: !1, useCORS: !1 }, this.opt.html2canvas); if (delete e.onrendered, t.context2d.autoPaging = !0, t.context2d.posX = this.opt.x, t.context2d.posY = this.opt.y, e.windowHeight = e.windowHeight || 0, e.windowHeight = 0 == e.windowHeight ? Math.max(this.prop.container.clientHeight, this.prop.container.scrollHeight, this.prop.container.offsetHeight) : e.windowHeight, this.isHtml2CanvasLoaded()) return html2canvas(this.prop.container, e) }).then(function (t) { (this.opt.html2canvas.onrendered || function () { })(t), this.prop.canvas = t, document.body.removeChild(this.prop.overlay) }) }, y.prototype.toImg = function () { return this.thenList([function () { return this.prop.canvas || this.toCanvas() }]).then(function () { var t = this.prop.canvas.toDataURL("image/" + this.opt.image.type, this.opt.image.quality); this.prop.img = document.createElement("img"), this.prop.img.src = t }) }, y.prototype.toPdf = function () { return this.thenList([function () { return this.toContext2d() }]).then(function () { this.prop.pdf = this.prop.pdf || this.opt.jsPDF }) }, y.prototype.output = function (t, e, n) { return "img" === (n = n || "pdf").toLowerCase() || "image" === n.toLowerCase() ? this.outputImg(t, e) : this.outputPdf(t, e) }, y.prototype.outputPdf = function (t, e) { return this.thenList([function () { return this.prop.pdf || this.toPdf() }]).then(function () { return this.prop.pdf.output(t, e) }) }, y.prototype.outputImg = function (t, e) { return this.thenList([function () { return this.prop.img || this.toImg() }]).then(function () { switch (t) { case void 0: case "img": return this.prop.img; case "datauristring": case "dataurlstring": return this.prop.img.src; case "datauri": case "dataurl": return document.location.href = this.prop.img.src; default: throw 'Image output type "' + t + '" is not supported.' } }) }, y.prototype.isHtml2CanvasLoaded = function () { var t = void 0 !== f.html2canvas; return t || console.error("html2canvas not loaded."), t }, y.prototype.save = function (t) { if (this.isHtml2CanvasLoaded()) return this.thenList([function () { return this.prop.pdf || this.toPdf() }]).set(t ? { filename: t } : null).then(function () { this.prop.pdf.save(this.opt.filename) }) }, y.prototype.doCallback = function (t) { if (this.isHtml2CanvasLoaded()) return this.thenList([function () { return this.prop.pdf || this.toPdf() }]).then(function () { this.prop.callback(this.prop.pdf) }) }, y.prototype.set = function (e) { if ("object" !== g(e)) return this; var t = Object.keys(e || {}).map(function (t) { if (t in y.template.prop) return function () { this.prop[t] = e[t] }; switch (t) { case "margin": return this.setMargin.bind(this, e.margin); case "jsPDF": return function () { return this.opt.jsPDF = e.jsPDF, this.setPageSize() }; case "pageSize": return this.setPageSize.bind(this, e.pageSize); default: return function () { this.opt[t] = e[t] } } }, this); return this.then(function () { return this.thenList(t) }) }, y.prototype.get = function (e, n) { return this.then(function () { var t = e in y.template.prop ? this.prop[e] : this.opt[e]; return n ? n(t) : t }) }, y.prototype.setMargin = function (t) { return this.then(function () { switch (g(t)) { case "number": t = [t, t, t, t]; case "array": if (2 === t.length && (t = [t[0], t[1], t[0], t[1]]), 4 === t.length) break; default: return this.error("Invalid margin array.") }this.opt.margin = t }).then(this.setPageSize) }, y.prototype.setPageSize = function (t) { function e(t, e) { return Math.floor(t * e / 72 * 96) } return this.then(function () { (t = t || lt.getPageSize(this.opt.jsPDF)).hasOwnProperty("inner") || (t.inner = { width: t.width - this.opt.margin[1] - this.opt.margin[3], height: t.height - this.opt.margin[0] - this.opt.margin[2] }, t.inner.px = { width: e(t.inner.width, t.k), height: e(t.inner.height, t.k) }, t.inner.ratio = t.inner.height / t.inner.width), this.prop.pageSize = t }) }, y.prototype.setProgress = function (t, e, n, r) { return null != t && (this.progress.val = t), null != e && (this.progress.state = e), null != n && (this.progress.n = n), null != r && (this.progress.stack = r), this.progress.ratio = this.progress.val / this.progress.state, this }, y.prototype.updateProgress = function (t, e, n, r) { return this.setProgress(t ? this.progress.val + t : null, e || null, n ? this.progress.n + n : null, r ? this.progress.stack.concat(r) : null) }, y.prototype.then = function (t, e) { var n = this; return this.thenCore(t, e, function (e, t) { return n.updateProgress(null, null, 1, [e]), Promise.prototype.then.call(this, function (t) { return n.updateProgress(null, e), t }).then(e, t).then(function (t) { return n.updateProgress(1), t }) }) }, y.prototype.thenCore = function (t, e, n) { n = n || Promise.prototype.then; var r = this; t && (t = t.bind(r)), e && (e = e.bind(r)); var i = -1 !== Promise.toString().indexOf("[native code]") && "Promise" === Promise.name ? r : y.convert(Object.assign({}, r), Promise.prototype), o = n.call(i, t, e); return y.convert(o, r.__proto__) }, y.prototype.thenExternal = function (t, e) { return Promise.prototype.then.call(this, t, e) }, y.prototype.thenList = function (t) { var e = this; return t.forEach(function (t) { e = e.thenCore(t) }), e }, y.prototype.catch = function (t) { t && (t = t.bind(this)); var e = Promise.prototype.catch.call(this, t); return y.convert(e, this) }, y.prototype.catchExternal = function (t) { return Promise.prototype.catch.call(this, t) }, y.prototype.error = function (t) { return this.then(function () { throw new Error(t) }) }, y.prototype.using = y.prototype.set, y.prototype.saveAs = y.prototype.save, y.prototype.export = y.prototype.output, y.prototype.run = y.prototype.then, lt.getPageSize = function (t, e, n) { if ("object" === se(t)) { var r = t; t = r.orientation, e = r.unit || e, n = r.format || n } e = e || "mm", n = n || "a4", t = ("" + (t || "P")).toLowerCase(); var i = ("" + n).toLowerCase(), o = { a0: [2383.94, 3370.39], a1: [1683.78, 2383.94], a2: [1190.55, 1683.78], a3: [841.89, 1190.55], a4: [595.28, 841.89], a5: [419.53, 595.28], a6: [297.64, 419.53], a7: [209.76, 297.64], a8: [147.4, 209.76], a9: [104.88, 147.4], a10: [73.7, 104.88], b0: [2834.65, 4008.19], b1: [2004.09, 2834.65], b2: [1417.32, 2004.09], b3: [1000.63, 1417.32], b4: [708.66, 1000.63], b5: [498.9, 708.66], b6: [354.33, 498.9], b7: [249.45, 354.33], b8: [175.75, 249.45], b9: [124.72, 175.75], b10: [87.87, 124.72], c0: [2599.37, 3676.54], c1: [1836.85, 2599.37], c2: [1298.27, 1836.85], c3: [918.43, 1298.27], c4: [649.13, 918.43], c5: [459.21, 649.13], c6: [323.15, 459.21], c7: [229.61, 323.15], c8: [161.57, 229.61], c9: [113.39, 161.57], c10: [79.37, 113.39], dl: [311.81, 623.62], letter: [612, 792], "government-letter": [576, 756], legal: [612, 1008], "junior-legal": [576, 360], ledger: [1224, 792], tabloid: [792, 1224], "credit-card": [153, 243] }; switch (e) { case "pt": var a = 1; break; case "mm": a = 72 / 25.4; break; case "cm": a = 72 / 2.54; break; case "in": a = 72; break; case "px": a = .75; break; case "pc": case "em": a = 12; break; case "ex": a = 6; break; default: throw "Invalid unit: " + e }if (o.hasOwnProperty(i)) var s = o[i][1] / a, l = o[i][0] / a; else try { s = n[1], l = n[0] } catch (t) { throw new Error("Invalid format: " + n) } if ("p" === t || "portrait" === t) { if (t = "p", s < l) { var h = l; l = s, s = h } } else { if ("l" !== t && "landscape" !== t) throw "Invalid orientation: " + t; t = "l", l < s && (h = l, l = s, s = h) } return { width: l, height: s, unit: e, k: a } }, i.html = function (t, e) { (e = e || {}).callback = e.callback || function () { }, e.html2canvas = e.html2canvas || {}, e.html2canvas.canvas = e.html2canvas.canvas || this.canvas, e.jsPDF = e.jsPDF || this, e.jsPDF; var n = new y(e); return e.worker ? n : n.from(t).doCallback() }, lt.API.addJS = function (t) { return b = t, this.internal.events.subscribe("postPutResources", function (t) { v = this.internal.newObject(), this.internal.out("<<"), this.internal.out("/Names [(EmbeddedJS) " + (v + 1) + " 0 R]"), this.internal.out(">>"), this.internal.out("endobj"), w = this.internal.newObject(), this.internal.out("<<"), this.internal.out("/S /JavaScript"), this.internal.out("/JS (" + b + ")"), this.internal.out(">>"), this.internal.out("endobj") }), this.internal.events.subscribe("putCatalog", function () { void 0 !== v && void 0 !== w && this.internal.out("/Names <>") }), this }, ( /** * @license * Copyright (c) 2014 Steven Spungin (TwelveTone LLC) steven@twelvetone.tv * * Licensed under the MIT License. * http://opensource.org/licenses/mit-license */ x = lt.API).events.push(["postPutResources", function () { var t = this, e = /^(\d+) 0 obj$/; if (0 < this.outline.root.children.length) for (var n = t.outline.render().split(/\r\n/), r = 0; r < n.length; r++) { var i = n[r], o = e.exec(i); if (null != o) { var a = o[1]; t.internal.newObjectDeferredBegin(a, !1) } t.internal.write(i) } if (this.outline.createNamedDestinations) { var s = this.internal.pages.length, l = []; for (r = 0; r < s; r++) { var h = t.internal.newObject(); l.push(h); var u = t.internal.getPageInfo(r + 1); t.internal.write("<< /D[" + u.objId + " 0 R /XYZ null null null]>> endobj") } var c = t.internal.newObject(); for (t.internal.write("<< /Names [ "), r = 0; r < l.length; r++)t.internal.write("(page_" + (r + 1) + ")" + l[r] + " 0 R"); t.internal.write(" ] >>", "endobj"), t.internal.newObject(), t.internal.write("<< /Dests " + c + " 0 R"), t.internal.write(">>", "endobj") } }]), x.events.push(["putCatalog", function () { 0 < this.outline.root.children.length && (this.internal.write("/Outlines", this.outline.makeRef(this.outline.root)), this.outline.createNamedDestinations && this.internal.write("/Names " + namesOid + " 0 R")) }]), x.events.push(["initialized", function () { var a = this; a.outline = { createNamedDestinations: !1, root: { children: [] } }, a.outline.add = function (t, e, n) { var r = { title: e, options: n, children: [] }; return null == t && (t = this.root), t.children.push(r), r }, a.outline.render = function () { return this.ctx = {}, this.ctx.val = "", this.ctx.pdf = a, this.genIds_r(this.root), this.renderRoot(this.root), this.renderItems(this.root), this.ctx.val }, a.outline.genIds_r = function (t) { t.id = a.internal.newObjectDeferred(); for (var e = 0; e < t.children.length; e++)this.genIds_r(t.children[e]) }, a.outline.renderRoot = function (t) { this.objStart(t), this.line("/Type /Outlines"), 0 < t.children.length && (this.line("/First " + this.makeRef(t.children[0])), this.line("/Last " + this.makeRef(t.children[t.children.length - 1]))), this.line("/Count " + this.count_r({ count: 0 }, t)), this.objEnd() }, a.outline.renderItems = function (t) { this.ctx.pdf.internal.getCoordinateString; for (var e = this.ctx.pdf.internal.getVerticalCoordinateString, n = 0; n < t.children.length; n++) { var r = t.children[n]; this.objStart(r), this.line("/Title " + this.makeString(r.title)), this.line("/Parent " + this.makeRef(t)), 0 < n && this.line("/Prev " + this.makeRef(t.children[n - 1])), n < t.children.length - 1 && this.line("/Next " + this.makeRef(t.children[n + 1])), 0 < r.children.length && (this.line("/First " + this.makeRef(r.children[0])), this.line("/Last " + this.makeRef(r.children[r.children.length - 1]))); var i = this.count = this.count_r({ count: 0 }, r); if (0 < i && this.line("/Count " + i), r.options && r.options.pageNumber) { var o = a.internal.getPageInfo(r.options.pageNumber); this.line("/Dest [" + o.objId + " 0 R /XYZ 0 " + e(0) + " 0]") } this.objEnd() } for (n = 0; n < t.children.length; n++)r = t.children[n], this.renderItems(r) }, a.outline.line = function (t) { this.ctx.val += t + "\r\n" }, a.outline.makeRef = function (t) { return t.id + " 0 R" }, a.outline.makeString = function (t) { return "(" + a.internal.pdfEscape(t) + ")" }, a.outline.objStart = function (t) { this.ctx.val += "\r\n" + t.id + " 0 obj\r\n<<\r\n" }, a.outline.objEnd = function (t) { this.ctx.val += ">> \r\nendobj\r\n" }, a.outline.count_r = function (t, e) { for (var n = 0; n < e.children.length; n++)t.count++, this.count_r(t, e.children[n]); return t.count } }]), /** * @license * * Copyright (c) 2014 James Robb, https://github.com/jamesbrobb * * * ==================================================================== */ I = lt.API, C = function () { var t = "function" == typeof Deflater; if (!t) throw new Error("requires deflate.js for compression"); return t }, B = function (t, e, n, r) { var i = 5, o = E; switch (r) { case I.image_compression.FAST: i = 3, o = j; break; case I.image_compression.MEDIUM: i = 6, o = M; break; case I.image_compression.SLOW: i = 9, o = O }t = A(t, e, n, o); var a = new Uint8Array(N(i)), s = L(t), l = new Deflater(i), h = l.append(t), u = l.flush(), c = a.length + h.length + u.length, f = new Uint8Array(c + 4); return f.set(a), f.set(h, a.length), f.set(u, a.length + h.length), f[c++] = s >>> 24 & 255, f[c++] = s >>> 16 & 255, f[c++] = s >>> 8 & 255, f[c++] = 255 & s, I.arrayBufferToBinaryString(f) }, N = function (t, e) { var n = Math.LOG2E * Math.log(32768) - 8 << 4 | 8, r = n << 8; return r |= Math.min(3, (e - 1 & 255) >> 1) << 6, r |= 0, [n, 255 & (r += 31 - r % 31)] }, L = function (t, e) { for (var n, r = 1, i = 0, o = t.length, a = 0; 0 < o;) { for (o -= n = e < o ? e : o; i += r += t[a++], --n;); r %= 65521, i %= 65521 } return (i << 16 | r) >>> 0 }, A = function (t, e, n, r) { for (var i, o, a, s = t.length / e, l = new Uint8Array(t.length + s), h = T(), u = 0; u < s; u++) { if (a = u * e, i = t.subarray(a, a + e), r) l.set(r(i, n, o), a + u); else { for (var c = 0, f = h.length, p = []; c < f; c++)p[c] = h[c](i, n, o); var d = R(p.concat()); l.set(p[d], a + u) } o = i } return l }, S = function (t, e, n) { var r = Array.apply([], t); return r.unshift(0), r }, j = function (t, e, n) { var r, i = [], o = 0, a = t.length; for (i[0] = 1; o < a; o++)r = t[o - e] || 0, i[o + 1] = t[o] - r + 256 & 255; return i }, E = function (t, e, n) { var r, i = [], o = 0, a = t.length; for (i[0] = 2; o < a; o++)r = n && n[o] || 0, i[o + 1] = t[o] - r + 256 & 255; return i }, M = function (t, e, n) { var r, i, o = [], a = 0, s = t.length; for (o[0] = 3; a < s; a++)r = t[a - e] || 0, i = n && n[a] || 0, o[a + 1] = t[a] + 256 - (r + i >>> 1) & 255; return o }, O = function (t, e, n) { var r, i, o, a, s = [], l = 0, h = t.length; for (s[0] = 4; l < h; l++)r = t[l - e] || 0, i = n && n[l] || 0, o = n && n[l - e] || 0, a = q(r, i, o), s[l + 1] = t[l] - a + 256 & 255; return s }, q = function (t, e, n) { var r = t + e - n, i = Math.abs(r - t), o = Math.abs(r - e), a = Math.abs(r - n); return i <= o && i <= a ? t : o <= a ? e : n }, T = function () { return [S, j, E, M, O] }, R = function (t) { for (var e, n, r, i = 0, o = t.length; i < o;)((e = D(t[i].slice(1))) < n || !n) && (n = e, r = i), i++; return r }, D = function (t) { for (var e = 0, n = t.length, r = 0; e < n;)r += Math.abs(t[e++]); return r }, I.processPNG = function (t, e, n, r, i) { var o, a, s, l, h, u, c = this.color_spaces.DEVICE_RGB, f = this.decode.FLATE_DECODE, p = 8; if (this.isArrayBuffer(t) && (t = new Uint8Array(t)), this.isArrayBufferView(t)) { if ("function" != typeof PNG || "function" != typeof kt) throw new Error("PNG support requires png.js and zlib.js"); if (t = (o = new PNG(t)).imgData, p = o.bits, c = o.colorSpace, l = o.colors, -1 !== [4, 6].indexOf(o.colorType)) { if (8 === o.bits) for (var d, g = (_ = 32 == o.pixelBitlength ? new Uint32Array(o.decodePixels().buffer) : 16 == o.pixelBitlength ? new Uint16Array(o.decodePixels().buffer) : new Uint8Array(o.decodePixels().buffer)).length, m = new Uint8Array(g * o.colors), y = new Uint8Array(g), v = o.pixelBitlength - o.bits, w = 0, b = 0; w < g; w++) { for (x = _[w], d = 0; d < v;)m[b++] = x >>> d & 255, d += o.bits; y[w] = x >>> d & 255 } if (16 === o.bits) { g = (_ = new Uint32Array(o.decodePixels().buffer)).length, m = new Uint8Array(g * (32 / o.pixelBitlength) * o.colors), y = new Uint8Array(g * (32 / o.pixelBitlength)); for (var x, N = 1 < o.colors, L = b = w = 0; w < g;)x = _[w++], m[b++] = x >>> 0 & 255, N && (m[b++] = x >>> 16 & 255, x = _[w++], m[b++] = x >>> 0 & 255), y[L++] = x >>> 16 & 255; p = 8 } r !== I.image_compression.NONE && C() ? (t = B(m, o.width * o.colors, o.colors, r), u = B(y, o.width, 1, r)) : (t = m, u = y, f = null) } if (3 === o.colorType && (c = this.color_spaces.INDEXED, h = o.palette, o.transparency.indexed)) { var A = o.transparency.indexed, S = 0; for (w = 0, g = A.length; w < g; ++w)S += A[w]; if ((S /= 255) == g - 1 && -1 !== A.indexOf(0)) s = [A.indexOf(0)]; else if (S !== g) { var _ = o.decodePixels(); for (y = new Uint8Array(_.length), w = 0, g = _.length; w < g; w++)y[w] = A[_[w]]; u = B(y, o.width, 1) } } var F = function (t) { var e; switch (t) { case I.image_compression.FAST: e = 11; break; case I.image_compression.MEDIUM: e = 13; break; case I.image_compression.SLOW: e = 14; break; default: e = 12 }return e }(r); return a = f === this.decode.FLATE_DECODE ? "/Predictor " + F + " /Colors " + l + " /BitsPerComponent " + p + " /Columns " + o.width : "/Colors " + l + " /BitsPerComponent " + p + " /Columns " + o.width, (this.isArrayBuffer(t) || this.isArrayBufferView(t)) && (t = this.arrayBufferToBinaryString(t)), (u && this.isArrayBuffer(u) || this.isArrayBufferView(u)) && (u = this.arrayBufferToBinaryString(u)), this.createImageInfo(t, o.width, o.height, c, p, f, e, n, a, s, h, u, F) } throw new Error("Unsupported PNG image data, try using JPEG instead.") }, ( /** * @license * Copyright (c) 2017 Aras Abbasi * * Licensed under the MIT License. * http://opensource.org/licenses/mit-license */ U = lt.API).processGIF89A = function (t, e, n, r, i) { var o = new At(t), a = o.width, s = o.height, l = []; o.decodeAndBlitFrameRGBA(0, l); var h = { data: l, width: a, height: s }, u = new _t(100).encode(h, 100); return U.processJPEG.call(this, u, e, n, r) }, U.processGIF87A = U.processGIF89A, ( /** * Copyright (c) 2018 Aras Abbasi * * Licensed under the MIT License. * http://opensource.org/licenses/mit-license */ z = lt.API).processBMP = function (t, e, n, r, i) { var o = new Ft(t, !1), a = o.width, s = o.height, l = { data: o.getData(), width: a, height: s }, h = new _t(100).encode(l, 100); return z.processJPEG.call(this, h, e, n, r) }, lt.API.setLanguage = function (t) { return void 0 === this.internal.languageSettings && (this.internal.languageSettings = {}, this.internal.languageSettings.isSubscribed = !1), void 0 !== { af: "Afrikaans", sq: "Albanian", ar: "Arabic (Standard)", "ar-DZ": "Arabic (Algeria)", "ar-BH": "Arabic (Bahrain)", "ar-EG": "Arabic (Egypt)", "ar-IQ": "Arabic (Iraq)", "ar-JO": "Arabic (Jordan)", "ar-KW": "Arabic (Kuwait)", "ar-LB": "Arabic (Lebanon)", "ar-LY": "Arabic (Libya)", "ar-MA": "Arabic (Morocco)", "ar-OM": "Arabic (Oman)", "ar-QA": "Arabic (Qatar)", "ar-SA": "Arabic (Saudi Arabia)", "ar-SY": "Arabic (Syria)", "ar-TN": "Arabic (Tunisia)", "ar-AE": "Arabic (U.A.E.)", "ar-YE": "Arabic (Yemen)", an: "Aragonese", hy: "Armenian", as: "Assamese", ast: "Asturian", az: "Azerbaijani", eu: "Basque", be: "Belarusian", bn: "Bengali", bs: "Bosnian", br: "Breton", bg: "Bulgarian", my: "Burmese", ca: "Catalan", ch: "Chamorro", ce: "Chechen", zh: "Chinese", "zh-HK": "Chinese (Hong Kong)", "zh-CN": "Chinese (PRC)", "zh-SG": "Chinese (Singapore)", "zh-TW": "Chinese (Taiwan)", cv: "Chuvash", co: "Corsican", cr: "Cree", hr: "Croatian", cs: "Czech", da: "Danish", nl: "Dutch (Standard)", "nl-BE": "Dutch (Belgian)", en: "English", "en-AU": "English (Australia)", "en-BZ": "English (Belize)", "en-CA": "English (Canada)", "en-IE": "English (Ireland)", "en-JM": "English (Jamaica)", "en-NZ": "English (New Zealand)", "en-PH": "English (Philippines)", "en-ZA": "English (South Africa)", "en-TT": "English (Trinidad & Tobago)", "en-GB": "English (United Kingdom)", "en-US": "English (United States)", "en-ZW": "English (Zimbabwe)", eo: "Esperanto", et: "Estonian", fo: "Faeroese", fj: "Fijian", fi: "Finnish", fr: "French (Standard)", "fr-BE": "French (Belgium)", "fr-CA": "French (Canada)", "fr-FR": "French (France)", "fr-LU": "French (Luxembourg)", "fr-MC": "French (Monaco)", "fr-CH": "French (Switzerland)", fy: "Frisian", fur: "Friulian", gd: "Gaelic (Scots)", "gd-IE": "Gaelic (Irish)", gl: "Galacian", ka: "Georgian", de: "German (Standard)", "de-AT": "German (Austria)", "de-DE": "German (Germany)", "de-LI": "German (Liechtenstein)", "de-LU": "German (Luxembourg)", "de-CH": "German (Switzerland)", el: "Greek", gu: "Gujurati", ht: "Haitian", he: "Hebrew", hi: "Hindi", hu: "Hungarian", is: "Icelandic", id: "Indonesian", iu: "Inuktitut", ga: "Irish", it: "Italian (Standard)", "it-CH": "Italian (Switzerland)", ja: "Japanese", kn: "Kannada", ks: "Kashmiri", kk: "Kazakh", km: "Khmer", ky: "Kirghiz", tlh: "Klingon", ko: "Korean", "ko-KP": "Korean (North Korea)", "ko-KR": "Korean (South Korea)", la: "Latin", lv: "Latvian", lt: "Lithuanian", lb: "Luxembourgish", mk: "FYRO Macedonian", ms: "Malay", ml: "Malayalam", mt: "Maltese", mi: "Maori", mr: "Marathi", mo: "Moldavian", nv: "Navajo", ng: "Ndonga", ne: "Nepali", no: "Norwegian", nb: "Norwegian (Bokmal)", nn: "Norwegian (Nynorsk)", oc: "Occitan", or: "Oriya", om: "Oromo", fa: "Persian", "fa-IR": "Persian/Iran", pl: "Polish", pt: "Portuguese", "pt-BR": "Portuguese (Brazil)", pa: "Punjabi", "pa-IN": "Punjabi (India)", "pa-PK": "Punjabi (Pakistan)", qu: "Quechua", rm: "Rhaeto-Romanic", ro: "Romanian", "ro-MO": "Romanian (Moldavia)", ru: "Russian", "ru-MO": "Russian (Moldavia)", sz: "Sami (Lappish)", sg: "Sango", sa: "Sanskrit", sc: "Sardinian", sd: "Sindhi", si: "Singhalese", sr: "Serbian", sk: "Slovak", sl: "Slovenian", so: "Somani", sb: "Sorbian", es: "Spanish", "es-AR": "Spanish (Argentina)", "es-BO": "Spanish (Bolivia)", "es-CL": "Spanish (Chile)", "es-CO": "Spanish (Colombia)", "es-CR": "Spanish (Costa Rica)", "es-DO": "Spanish (Dominican Republic)", "es-EC": "Spanish (Ecuador)", "es-SV": "Spanish (El Salvador)", "es-GT": "Spanish (Guatemala)", "es-HN": "Spanish (Honduras)", "es-MX": "Spanish (Mexico)", "es-NI": "Spanish (Nicaragua)", "es-PA": "Spanish (Panama)", "es-PY": "Spanish (Paraguay)", "es-PE": "Spanish (Peru)", "es-PR": "Spanish (Puerto Rico)", "es-ES": "Spanish (Spain)", "es-UY": "Spanish (Uruguay)", "es-VE": "Spanish (Venezuela)", sx: "Sutu", sw: "Swahili", sv: "Swedish", "sv-FI": "Swedish (Finland)", "sv-SV": "Swedish (Sweden)", ta: "Tamil", tt: "Tatar", te: "Teluga", th: "Thai", tig: "Tigre", ts: "Tsonga", tn: "Tswana", tr: "Turkish", tk: "Turkmen", uk: "Ukrainian", hsb: "Upper Sorbian", ur: "Urdu", ve: "Venda", vi: "Vietnamese", vo: "Volapuk", wa: "Walloon", cy: "Welsh", xh: "Xhosa", ji: "Yiddish", zu: "Zulu" }[t] && (this.internal.languageSettings.languageCode = t, !1 === this.internal.languageSettings.isSubscribed && (this.internal.events.subscribe("putCatalog", function () { this.internal.write("/Lang (" + this.internal.languageSettings.languageCode + ")") }), this.internal.languageSettings.isSubscribed = !0)), this }, /** @license * MIT license. * Copyright (c) 2012 Willow Systems Corporation, willow-systems.com * 2014 Diego Casorran, https://github.com/diegocr * * * ==================================================================== */ H = lt.API, W = H.getCharWidthsArray = function (t, e) { var n, r, i, o = (e = e || {}).font || this.internal.getFont(), a = e.fontSize || this.internal.getFontSize(), s = e.charSpace || this.internal.getCharSpace(), l = e.widths ? e.widths : o.metadata.Unicode.widths, h = l.fof ? l.fof : 1, u = e.kerning ? e.kerning : o.metadata.Unicode.kerning, c = u.fof ? u.fof : 1, f = 0, p = l[0] || h, d = []; for (n = 0, r = t.length; n < r; n++)i = t.charCodeAt(n), "function" == typeof o.metadata.widthOfString ? d.push((o.metadata.widthOfGlyph(o.metadata.characterToGlyph(i)) + s * (1e3 / a) || 0) / 1e3) : d.push((l[i] || p) / h + (u[i] && u[i][f] || 0) / c), f = i; return d }, V = H.getArraySum = function (t) { for (var e = t.length, n = 0; e;)n += t[--e]; return n }, G = H.getStringUnitWidth = function (t, e) { var n = (e = e || {}).fontSize || this.internal.getFontSize(), r = e.font || this.internal.getFont(), i = e.charSpace || this.internal.getCharSpace(); return "function" == typeof r.metadata.widthOfString ? r.metadata.widthOfString(t, n, i) / n : V(W.apply(this, arguments)) }, Y = function (t, e, n, r) { for (var i = [], o = 0, a = t.length, s = 0; o !== a && s + e[o] < n;)s += e[o], o++; i.push(t.slice(0, o)); var l = o; for (s = 0; o !== a;)s + e[o] > r && (i.push(t.slice(l, o)), s = 0, l = o), s += e[o], o++; return l !== o && i.push(t.slice(l, o)), i }, J = function (t, e, n) { n || (n = {}); var r, i, o, a, s, l, h = [], u = [h], c = n.textIndent || 0, f = 0, p = 0, d = t.split(" "), g = W.apply(this, [" ", n])[0]; if (l = -1 === n.lineIndent ? d[0].length + 2 : n.lineIndent || 0) { var m = Array(l).join(" "), y = []; d.map(function (t) { 1 < (t = t.split(/\s*\n/)).length ? y = y.concat(t.map(function (t, e) { return (e && t.length ? "\n" : "") + t })) : y.push(t[0]) }), d = y, l = G.apply(this, [m, n]) } for (o = 0, a = d.length; o < a; o++) { var v = 0; if (r = d[o], l && "\n" == r[0] && (r = r.substr(1), v = 1), i = W.apply(this, [r, n]), e < c + f + (p = V(i)) || v) { if (e < p) { for (s = Y.apply(this, [r, i, e - (c + f), e]), h.push(s.shift()), h = [s.pop()]; s.length;)u.push([s.shift()]); p = V(i.slice(r.length - (h[0] ? h[0].length : 0))) } else h = [r]; u.push(h), c = p + l, f = g } else h.push(r), c += f + p, f = g } if (l) var w = function (t, e) { return (e ? m : "") + t.join(" ") }; else w = function (t) { return t.join(" ") }; return u.map(w) }, H.splitTextToSize = function (t, e, n) { var r, i = (n = n || {}).fontSize || this.internal.getFontSize(), o = function (t) { var e = { 0: 1 }, n = {}; if (t.widths && t.kerning) return { widths: t.widths, kerning: t.kerning }; var r = this.internal.getFont(t.fontName, t.fontStyle), i = "Unicode"; return r.metadata[i] ? { widths: r.metadata[i].widths || e, kerning: r.metadata[i].kerning || n } : { font: r.metadata, fontSize: this.internal.getFontSize(), charSpace: this.internal.getCharSpace() } }.call(this, n); r = Array.isArray(t) ? t : t.split(/\r?\n/); var a = 1 * this.internal.scaleFactor * e / i; o.textIndent = n.textIndent ? 1 * n.textIndent * this.internal.scaleFactor / i : 0, o.lineIndent = n.lineIndent; var s, l, h = []; for (s = 0, l = r.length; s < l; s++)h = h.concat(J.apply(this, [r[s], a, o])); return h }, /** @license jsPDF standard_fonts_metrics plugin * Copyright (c) 2012 Willow Systems Corporation, willow-systems.com * MIT license. * * ==================================================================== */ X = lt.API, Z = { codePages: ["WinAnsiEncoding"], WinAnsiEncoding: (K = function (t) { for (var e = "klmnopqrstuvwxyz", n = {}, r = 0; r < e.length; r++)n[e[r]] = "0123456789abcdef"[r]; var i, o, a, s, l, h = {}, u = 1, c = h, f = [], p = "", d = "", g = t.length - 1; for (r = 1; r != g;)l = t[r], r += 1, "'" == l ? o = o ? (s = o.join(""), i) : [] : o ? o.push(l) : "{" == l ? (f.push([c, s]), c = {}, s = i) : "}" == l ? ((a = f.pop())[0][a[1]] = c, s = i, c = a[0]) : "-" == l ? u = -1 : s === i ? n.hasOwnProperty(l) ? (p += n[l], s = parseInt(p, 16) * u, u = 1, p = "") : p += l : n.hasOwnProperty(l) ? (d += n[l], c[s] = parseInt(d, 16) * u, u = 1, s = i, d = "") : d += l; return h })("{19m8n201n9q201o9r201s9l201t9m201u8m201w9n201x9o201y8o202k8q202l8r202m9p202q8p20aw8k203k8t203t8v203u9v2cq8s212m9t15m8w15n9w2dw9s16k8u16l9u17s9z17x8y17y9y}") }, Q = { Unicode: { Courier: Z, "Courier-Bold": Z, "Courier-BoldOblique": Z, "Courier-Oblique": Z, Helvetica: Z, "Helvetica-Bold": Z, "Helvetica-BoldOblique": Z, "Helvetica-Oblique": Z, "Times-Roman": Z, "Times-Bold": Z, "Times-BoldItalic": Z, "Times-Italic": Z } }, $ = { Unicode: { "Courier-Oblique": K("{'widths'{k3w'fof'6o}'kerning'{'fof'-6o}}"), "Times-BoldItalic": K("{'widths'{k3o2q4ycx2r201n3m201o6o201s2l201t2l201u2l201w3m201x3m201y3m2k1t2l2r202m2n2n3m2o3m2p5n202q6o2r1w2s2l2t2l2u3m2v3t2w1t2x2l2y1t2z1w3k3m3l3m3m3m3n3m3o3m3p3m3q3m3r3m3s3m203t2l203u2l3v2l3w3t3x3t3y3t3z3m4k5n4l4m4m4m4n4m4o4s4p4m4q4m4r4s4s4y4t2r4u3m4v4m4w3x4x5t4y4s4z4s5k3x5l4s5m4m5n3r5o3x5p4s5q4m5r5t5s4m5t3x5u3x5v2l5w1w5x2l5y3t5z3m6k2l6l3m6m3m6n2w6o3m6p2w6q2l6r3m6s3r6t1w6u1w6v3m6w1w6x4y6y3r6z3m7k3m7l3m7m2r7n2r7o1w7p3r7q2w7r4m7s3m7t2w7u2r7v2n7w1q7x2n7y3t202l3mcl4mal2ram3man3mao3map3mar3mas2lat4uau1uav3maw3way4uaz2lbk2sbl3t'fof'6obo2lbp3tbq3mbr1tbs2lbu1ybv3mbz3mck4m202k3mcm4mcn4mco4mcp4mcq5ycr4mcs4mct4mcu4mcv4mcw2r2m3rcy2rcz2rdl4sdm4sdn4sdo4sdp4sdq4sds4sdt4sdu4sdv4sdw4sdz3mek3mel3mem3men3meo3mep3meq4ser2wes2wet2weu2wev2wew1wex1wey1wez1wfl3rfm3mfn3mfo3mfp3mfq3mfr3tfs3mft3rfu3rfv3rfw3rfz2w203k6o212m6o2dw2l2cq2l3t3m3u2l17s3x19m3m}'kerning'{cl{4qu5kt5qt5rs17ss5ts}201s{201ss}201t{cks4lscmscnscoscpscls2wu2yu201ts}201x{2wu2yu}2k{201ts}2w{4qx5kx5ou5qx5rs17su5tu}2x{17su5tu5ou}2y{4qx5kx5ou5qx5rs17ss5ts}'fof'-6ofn{17sw5tw5ou5qw5rs}7t{cksclscmscnscoscps4ls}3u{17su5tu5os5qs}3v{17su5tu5os5qs}7p{17su5tu}ck{4qu5kt5qt5rs17ss5ts}4l{4qu5kt5qt5rs17ss5ts}cm{4qu5kt5qt5rs17ss5ts}cn{4qu5kt5qt5rs17ss5ts}co{4qu5kt5qt5rs17ss5ts}cp{4qu5kt5qt5rs17ss5ts}6l{4qu5ou5qw5rt17su5tu}5q{ckuclucmucnucoucpu4lu}5r{ckuclucmucnucoucpu4lu}7q{cksclscmscnscoscps4ls}6p{4qu5ou5qw5rt17sw5tw}ek{4qu5ou5qw5rt17su5tu}el{4qu5ou5qw5rt17su5tu}em{4qu5ou5qw5rt17su5tu}en{4qu5ou5qw5rt17su5tu}eo{4qu5ou5qw5rt17su5tu}ep{4qu5ou5qw5rt17su5tu}es{17ss5ts5qs4qu}et{4qu5ou5qw5rt17sw5tw}eu{4qu5ou5qw5rt17ss5ts}ev{17ss5ts5qs4qu}6z{17sw5tw5ou5qw5rs}fm{17sw5tw5ou5qw5rs}7n{201ts}fo{17sw5tw5ou5qw5rs}fp{17sw5tw5ou5qw5rs}fq{17sw5tw5ou5qw5rs}7r{cksclscmscnscoscps4ls}fs{17sw5tw5ou5qw5rs}ft{17su5tu}fu{17su5tu}fv{17su5tu}fw{17su5tu}fz{cksclscmscnscoscps4ls}}}"), "Helvetica-Bold": K("{'widths'{k3s2q4scx1w201n3r201o6o201s1w201t1w201u1w201w3m201x3m201y3m2k1w2l2l202m2n2n3r2o3r2p5t202q6o2r1s2s2l2t2l2u2r2v3u2w1w2x2l2y1w2z1w3k3r3l3r3m3r3n3r3o3r3p3r3q3r3r3r3s3r203t2l203u2l3v2l3w3u3x3u3y3u3z3x4k6l4l4s4m4s4n4s4o4s4p4m4q3x4r4y4s4s4t1w4u3r4v4s4w3x4x5n4y4s4z4y5k4m5l4y5m4s5n4m5o3x5p4s5q4m5r5y5s4m5t4m5u3x5v2l5w1w5x2l5y3u5z3r6k2l6l3r6m3x6n3r6o3x6p3r6q2l6r3x6s3x6t1w6u1w6v3r6w1w6x5t6y3x6z3x7k3x7l3x7m2r7n3r7o2l7p3x7q3r7r4y7s3r7t3r7u3m7v2r7w1w7x2r7y3u202l3rcl4sal2lam3ran3rao3rap3rar3ras2lat4tau2pav3raw3uay4taz2lbk2sbl3u'fof'6obo2lbp3xbq3rbr1wbs2lbu2obv3rbz3xck4s202k3rcm4scn4sco4scp4scq6ocr4scs4mct4mcu4mcv4mcw1w2m2zcy1wcz1wdl4sdm4ydn4ydo4ydp4ydq4yds4ydt4sdu4sdv4sdw4sdz3xek3rel3rem3ren3reo3rep3req5ter3res3ret3reu3rev3rew1wex1wey1wez1wfl3xfm3xfn3xfo3xfp3xfq3xfr3ufs3xft3xfu3xfv3xfw3xfz3r203k6o212m6o2dw2l2cq2l3t3r3u2l17s4m19m3r}'kerning'{cl{4qs5ku5ot5qs17sv5tv}201t{2ww4wy2yw}201w{2ks}201x{2ww4wy2yw}2k{201ts201xs}2w{7qs4qu5kw5os5qw5rs17su5tu7tsfzs}2x{5ow5qs}2y{7qs4qu5kw5os5qw5rs17su5tu7tsfzs}'fof'-6o7p{17su5tu5ot}ck{4qs5ku5ot5qs17sv5tv}4l{4qs5ku5ot5qs17sv5tv}cm{4qs5ku5ot5qs17sv5tv}cn{4qs5ku5ot5qs17sv5tv}co{4qs5ku5ot5qs17sv5tv}cp{4qs5ku5ot5qs17sv5tv}6l{17st5tt5os}17s{2kwclvcmvcnvcovcpv4lv4wwckv}5o{2kucltcmtcntcotcpt4lt4wtckt}5q{2ksclscmscnscoscps4ls4wvcks}5r{2ks4ws}5t{2kwclvcmvcnvcovcpv4lv4wwckv}eo{17st5tt5os}fu{17su5tu5ot}6p{17ss5ts}ek{17st5tt5os}el{17st5tt5os}em{17st5tt5os}en{17st5tt5os}6o{201ts}ep{17st5tt5os}es{17ss5ts}et{17ss5ts}eu{17ss5ts}ev{17ss5ts}6z{17su5tu5os5qt}fm{17su5tu5os5qt}fn{17su5tu5os5qt}fo{17su5tu5os5qt}fp{17su5tu5os5qt}fq{17su5tu5os5qt}fs{17su5tu5os5qt}ft{17su5tu5ot}7m{5os}fv{17su5tu5ot}fw{17su5tu5ot}}}"), Courier: K("{'widths'{k3w'fof'6o}'kerning'{'fof'-6o}}"), "Courier-BoldOblique": K("{'widths'{k3w'fof'6o}'kerning'{'fof'-6o}}"), "Times-Bold": K("{'widths'{k3q2q5ncx2r201n3m201o6o201s2l201t2l201u2l201w3m201x3m201y3m2k1t2l2l202m2n2n3m2o3m2p6o202q6o2r1w2s2l2t2l2u3m2v3t2w1t2x2l2y1t2z1w3k3m3l3m3m3m3n3m3o3m3p3m3q3m3r3m3s3m203t2l203u2l3v2l3w3t3x3t3y3t3z3m4k5x4l4s4m4m4n4s4o4s4p4m4q3x4r4y4s4y4t2r4u3m4v4y4w4m4x5y4y4s4z4y5k3x5l4y5m4s5n3r5o4m5p4s5q4s5r6o5s4s5t4s5u4m5v2l5w1w5x2l5y3u5z3m6k2l6l3m6m3r6n2w6o3r6p2w6q2l6r3m6s3r6t1w6u2l6v3r6w1w6x5n6y3r6z3m7k3r7l3r7m2w7n2r7o2l7p3r7q3m7r4s7s3m7t3m7u2w7v2r7w1q7x2r7y3o202l3mcl4sal2lam3man3mao3map3mar3mas2lat4uau1yav3maw3tay4uaz2lbk2sbl3t'fof'6obo2lbp3rbr1tbs2lbu2lbv3mbz3mck4s202k3mcm4scn4sco4scp4scq6ocr4scs4mct4mcu4mcv4mcw2r2m3rcy2rcz2rdl4sdm4ydn4ydo4ydp4ydq4yds4ydt4sdu4sdv4sdw4sdz3rek3mel3mem3men3meo3mep3meq4ser2wes2wet2weu2wev2wew1wex1wey1wez1wfl3rfm3mfn3mfo3mfp3mfq3mfr3tfs3mft3rfu3rfv3rfw3rfz3m203k6o212m6o2dw2l2cq2l3t3m3u2l17s4s19m3m}'kerning'{cl{4qt5ks5ot5qy5rw17sv5tv}201t{cks4lscmscnscoscpscls4wv}2k{201ts}2w{4qu5ku7mu5os5qx5ru17su5tu}2x{17su5tu5ou5qs}2y{4qv5kv7mu5ot5qz5ru17su5tu}'fof'-6o7t{cksclscmscnscoscps4ls}3u{17su5tu5os5qu}3v{17su5tu5os5qu}fu{17su5tu5ou5qu}7p{17su5tu5ou5qu}ck{4qt5ks5ot5qy5rw17sv5tv}4l{4qt5ks5ot5qy5rw17sv5tv}cm{4qt5ks5ot5qy5rw17sv5tv}cn{4qt5ks5ot5qy5rw17sv5tv}co{4qt5ks5ot5qy5rw17sv5tv}cp{4qt5ks5ot5qy5rw17sv5tv}6l{17st5tt5ou5qu}17s{ckuclucmucnucoucpu4lu4wu}5o{ckuclucmucnucoucpu4lu4wu}5q{ckzclzcmzcnzcozcpz4lz4wu}5r{ckxclxcmxcnxcoxcpx4lx4wu}5t{ckuclucmucnucoucpu4lu4wu}7q{ckuclucmucnucoucpu4lu}6p{17sw5tw5ou5qu}ek{17st5tt5qu}el{17st5tt5ou5qu}em{17st5tt5qu}en{17st5tt5qu}eo{17st5tt5qu}ep{17st5tt5ou5qu}es{17ss5ts5qu}et{17sw5tw5ou5qu}eu{17sw5tw5ou5qu}ev{17ss5ts5qu}6z{17sw5tw5ou5qu5rs}fm{17sw5tw5ou5qu5rs}fn{17sw5tw5ou5qu5rs}fo{17sw5tw5ou5qu5rs}fp{17sw5tw5ou5qu5rs}fq{17sw5tw5ou5qu5rs}7r{cktcltcmtcntcotcpt4lt5os}fs{17sw5tw5ou5qu5rs}ft{17su5tu5ou5qu}7m{5os}fv{17su5tu5ou5qu}fw{17su5tu5ou5qu}fz{cksclscmscnscoscps4ls}}}"), Symbol: K("{'widths'{k3uaw4r19m3m2k1t2l2l202m2y2n3m2p5n202q6o3k3m2s2l2t2l2v3r2w1t3m3m2y1t2z1wbk2sbl3r'fof'6o3n3m3o3m3p3m3q3m3r3m3s3m3t3m3u1w3v1w3w3r3x3r3y3r3z2wbp3t3l3m5v2l5x2l5z3m2q4yfr3r7v3k7w1o7x3k}'kerning'{'fof'-6o}}"), Helvetica: K("{'widths'{k3p2q4mcx1w201n3r201o6o201s1q201t1q201u1q201w2l201x2l201y2l2k1w2l1w202m2n2n3r2o3r2p5t202q6o2r1n2s2l2t2l2u2r2v3u2w1w2x2l2y1w2z1w3k3r3l3r3m3r3n3r3o3r3p3r3q3r3r3r3s3r203t2l203u2l3v1w3w3u3x3u3y3u3z3r4k6p4l4m4m4m4n4s4o4s4p4m4q3x4r4y4s4s4t1w4u3m4v4m4w3r4x5n4y4s4z4y5k4m5l4y5m4s5n4m5o3x5p4s5q4m5r5y5s4m5t4m5u3x5v1w5w1w5x1w5y2z5z3r6k2l6l3r6m3r6n3m6o3r6p3r6q1w6r3r6s3r6t1q6u1q6v3m6w1q6x5n6y3r6z3r7k3r7l3r7m2l7n3m7o1w7p3r7q3m7r4s7s3m7t3m7u3m7v2l7w1u7x2l7y3u202l3rcl4mal2lam3ran3rao3rap3rar3ras2lat4tau2pav3raw3uay4taz2lbk2sbl3u'fof'6obo2lbp3rbr1wbs2lbu2obv3rbz3xck4m202k3rcm4mcn4mco4mcp4mcq6ocr4scs4mct4mcu4mcv4mcw1w2m2ncy1wcz1wdl4sdm4ydn4ydo4ydp4ydq4yds4ydt4sdu4sdv4sdw4sdz3xek3rel3rem3ren3reo3rep3req5ter3mes3ret3reu3rev3rew1wex1wey1wez1wfl3rfm3rfn3rfo3rfp3rfq3rfr3ufs3xft3rfu3rfv3rfw3rfz3m203k6o212m6o2dw2l2cq2l3t3r3u1w17s4m19m3r}'kerning'{5q{4wv}cl{4qs5kw5ow5qs17sv5tv}201t{2wu4w1k2yu}201x{2wu4wy2yu}17s{2ktclucmucnu4otcpu4lu4wycoucku}2w{7qs4qz5k1m17sy5ow5qx5rsfsu5ty7tufzu}2x{17sy5ty5oy5qs}2y{7qs4qz5k1m17sy5ow5qx5rsfsu5ty7tufzu}'fof'-6o7p{17sv5tv5ow}ck{4qs5kw5ow5qs17sv5tv}4l{4qs5kw5ow5qs17sv5tv}cm{4qs5kw5ow5qs17sv5tv}cn{4qs5kw5ow5qs17sv5tv}co{4qs5kw5ow5qs17sv5tv}cp{4qs5kw5ow5qs17sv5tv}6l{17sy5ty5ow}do{17st5tt}4z{17st5tt}7s{fst}dm{17st5tt}dn{17st5tt}5o{ckwclwcmwcnwcowcpw4lw4wv}dp{17st5tt}dq{17st5tt}7t{5ow}ds{17st5tt}5t{2ktclucmucnu4otcpu4lu4wycoucku}fu{17sv5tv5ow}6p{17sy5ty5ow5qs}ek{17sy5ty5ow}el{17sy5ty5ow}em{17sy5ty5ow}en{5ty}eo{17sy5ty5ow}ep{17sy5ty5ow}es{17sy5ty5qs}et{17sy5ty5ow5qs}eu{17sy5ty5ow5qs}ev{17sy5ty5ow5qs}6z{17sy5ty5ow5qs}fm{17sy5ty5ow5qs}fn{17sy5ty5ow5qs}fo{17sy5ty5ow5qs}fp{17sy5ty5qs}fq{17sy5ty5ow5qs}7r{5ow}fs{17sy5ty5ow5qs}ft{17sv5tv5ow}7m{5ow}fv{17sv5tv5ow}fw{17sv5tv5ow}}}"), "Helvetica-BoldOblique": K("{'widths'{k3s2q4scx1w201n3r201o6o201s1w201t1w201u1w201w3m201x3m201y3m2k1w2l2l202m2n2n3r2o3r2p5t202q6o2r1s2s2l2t2l2u2r2v3u2w1w2x2l2y1w2z1w3k3r3l3r3m3r3n3r3o3r3p3r3q3r3r3r3s3r203t2l203u2l3v2l3w3u3x3u3y3u3z3x4k6l4l4s4m4s4n4s4o4s4p4m4q3x4r4y4s4s4t1w4u3r4v4s4w3x4x5n4y4s4z4y5k4m5l4y5m4s5n4m5o3x5p4s5q4m5r5y5s4m5t4m5u3x5v2l5w1w5x2l5y3u5z3r6k2l6l3r6m3x6n3r6o3x6p3r6q2l6r3x6s3x6t1w6u1w6v3r6w1w6x5t6y3x6z3x7k3x7l3x7m2r7n3r7o2l7p3x7q3r7r4y7s3r7t3r7u3m7v2r7w1w7x2r7y3u202l3rcl4sal2lam3ran3rao3rap3rar3ras2lat4tau2pav3raw3uay4taz2lbk2sbl3u'fof'6obo2lbp3xbq3rbr1wbs2lbu2obv3rbz3xck4s202k3rcm4scn4sco4scp4scq6ocr4scs4mct4mcu4mcv4mcw1w2m2zcy1wcz1wdl4sdm4ydn4ydo4ydp4ydq4yds4ydt4sdu4sdv4sdw4sdz3xek3rel3rem3ren3reo3rep3req5ter3res3ret3reu3rev3rew1wex1wey1wez1wfl3xfm3xfn3xfo3xfp3xfq3xfr3ufs3xft3xfu3xfv3xfw3xfz3r203k6o212m6o2dw2l2cq2l3t3r3u2l17s4m19m3r}'kerning'{cl{4qs5ku5ot5qs17sv5tv}201t{2ww4wy2yw}201w{2ks}201x{2ww4wy2yw}2k{201ts201xs}2w{7qs4qu5kw5os5qw5rs17su5tu7tsfzs}2x{5ow5qs}2y{7qs4qu5kw5os5qw5rs17su5tu7tsfzs}'fof'-6o7p{17su5tu5ot}ck{4qs5ku5ot5qs17sv5tv}4l{4qs5ku5ot5qs17sv5tv}cm{4qs5ku5ot5qs17sv5tv}cn{4qs5ku5ot5qs17sv5tv}co{4qs5ku5ot5qs17sv5tv}cp{4qs5ku5ot5qs17sv5tv}6l{17st5tt5os}17s{2kwclvcmvcnvcovcpv4lv4wwckv}5o{2kucltcmtcntcotcpt4lt4wtckt}5q{2ksclscmscnscoscps4ls4wvcks}5r{2ks4ws}5t{2kwclvcmvcnvcovcpv4lv4wwckv}eo{17st5tt5os}fu{17su5tu5ot}6p{17ss5ts}ek{17st5tt5os}el{17st5tt5os}em{17st5tt5os}en{17st5tt5os}6o{201ts}ep{17st5tt5os}es{17ss5ts}et{17ss5ts}eu{17ss5ts}ev{17ss5ts}6z{17su5tu5os5qt}fm{17su5tu5os5qt}fn{17su5tu5os5qt}fo{17su5tu5os5qt}fp{17su5tu5os5qt}fq{17su5tu5os5qt}fs{17su5tu5os5qt}ft{17su5tu5ot}7m{5os}fv{17su5tu5ot}fw{17su5tu5ot}}}"), ZapfDingbats: K("{'widths'{k4u2k1w'fof'6o}'kerning'{'fof'-6o}}"), "Courier-Bold": K("{'widths'{k3w'fof'6o}'kerning'{'fof'-6o}}"), "Times-Italic": K("{'widths'{k3n2q4ycx2l201n3m201o5t201s2l201t2l201u2l201w3r201x3r201y3r2k1t2l2l202m2n2n3m2o3m2p5n202q5t2r1p2s2l2t2l2u3m2v4n2w1t2x2l2y1t2z1w3k3m3l3m3m3m3n3m3o3m3p3m3q3m3r3m3s3m203t2l203u2l3v2l3w4n3x4n3y4n3z3m4k5w4l3x4m3x4n4m4o4s4p3x4q3x4r4s4s4s4t2l4u2w4v4m4w3r4x5n4y4m4z4s5k3x5l4s5m3x5n3m5o3r5p4s5q3x5r5n5s3x5t3r5u3r5v2r5w1w5x2r5y2u5z3m6k2l6l3m6m3m6n2w6o3m6p2w6q1w6r3m6s3m6t1w6u1w6v2w6w1w6x4s6y3m6z3m7k3m7l3m7m2r7n2r7o1w7p3m7q2w7r4m7s2w7t2w7u2r7v2s7w1v7x2s7y3q202l3mcl3xal2ram3man3mao3map3mar3mas2lat4wau1vav3maw4nay4waz2lbk2sbl4n'fof'6obo2lbp3mbq3obr1tbs2lbu1zbv3mbz3mck3x202k3mcm3xcn3xco3xcp3xcq5tcr4mcs3xct3xcu3xcv3xcw2l2m2ucy2lcz2ldl4mdm4sdn4sdo4sdp4sdq4sds4sdt4sdu4sdv4sdw4sdz3mek3mel3mem3men3meo3mep3meq4mer2wes2wet2weu2wev2wew1wex1wey1wez1wfl3mfm3mfn3mfo3mfp3mfq3mfr4nfs3mft3mfu3mfv3mfw3mfz2w203k6o212m6m2dw2l2cq2l3t3m3u2l17s3r19m3m}'kerning'{cl{5kt4qw}201s{201sw}201t{201tw2wy2yy6q-t}201x{2wy2yy}2k{201tw}2w{7qs4qy7rs5ky7mw5os5qx5ru17su5tu}2x{17ss5ts5os}2y{7qs4qy7rs5ky7mw5os5qx5ru17su5tu}'fof'-6o6t{17ss5ts5qs}7t{5os}3v{5qs}7p{17su5tu5qs}ck{5kt4qw}4l{5kt4qw}cm{5kt4qw}cn{5kt4qw}co{5kt4qw}cp{5kt4qw}6l{4qs5ks5ou5qw5ru17su5tu}17s{2ks}5q{ckvclvcmvcnvcovcpv4lv}5r{ckuclucmucnucoucpu4lu}5t{2ks}6p{4qs5ks5ou5qw5ru17su5tu}ek{4qs5ks5ou5qw5ru17su5tu}el{4qs5ks5ou5qw5ru17su5tu}em{4qs5ks5ou5qw5ru17su5tu}en{4qs5ks5ou5qw5ru17su5tu}eo{4qs5ks5ou5qw5ru17su5tu}ep{4qs5ks5ou5qw5ru17su5tu}es{5ks5qs4qs}et{4qs5ks5ou5qw5ru17su5tu}eu{4qs5ks5qw5ru17su5tu}ev{5ks5qs4qs}ex{17ss5ts5qs}6z{4qv5ks5ou5qw5ru17su5tu}fm{4qv5ks5ou5qw5ru17su5tu}fn{4qv5ks5ou5qw5ru17su5tu}fo{4qv5ks5ou5qw5ru17su5tu}fp{4qv5ks5ou5qw5ru17su5tu}fq{4qv5ks5ou5qw5ru17su5tu}7r{5os}fs{4qv5ks5ou5qw5ru17su5tu}ft{17su5tu5qs}fu{17su5tu5qs}fv{17su5tu5qs}fw{17su5tu5qs}}}"), "Times-Roman": K("{'widths'{k3n2q4ycx2l201n3m201o6o201s2l201t2l201u2l201w2w201x2w201y2w2k1t2l2l202m2n2n3m2o3m2p5n202q6o2r1m2s2l2t2l2u3m2v3s2w1t2x2l2y1t2z1w3k3m3l3m3m3m3n3m3o3m3p3m3q3m3r3m3s3m203t2l203u2l3v1w3w3s3x3s3y3s3z2w4k5w4l4s4m4m4n4m4o4s4p3x4q3r4r4s4s4s4t2l4u2r4v4s4w3x4x5t4y4s4z4s5k3r5l4s5m4m5n3r5o3x5p4s5q4s5r5y5s4s5t4s5u3x5v2l5w1w5x2l5y2z5z3m6k2l6l2w6m3m6n2w6o3m6p2w6q2l6r3m6s3m6t1w6u1w6v3m6w1w6x4y6y3m6z3m7k3m7l3m7m2l7n2r7o1w7p3m7q3m7r4s7s3m7t3m7u2w7v3k7w1o7x3k7y3q202l3mcl4sal2lam3man3mao3map3mar3mas2lat4wau1vav3maw3say4waz2lbk2sbl3s'fof'6obo2lbp3mbq2xbr1tbs2lbu1zbv3mbz2wck4s202k3mcm4scn4sco4scp4scq5tcr4mcs3xct3xcu3xcv3xcw2l2m2tcy2lcz2ldl4sdm4sdn4sdo4sdp4sdq4sds4sdt4sdu4sdv4sdw4sdz3mek2wel2wem2wen2weo2wep2weq4mer2wes2wet2weu2wev2wew1wex1wey1wez1wfl3mfm3mfn3mfo3mfp3mfq3mfr3sfs3mft3mfu3mfv3mfw3mfz3m203k6o212m6m2dw2l2cq2l3t3m3u1w17s4s19m3m}'kerning'{cl{4qs5ku17sw5ou5qy5rw201ss5tw201ws}201s{201ss}201t{ckw4lwcmwcnwcowcpwclw4wu201ts}2k{201ts}2w{4qs5kw5os5qx5ru17sx5tx}2x{17sw5tw5ou5qu}2y{4qs5kw5os5qx5ru17sx5tx}'fof'-6o7t{ckuclucmucnucoucpu4lu5os5rs}3u{17su5tu5qs}3v{17su5tu5qs}7p{17sw5tw5qs}ck{4qs5ku17sw5ou5qy5rw201ss5tw201ws}4l{4qs5ku17sw5ou5qy5rw201ss5tw201ws}cm{4qs5ku17sw5ou5qy5rw201ss5tw201ws}cn{4qs5ku17sw5ou5qy5rw201ss5tw201ws}co{4qs5ku17sw5ou5qy5rw201ss5tw201ws}cp{4qs5ku17sw5ou5qy5rw201ss5tw201ws}6l{17su5tu5os5qw5rs}17s{2ktclvcmvcnvcovcpv4lv4wuckv}5o{ckwclwcmwcnwcowcpw4lw4wu}5q{ckyclycmycnycoycpy4ly4wu5ms}5r{cktcltcmtcntcotcpt4lt4ws}5t{2ktclvcmvcnvcovcpv4lv4wuckv}7q{cksclscmscnscoscps4ls}6p{17su5tu5qw5rs}ek{5qs5rs}el{17su5tu5os5qw5rs}em{17su5tu5os5qs5rs}en{17su5qs5rs}eo{5qs5rs}ep{17su5tu5os5qw5rs}es{5qs}et{17su5tu5qw5rs}eu{17su5tu5qs5rs}ev{5qs}6z{17sv5tv5os5qx5rs}fm{5os5qt5rs}fn{17sv5tv5os5qx5rs}fo{17sv5tv5os5qx5rs}fp{5os5qt5rs}fq{5os5qt5rs}7r{ckuclucmucnucoucpu4lu5os}fs{17sv5tv5os5qx5rs}ft{17ss5ts5qs}fu{17sw5tw5qs}fv{17sw5tw5qs}fw{17ss5ts5qs}fz{ckuclucmucnucoucpu4lu5os5rs}}}"), "Helvetica-Oblique": K("{'widths'{k3p2q4mcx1w201n3r201o6o201s1q201t1q201u1q201w2l201x2l201y2l2k1w2l1w202m2n2n3r2o3r2p5t202q6o2r1n2s2l2t2l2u2r2v3u2w1w2x2l2y1w2z1w3k3r3l3r3m3r3n3r3o3r3p3r3q3r3r3r3s3r203t2l203u2l3v1w3w3u3x3u3y3u3z3r4k6p4l4m4m4m4n4s4o4s4p4m4q3x4r4y4s4s4t1w4u3m4v4m4w3r4x5n4y4s4z4y5k4m5l4y5m4s5n4m5o3x5p4s5q4m5r5y5s4m5t4m5u3x5v1w5w1w5x1w5y2z5z3r6k2l6l3r6m3r6n3m6o3r6p3r6q1w6r3r6s3r6t1q6u1q6v3m6w1q6x5n6y3r6z3r7k3r7l3r7m2l7n3m7o1w7p3r7q3m7r4s7s3m7t3m7u3m7v2l7w1u7x2l7y3u202l3rcl4mal2lam3ran3rao3rap3rar3ras2lat4tau2pav3raw3uay4taz2lbk2sbl3u'fof'6obo2lbp3rbr1wbs2lbu2obv3rbz3xck4m202k3rcm4mcn4mco4mcp4mcq6ocr4scs4mct4mcu4mcv4mcw1w2m2ncy1wcz1wdl4sdm4ydn4ydo4ydp4ydq4yds4ydt4sdu4sdv4sdw4sdz3xek3rel3rem3ren3reo3rep3req5ter3mes3ret3reu3rev3rew1wex1wey1wez1wfl3rfm3rfn3rfo3rfp3rfq3rfr3ufs3xft3rfu3rfv3rfw3rfz3m203k6o212m6o2dw2l2cq2l3t3r3u1w17s4m19m3r}'kerning'{5q{4wv}cl{4qs5kw5ow5qs17sv5tv}201t{2wu4w1k2yu}201x{2wu4wy2yu}17s{2ktclucmucnu4otcpu4lu4wycoucku}2w{7qs4qz5k1m17sy5ow5qx5rsfsu5ty7tufzu}2x{17sy5ty5oy5qs}2y{7qs4qz5k1m17sy5ow5qx5rsfsu5ty7tufzu}'fof'-6o7p{17sv5tv5ow}ck{4qs5kw5ow5qs17sv5tv}4l{4qs5kw5ow5qs17sv5tv}cm{4qs5kw5ow5qs17sv5tv}cn{4qs5kw5ow5qs17sv5tv}co{4qs5kw5ow5qs17sv5tv}cp{4qs5kw5ow5qs17sv5tv}6l{17sy5ty5ow}do{17st5tt}4z{17st5tt}7s{fst}dm{17st5tt}dn{17st5tt}5o{ckwclwcmwcnwcowcpw4lw4wv}dp{17st5tt}dq{17st5tt}7t{5ow}ds{17st5tt}5t{2ktclucmucnu4otcpu4lu4wycoucku}fu{17sv5tv5ow}6p{17sy5ty5ow5qs}ek{17sy5ty5ow}el{17sy5ty5ow}em{17sy5ty5ow}en{5ty}eo{17sy5ty5ow}ep{17sy5ty5ow}es{17sy5ty5qs}et{17sy5ty5ow5qs}eu{17sy5ty5ow5qs}ev{17sy5ty5ow5qs}6z{17sy5ty5ow5qs}fm{17sy5ty5ow5qs}fn{17sy5ty5ow5qs}fo{17sy5ty5ow5qs}fp{17sy5ty5qs}fq{17sy5ty5ow5qs}7r{5ow}fs{17sy5ty5ow5qs}ft{17sv5tv5ow}7m{5ow}fv{17sv5tv5ow}fw{17sv5tv5ow}}}") } }, X.events.push(["addFont", function (t) { var e, n, r, i = t.font, o = "Unicode"; (e = $[o][i.postScriptName]) && ((n = i.metadata[o] ? i.metadata[o] : i.metadata[o] = {}).widths = e.widths, n.kerning = e.kerning), (r = Q[o][i.postScriptName]) && ((n = i.metadata[o] ? i.metadata[o] : i.metadata[o] = {}).encoding = r).codePages && r.codePages.length && (i.encoding = r.codePages[0]) }]), /** * @license * Licensed under the MIT License. * http://opensource.org/licenses/mit-license */ tt = lt, "undefined" != typeof self && self || "undefined" != typeof global && global || "undefined" != typeof window && window || Function("return this")(), tt.API.events.push(["addFont", function (t) { var e = t.font, n = t.instance; if (void 0 !== n && n.existsFileInVFS(e.postScriptName)) { var r = n.getFileFromVFS(e.postScriptName); if ("string" != typeof r) throw new Error("Font is not stored as string-data in vFS, import fonts or remove declaration doc.addFont('" + e.postScriptName + "')."); e.metadata = tt.API.TTFFont.open(e.postScriptName, e.fontName, r, e.encoding), e.metadata.Unicode = e.metadata.Unicode || { encoding: {}, kerning: {}, widths: [] }, e.metadata.glyIdsUsed = [0] } else if (!1 === e.isStandardFont) throw new Error("Font does not exist in vFS, import fonts or remove declaration doc.addFont('" + e.postScriptName + "').") }]), ( /** @license * Copyright (c) 2012 Willow Systems Corporation, willow-systems.com * * * ==================================================================== */ et = lt.API).addSvg = function (t, e, n, r, i) { if (void 0 === e || void 0 === n) throw new Error("addSVG needs values for 'x' and 'y'"); function o(t) { for (var e = parseFloat(t[1]), n = parseFloat(t[2]), r = [], i = 3, o = t.length; i < o;)"c" === t[i] ? (r.push([parseFloat(t[i + 1]), parseFloat(t[i + 2]), parseFloat(t[i + 3]), parseFloat(t[i + 4]), parseFloat(t[i + 5]), parseFloat(t[i + 6])]), i += 7) : "l" === t[i] ? (r.push([parseFloat(t[i + 1]), parseFloat(t[i + 2])]), i += 3) : i += 1; return [e, n, r] } var a, s, l, h, u, c, f, p, d = (h = document, p = h.createElement("iframe"), u = ".jsPDF_sillysvg_iframe {display:none;position:absolute;}", (f = (c = h).createElement("style")).type = "text/css", f.styleSheet ? f.styleSheet.cssText = u : f.appendChild(c.createTextNode(u)), c.getElementsByTagName("head")[0].appendChild(f), p.name = "childframe", p.setAttribute("width", 0), p.setAttribute("height", 0), p.setAttribute("frameborder", "0"), p.setAttribute("scrolling", "no"), p.setAttribute("seamless", "seamless"), p.setAttribute("class", "jsPDF_sillysvg_iframe"), h.body.appendChild(p), p), g = (a = t, (l = ((s = d).contentWindow || s.contentDocument).document).write(a), l.close(), l.getElementsByTagName("svg")[0]), m = [1, 1], y = parseFloat(g.getAttribute("width")), v = parseFloat(g.getAttribute("height")); y && v && (r && i ? m = [r / y, i / v] : r ? m = [r / y, r / y] : i && (m = [i / v, i / v])); var w, b, x, N, L = g.childNodes; for (w = 0, b = L.length; w < b; w++)(x = L[w]).tagName && "PATH" === x.tagName.toUpperCase() && ((N = o(x.getAttribute("d").split(" ")))[0] = N[0] * m[0] + e, N[1] = N[1] * m[1] + n, this.lines.call(this, N[2], N[0], N[1], m)); return this }, et.addSVG = et.addSvg, et.addSvgAsImage = function (t, e, n, r, i, o, a, s) { if (isNaN(e) || isNaN(n)) throw console.error("jsPDF.addSvgAsImage: Invalid coordinates", arguments), new Error("Invalid coordinates passed to jsPDF.addSvgAsImage"); if (isNaN(r) || isNaN(i)) throw console.error("jsPDF.addSvgAsImage: Invalid measurements", arguments), new Error("Invalid measurements (width and/or height) passed to jsPDF.addSvgAsImage"); var l = document.createElement("canvas"); l.width = r, l.height = i; var h = l.getContext("2d"); return h.fillStyle = "#fff", h.fillRect(0, 0, l.width, l.height), canvg(l, t, { ignoreMouse: !0, ignoreAnimation: !0, ignoreDimensions: !0, ignoreClear: !0 }), this.addImage(l.toDataURL("image/jpeg", 1), e, n, r, i, a, s), this }, lt.API.putTotalPages = function (t) { var e, n = 0; n = parseInt(this.internal.getFont().id.substr(1), 10) < 15 ? (e = new RegExp(t, "g"), this.internal.getNumberOfPages()) : (e = new RegExp(this.pdfEscape16(t, this.internal.getFont()), "g"), this.pdfEscape16(this.internal.getNumberOfPages() + "", this.internal.getFont())); for (var r = 1; r <= this.internal.getNumberOfPages(); r++)for (var i = 0; i < this.internal.pages[r].length; i++)this.internal.pages[r][i] = this.internal.pages[r][i].replace(e, n); return this }, lt.API.viewerPreferences = function (t, e) { var n; t = t || {}, e = e || !1; var r, i, o = { HideToolbar: { defaultValue: !1, value: !1, type: "boolean", explicitSet: !1, valueSet: [!0, !1], pdfVersion: 1.3 }, HideMenubar: { defaultValue: !1, value: !1, type: "boolean", explicitSet: !1, valueSet: [!0, !1], pdfVersion: 1.3 }, HideWindowUI: { defaultValue: !1, value: !1, type: "boolean", explicitSet: !1, valueSet: [!0, !1], pdfVersion: 1.3 }, FitWindow: { defaultValue: !1, value: !1, type: "boolean", explicitSet: !1, valueSet: [!0, !1], pdfVersion: 1.3 }, CenterWindow: { defaultValue: !1, value: !1, type: "boolean", explicitSet: !1, valueSet: [!0, !1], pdfVersion: 1.3 }, DisplayDocTitle: { defaultValue: !1, value: !1, type: "boolean", explicitSet: !1, valueSet: [!0, !1], pdfVersion: 1.4 }, NonFullScreenPageMode: { defaultValue: "UseNone", value: "UseNone", type: "name", explicitSet: !1, valueSet: ["UseNone", "UseOutlines", "UseThumbs", "UseOC"], pdfVersion: 1.3 }, Direction: { defaultValue: "L2R", value: "L2R", type: "name", explicitSet: !1, valueSet: ["L2R", "R2L"], pdfVersion: 1.3 }, ViewArea: { defaultValue: "CropBox", value: "CropBox", type: "name", explicitSet: !1, valueSet: ["MediaBox", "CropBox", "TrimBox", "BleedBox", "ArtBox"], pdfVersion: 1.4 }, ViewClip: { defaultValue: "CropBox", value: "CropBox", type: "name", explicitSet: !1, valueSet: ["MediaBox", "CropBox", "TrimBox", "BleedBox", "ArtBox"], pdfVersion: 1.4 }, PrintArea: { defaultValue: "CropBox", value: "CropBox", type: "name", explicitSet: !1, valueSet: ["MediaBox", "CropBox", "TrimBox", "BleedBox", "ArtBox"], pdfVersion: 1.4 }, PrintClip: { defaultValue: "CropBox", value: "CropBox", type: "name", explicitSet: !1, valueSet: ["MediaBox", "CropBox", "TrimBox", "BleedBox", "ArtBox"], pdfVersion: 1.4 }, PrintScaling: { defaultValue: "AppDefault", value: "AppDefault", type: "name", explicitSet: !1, valueSet: ["AppDefault", "None"], pdfVersion: 1.6 }, Duplex: { defaultValue: "", value: "none", type: "name", explicitSet: !1, valueSet: ["Simplex", "DuplexFlipShortEdge", "DuplexFlipLongEdge", "none"], pdfVersion: 1.7 }, PickTrayByPDFSize: { defaultValue: !1, value: !1, type: "boolean", explicitSet: !1, valueSet: [!0, !1], pdfVersion: 1.7 }, PrintPageRange: { defaultValue: "", value: "", type: "array", explicitSet: !1, valueSet: null, pdfVersion: 1.7 }, NumCopies: { defaultValue: 1, value: 1, type: "integer", explicitSet: !1, valueSet: null, pdfVersion: 1.7 } }, a = Object.keys(o), s = [], l = 0, h = 0, u = 0, c = !0; function f(t, e) { var n, r = !1; for (n = 0; n < t.length; n += 1)t[n] === e && (r = !0); return r } if (void 0 === this.internal.viewerpreferences && (this.internal.viewerpreferences = {}, this.internal.viewerpreferences.configuration = JSON.parse(JSON.stringify(o)), this.internal.viewerpreferences.isSubscribed = !1), n = this.internal.viewerpreferences.configuration, "reset" === t || !0 === e) { var p = a.length; for (u = 0; u < p; u += 1)n[a[u]].value = n[a[u]].defaultValue, n[a[u]].explicitSet = !1 } if ("object" === se(t)) for (r in t) if (i = t[r], f(a, r) && void 0 !== i) { if ("boolean" === n[r].type && "boolean" == typeof i) n[r].value = i; else if ("name" === n[r].type && f(n[r].valueSet, i)) n[r].value = i; else if ("integer" === n[r].type && Number.isInteger(i)) n[r].value = i; else if ("array" === n[r].type) { for (l = 0; l < i.length; l += 1)if (c = !0, 1 === i[l].length && "number" == typeof i[l][0]) s.push(String(i[l] - 1)); else if (1 < i[l].length) { for (h = 0; h < i[l].length; h += 1)"number" != typeof i[l][h] && (c = !1); !0 === c && s.push([i[l][0] - 1, i[l][1] - 1].join(" ")) } n[r].value = "[" + s.join(" ") + "]" } else n[r].value = n[r].defaultValue; n[r].explicitSet = !0 } return !1 === this.internal.viewerpreferences.isSubscribed && (this.internal.events.subscribe("putCatalog", function () { var t, e = []; for (t in n) !0 === n[t].explicitSet && ("name" === n[t].type ? e.push("/" + t + " /" + n[t].value) : e.push("/" + t + " " + n[t].value)); 0 !== e.length && this.internal.write("/ViewerPreferences\n<<\n" + e.join("\n") + "\n>>") }), this.internal.viewerpreferences.isSubscribed = !0), this.internal.viewerpreferences.configuration = n, this }, /** ==================================================================== * jsPDF XMP metadata plugin * Copyright (c) 2016 Jussi Utunen, u-jussi@suomi24.fi * * * ==================================================================== */ nt = lt.API, ot = it = rt = "", nt.addMetadata = function (t, e) { return it = e || "http://jspdf.default.namespaceuri/", rt = t, this.internal.events.subscribe("postPutResources", function () { if (rt) { var t = '', e = unescape(encodeURIComponent('')), n = unescape(encodeURIComponent(t)), r = unescape(encodeURIComponent(rt)), i = unescape(encodeURIComponent("")), o = unescape(encodeURIComponent("")), a = n.length + r.length + i.length + e.length + o.length; ot = this.internal.newObject(), this.internal.write("<< /Type /Metadata /Subtype /XML /Length " + a + " >>"), this.internal.write("stream"), this.internal.write(e + n + r + i + o), this.internal.write("endstream"), this.internal.write("endobj") } else ot = "" }), this.internal.events.subscribe("putCatalog", function () { ot && this.internal.write("/Metadata " + ot + " 0 R") }), this }, function (f, t) { var e = f.API; var m = e.pdfEscape16 = function (t, e) { for (var n, r = e.metadata.Unicode.widths, i = ["", "0", "00", "000", "0000"], o = [""], a = 0, s = t.length; a < s; ++a) { if (n = e.metadata.characterToGlyph(t.charCodeAt(a)), e.metadata.glyIdsUsed.push(n), e.metadata.toUnicode[n] = t.charCodeAt(a), -1 == r.indexOf(n) && (r.push(n), r.push([parseInt(e.metadata.widthOfGlyph(n), 10)])), "0" == n) return o.join(""); n = n.toString(16), o.push(i[4 - n.length], n) } return o.join("") }, p = function (t) { var e, n, r, i, o, a, s; for (o = "/CIDInit /ProcSet findresource begin\n12 dict begin\nbegincmap\n/CIDSystemInfo <<\n /Registry (Adobe)\n /Ordering (UCS)\n /Supplement 0\n>> def\n/CMapName /Adobe-Identity-UCS def\n/CMapType 2 def\n1 begincodespacerange\n<0000>\nendcodespacerange", r = [], a = 0, s = (n = Object.keys(t).sort(function (t, e) { return t - e })).length; a < s; a++)e = n[a], 100 <= r.length && (o += "\n" + r.length + " beginbfchar\n" + r.join("\n") + "\nendbfchar", r = []), i = ("0000" + t[e].toString(16)).slice(-4), e = ("0000" + (+e).toString(16)).slice(-4), r.push("<" + e + "><" + i + ">"); return r.length && (o += "\n" + r.length + " beginbfchar\n" + r.join("\n") + "\nendbfchar\n"), o += "endcmap\nCMapName currentdict /CMap defineresource pop\nend\nend" }; e.events.push(["putFont", function (t) { !function (t, e, n, r) { if (t.metadata instanceof f.API.TTFFont && "Identity-H" === t.encoding) { for (var i = t.metadata.Unicode.widths, o = t.metadata.subset.encode(t.metadata.glyIdsUsed, 1), a = "", s = 0; s < o.length; s++)a += String.fromCharCode(o[s]); var l = n(); r({ data: a, addLength1: !0 }), e("endobj"); var h = n(); r({ data: p(t.metadata.toUnicode), addLength1: !0 }), e("endobj"); var u = n(); e("<<"), e("/Type /FontDescriptor"), e("/FontName /" + t.fontName), e("/FontFile2 " + l + " 0 R"), e("/FontBBox " + f.API.PDFObject.convert(t.metadata.bbox)), e("/Flags " + t.metadata.flags), e("/StemV " + t.metadata.stemV), e("/ItalicAngle " + t.metadata.italicAngle), e("/Ascent " + t.metadata.ascender), e("/Descent " + t.metadata.decender), e("/CapHeight " + t.metadata.capHeight), e(">>"), e("endobj"); var c = n(); e("<<"), e("/Type /Font"), e("/BaseFont /" + t.fontName), e("/FontDescriptor " + u + " 0 R"), e("/W " + f.API.PDFObject.convert(i)), e("/CIDToGIDMap /Identity"), e("/DW 1000"), e("/Subtype /CIDFontType2"), e("/CIDSystemInfo"), e("<<"), e("/Supplement 0"), e("/Registry (Adobe)"), e("/Ordering (" + t.encoding + ")"), e(">>"), e(">>"), e("endobj"), t.objectNumber = n(), e("<<"), e("/Type /Font"), e("/Subtype /Type0"), e("/ToUnicode " + h + " 0 R"), e("/BaseFont /" + t.fontName), e("/Encoding /" + t.encoding), e("/DescendantFonts [" + c + " 0 R]"), e(">>"), e("endobj"), t.isAlreadyPutted = !0 } }(t.font, t.out, t.newObject, t.putStream) }]); e.events.push(["putFont", function (t) { !function (t, e, n, r) { if (t.metadata instanceof f.API.TTFFont && "WinAnsiEncoding" === t.encoding) { t.metadata.Unicode.widths; for (var i = t.metadata.rawData, o = "", a = 0; a < i.length; a++)o += String.fromCharCode(i[a]); var s = n(); r({ data: o, addLength1: !0 }), e("endobj"); var l = n(); r({ data: p(t.metadata.toUnicode), addLength1: !0 }), e("endobj"); var h = n(); for (e("<<"), e("/Descent " + t.metadata.decender), e("/CapHeight " + t.metadata.capHeight), e("/StemV " + t.metadata.stemV), e("/Type /FontDescriptor"), e("/FontFile2 " + s + " 0 R"), e("/Flags 96"), e("/FontBBox " + f.API.PDFObject.convert(t.metadata.bbox)), e("/FontName /" + t.fontName), e("/ItalicAngle " + t.metadata.italicAngle), e("/Ascent " + t.metadata.ascender), e(">>"), e("endobj"), t.objectNumber = n(), a = 0; a < t.metadata.hmtx.widths.length; a++)t.metadata.hmtx.widths[a] = parseInt(t.metadata.hmtx.widths[a] * (1e3 / t.metadata.head.unitsPerEm)); e("<>"), e("endobj"), t.isAlreadyPutted = !0 } }(t.font, t.out, t.newObject, t.putStream) }]); var h = function (t) { var e, n, r = t.text || "", i = t.x, o = t.y, a = t.options || {}, s = t.mutex || {}, l = s.pdfEscape, h = s.activeFontKey, u = s.fonts, c = (s.activeFontSize, ""), f = 0, p = "", d = u[n = h].encoding; if ("Identity-H" !== u[n].encoding) return { text: r, x: i, y: o, options: a, mutex: s }; for (p = r, n = h, "[object Array]" === Object.prototype.toString.call(r) && (p = r[0]), f = 0; f < p.length; f += 1)u[n].metadata.hasOwnProperty("cmap") && (e = u[n].metadata.cmap.unicode.codeMap[p[f].charCodeAt(0)]), e ? c += p[f] : p[f].charCodeAt(0) < 256 && u[n].metadata.hasOwnProperty("Unicode") ? c += p[f] : c += ""; var g = ""; return parseInt(n.slice(1)) < 14 || "WinAnsiEncoding" === d ? g = function (t) { for (var e = "", n = 0; n < t.length; n++)e += "" + t.charCodeAt(n).toString(16); return e }(l(c, n)) : "Identity-H" === d && (g = m(c, u[n])), s.isHex = !0, { text: g, x: i, y: o, options: a, mutex: s } }; e.events.push(["postProcessText", function (t) { var e = t.text || "", n = t.x, r = t.y, i = t.options, o = t.mutex, a = (i.lang, []), s = { text: e, x: n, y: r, options: i, mutex: o }; if ("[object Array]" === Object.prototype.toString.call(e)) { var l = 0; for (l = 0; l < e.length; l += 1)"[object Array]" === Object.prototype.toString.call(e[l]) && 3 === e[l].length ? a.push([h(Object.assign({}, s, { text: e[l][0] })).text, e[l][1], e[l][2]]) : a.push(h(Object.assign({}, s, { text: e[l] })).text); t.text = a } else t.text = h(Object.assign({}, s, { text: e })).text }]) }(lt, "undefined" != typeof self && self || "undefined" != typeof global && global || "undefined" != typeof window && window || Function("return this")()), at = lt.API, st = function (t) { return void 0 !== t && (void 0 === t.vFS && (t.vFS = {}), !0) }, at.existsFileInVFS = function (t) { return !!st(this.internal) && void 0 !== this.internal.vFS[t] }, at.addFileToVFS = function (t, e) { return st(this.internal), this.internal.vFS[t] = e, this }, at.getFileFromVFS = function (t) { return st(this.internal), void 0 !== this.internal.vFS[t] ? this.internal.vFS[t] : null }, lt.API.addHTML = function (t, d, g, s, m) { if ("undefined" == typeof html2canvas && "undefined" == typeof rasterizeHTML) throw new Error("You need either https://github.com/niklasvh/html2canvas or https://github.com/cburgmer/rasterizeHTML.js"); "number" != typeof d && (s = d, m = g), "function" == typeof s && (m = s, s = null), "function" != typeof m && (m = function () { }); var e = this.internal, y = e.scaleFactor, v = e.pageSize.getWidth(), w = e.pageSize.getHeight(); if ((s = s || {}).onrendered = function (l) { d = parseInt(d) || 0, g = parseInt(g) || 0; var t = s.dim || {}, h = Object.assign({ top: 0, right: 0, bottom: 0, left: 0, useFor: "content" }, s.margin), e = t.h || Math.min(w, l.height / y), u = t.w || Math.min(v, l.width / y) - d, c = s.format || "JPEG", f = s.imageCompression || "SLOW"; if (l.height > w - h.top - h.bottom && s.pagesplit) { var p = function (t, e, n, r, i) { var o = document.createElement("canvas"); o.height = i, o.width = r; var a = o.getContext("2d"); return a.mozImageSmoothingEnabled = !1, a.webkitImageSmoothingEnabled = !1, a.msImageSmoothingEnabled = !1, a.imageSmoothingEnabled = !1, a.fillStyle = s.backgroundColor || "#ffffff", a.fillRect(0, 0, r, i), a.drawImage(t, e, n, r, i, 0, 0, r, i), o }, n = function () { for (var t, e, n = 0, r = 0, i = {}, o = !1; ;) { var a; if (r = 0, i.top = 0 !== n ? h.top : g, i.left = 0 !== n ? h.left : d, o = (v - h.left - h.right) * y < l.width, "content" === h.useFor ? 0 === n ? (t = Math.min((v - h.left) * y, l.width), e = Math.min((w - h.top) * y, l.height - n)) : (t = Math.min(v * y, l.width), e = Math.min(w * y, l.height - n), i.top = 0) : (t = Math.min((v - h.left - h.right) * y, l.width), e = Math.min((w - h.bottom - h.top) * y, l.height - n)), o) for (; ;) { "content" === h.useFor && (0 === r ? t = Math.min((v - h.left) * y, l.width) : (t = Math.min(v * y, l.width - r), i.left = 0)); var s = [a = p(l, r, n, t, e), i.left, i.top, a.width / y, a.height / y, c, null, f]; if (this.addImage.apply(this, s), (r += t) >= l.width) break; this.addPage() } else s = [a = p(l, 0, n, t, e), i.left, i.top, a.width / y, a.height / y, c, null, f], this.addImage.apply(this, s); if ((n += e) >= l.height) break; this.addPage() } m(u, n, null, s) }.bind(this); if ("CANVAS" === l.nodeName) { var r = new Image; r.onload = n, r.src = l.toDataURL("image/png"), l = r } else n() } else { var i = Math.random().toString(35), o = [l, d, g, u, e, c, i, f]; this.addImage.apply(this, o), m(u, e, i, o) } }.bind(this), "undefined" != typeof html2canvas && !s.rstz) return html2canvas(t, s); if ("undefined" == typeof rasterizeHTML) return null; var n = "drawDocument"; return "string" == typeof t && (n = /^http/.test(t) ? "drawURL" : "drawHTML"), s.width = s.width || v * y, rasterizeHTML[n](t, void 0, s).then(function (t) { s.onrendered(t.image) }, function (t) { m(null, t) }) }, /** * jsPDF fromHTML plugin. BETA stage. API subject to change. Needs browser * Copyright (c) 2012 Willow Systems Corporation, willow-systems.com * 2014 Juan Pablo Gaviria, https://github.com/juanpgaviria * 2014 Diego Casorran, https://github.com/diegocr * 2014 Daniel Husar, https://github.com/danielhusar * 2014 Wolfgang Gassler, https://github.com/woolfg * 2014 Steven Spungin, https://github.com/flamenco * * @license * * ==================================================================== */ function (t) { var P, k, i, a, s, l, h, u, I, w, f, c, p, n, C, B, d, g, m, j; P = function () { return function (t) { return e.prototype = t, new e }; function e() { } }(), w = function (t) { var e, n, r, i, o, a, s; for (n = 0, r = t.length, e = void 0, a = i = !1; !i && n !== r;)(e = t[n] = t[n].trimLeft()) && (i = !0), n++; for (n = r - 1; r && !a && -1 !== n;)(e = t[n] = t[n].trimRight()) && (a = !0), n--; for (o = /\s+$/g, s = !0, n = 0; n !== r;)"\u2028" != t[n] && (e = t[n].replace(/\s+/g, " "), s && (e = e.trimLeft()), e && (s = o.test(e)), t[n] = e), n++; return t }, c = function (t) { var e, n, r; for (e = void 0, n = (r = t.split(",")).shift(); !e && n;)e = i[n.trim().toLowerCase()], n = r.shift(); return e }, p = function (t) { var e; return -1 < (t = "auto" === t ? "0px" : t).indexOf("em") && !isNaN(Number(t.replace("em", ""))) && (t = 18.719 * Number(t.replace("em", "")) + "px"), -1 < t.indexOf("pt") && !isNaN(Number(t.replace("pt", ""))) && (t = 1.333 * Number(t.replace("pt", "")) + "px"), void 0, 16, (e = n[t]) ? e : void 0 !== (e = { "xx-small": 9, "x-small": 11, small: 13, medium: 16, large: 19, "x-large": 23, "xx-large": 28, auto: 0 }[t]) ? n[t] = e / 16 : (e = parseFloat(t)) ? n[t] = e / 16 : (e = t.match(/([\d\.]+)(px)/), Array.isArray(e) && 3 === e.length ? n[t] = parseFloat(e[1]) / 16 : n[t] = 1) }, I = function (t) { var e, n, r, i, o; return o = t, i = document.defaultView && document.defaultView.getComputedStyle ? document.defaultView.getComputedStyle(o, null) : o.currentStyle ? o.currentStyle : o.style, n = void 0, (e = {})["font-family"] = c((r = function (t) { return t = t.replace(/-\D/g, function (t) { return t.charAt(1).toUpperCase() }), i[t] })("font-family")) || "times", e["font-style"] = a[r("font-style")] || "normal", e["text-align"] = s[r("text-align")] || "left", "bold" === (n = l[r("font-weight")] || "normal") && ("normal" === e["font-style"] ? e["font-style"] = n : e["font-style"] = n + e["font-style"]), e["font-size"] = p(r("font-size")) || 1, e["line-height"] = p(r("line-height")) || 1, e.display = "inline" === r("display") ? "inline" : "block", n = "block" === e.display, e["margin-top"] = n && p(r("margin-top")) || 0, e["margin-bottom"] = n && p(r("margin-bottom")) || 0, e["padding-top"] = n && p(r("padding-top")) || 0, e["padding-bottom"] = n && p(r("padding-bottom")) || 0, e["margin-left"] = n && p(r("margin-left")) || 0, e["margin-right"] = n && p(r("margin-right")) || 0, e["padding-left"] = n && p(r("padding-left")) || 0, e["padding-right"] = n && p(r("padding-right")) || 0, e["page-break-before"] = r("page-break-before") || "auto", e.float = h[r("cssFloat")] || "none", e.clear = u[r("clear")] || "none", e.color = r("color"), e }, C = function (t, e, n) { var r, i, o, a, s; if (o = !1, a = i = void 0, r = n["#" + t.id]) if ("function" == typeof r) o = r(t, e); else for (i = 0, a = r.length; !o && i !== a;)o = r[i](t, e), i++; if (r = n[t.nodeName], !o && r) if ("function" == typeof r) o = r(t, e); else for (i = 0, a = r.length; !o && i !== a;)o = r[i](t, e), i++; for (s = "string" == typeof t.className ? t.className.split(" ") : [], i = 0; i < s.length; i++)if (r = n["." + s[i]], !o && r) if ("function" == typeof r) o = r(t, e); else for (i = 0, a = r.length; !o && i !== a;)o = r[i](t, e), i++; return o }, j = function (t, e) { var n, r, i, o, a, s, l, h, u; for (n = [], r = [], i = 0, u = t.rows[0].cells.length, l = t.clientWidth; i < u;)h = t.rows[0].cells[i], r[i] = { name: h.textContent.toLowerCase().replace(/\s+/g, ""), prompt: h.textContent.replace(/\r?\n/g, ""), width: h.clientWidth / l * e.pdf.internal.pageSize.getWidth() }, i++; for (i = 1; i < t.rows.length;) { for (s = t.rows[i], a = {}, o = 0; o < s.cells.length;)a[r[o].name] = s.cells[o].textContent.replace(/\r?\n/g, ""), o++; n.push(a), i++ } return { rows: n, headers: r } }; var E = { SCRIPT: 1, STYLE: 1, NOSCRIPT: 1, OBJECT: 1, EMBED: 1, SELECT: 1 }, M = 1; k = function (t, i, e) { var n, r, o, a, s, l, h, u; for (r = t.childNodes, n = void 0, (s = "block" === (o = I(t)).display) && (i.setBlockBoundary(), i.setBlockStyle(o)), a = 0, l = r.length; a < l;) { if ("object" === se(n = r[a])) { if (i.executeWatchFunctions(n), 1 === n.nodeType && "HEADER" === n.nodeName) { var c = n, f = i.pdf.margins_doc.top; i.pdf.internal.events.subscribe("addPage", function (t) { i.y = f, k(c, i, e), i.pdf.margins_doc.top = i.y + 10, i.y += 10 }, !1) } if (8 === n.nodeType && "#comment" === n.nodeName) ~n.textContent.indexOf("ADD_PAGE") && (i.pdf.addPage(), i.y = i.pdf.margins_doc.top); else if (1 !== n.nodeType || E[n.nodeName]) if (3 === n.nodeType) { var p = n.nodeValue; if (n.nodeValue && "LI" === n.parentNode.nodeName) if ("OL" === n.parentNode.parentNode.nodeName) p = M++ + ". " + p; else { var d = o["font-size"], g = (3 - .75 * d) * i.pdf.internal.scaleFactor, m = .75 * d * i.pdf.internal.scaleFactor, y = 1.74 * d / i.pdf.internal.scaleFactor; u = function (t, e) { this.pdf.circle(t + g, e + m, y, "FD") } } 16 & n.ownerDocument.body.compareDocumentPosition(n) && i.addText(p, o) } else "string" == typeof n && i.addText(n, o); else { var v; if ("IMG" === n.nodeName) { var w = n.getAttribute("src"); v = B[i.pdf.sHashCode(w) || w] } if (v) { i.pdf.internal.pageSize.getHeight() - i.pdf.margins_doc.bottom < i.y + n.height && i.y > i.pdf.margins_doc.top && (i.pdf.addPage(), i.y = i.pdf.margins_doc.top, i.executeWatchFunctions(n)); var b = I(n), x = i.x, N = 12 / i.pdf.internal.scaleFactor, L = (b["margin-left"] + b["padding-left"]) * N, A = (b["margin-right"] + b["padding-right"]) * N, S = (b["margin-top"] + b["padding-top"]) * N, _ = (b["margin-bottom"] + b["padding-bottom"]) * N; void 0 !== b.float && "right" === b.float ? x += i.settings.width - n.width - A : x += L, i.pdf.addImage(v, x, i.y + S, n.width, n.height), v = void 0, "right" === b.float || "left" === b.float ? (i.watchFunctions.push(function (t, e, n, r) { return i.y >= e ? (i.x += t, i.settings.width += n, !0) : !!(r && 1 === r.nodeType && !E[r.nodeName] && i.x + r.width > i.pdf.margins_doc.left + i.pdf.margins_doc.width) && (i.x += t, i.y = e, i.settings.width += n, !0) }.bind(this, "left" === b.float ? -n.width - L - A : 0, i.y + n.height + S + _, n.width)), i.watchFunctions.push(function (t, e, n) { return !(i.y < t && e === i.pdf.internal.getNumberOfPages()) || 1 === n.nodeType && "both" === I(n).clear && (i.y = t, !0) }.bind(this, i.y + n.height, i.pdf.internal.getNumberOfPages())), i.settings.width -= n.width + L + A, "left" === b.float && (i.x += n.width + L + A)) : i.y += n.height + S + _ } else if ("TABLE" === n.nodeName) h = j(n, i), i.y += 10, i.pdf.table(i.x, i.y, h.rows, h.headers, { autoSize: !1, printHeaders: e.printHeaders, margins: i.pdf.margins_doc, css: I(n) }), i.y = i.pdf.lastCellPos.y + i.pdf.lastCellPos.h + 20; else if ("OL" === n.nodeName || "UL" === n.nodeName) M = 1, C(n, i, e) || k(n, i, e), i.y += 10; else if ("LI" === n.nodeName) { var F = i.x; i.x += 20 / i.pdf.internal.scaleFactor, i.y += 3, C(n, i, e) || k(n, i, e), i.x = F } else "BR" === n.nodeName ? (i.y += o["font-size"] * i.pdf.internal.scaleFactor, i.addText("\u2028", P(o))) : C(n, i, e) || k(n, i, e) } } a++ } if (e.outY = i.y, s) return i.setBlockBoundary(u) }, B = {}, d = function (t, o, e, n) { var a, r = t.getElementsByTagName("img"), i = r.length, s = 0; function l() { o.pdf.internal.events.publish("imagesLoaded"), n(a) } function h(e, n, r) { if (e) { var i = new Image; a = ++s, i.crossOrigin = "", i.onerror = i.onload = function () { if (i.complete && (0 === i.src.indexOf("data:image/") && (i.width = n || i.width || 0, i.height = r || i.height || 0), i.width + i.height)) { var t = o.pdf.sHashCode(e) || e; B[t] = B[t] || i } --s || l() }, i.src = e } } for (; i--;)h(r[i].getAttribute("src"), r[i].width, r[i].height); return s || l() }, g = function (t, o, a) { var s = t.getElementsByTagName("footer"); if (0 < s.length) { s = s[0]; var e = o.pdf.internal.write, n = o.y; o.pdf.internal.write = function () { }, k(s, o, a); var l = Math.ceil(o.y - n) + 5; o.y = n, o.pdf.internal.write = e, o.pdf.margins_doc.bottom += l; for (var r = function (t) { var e = void 0 !== t ? t.pageNumber : 1, n = o.y; o.y = o.pdf.internal.pageSize.getHeight() - o.pdf.margins_doc.bottom, o.pdf.margins_doc.bottom -= l; for (var r = s.getElementsByTagName("span"), i = 0; i < r.length; ++i)-1 < (" " + r[i].className + " ").replace(/[\n\t]/g, " ").indexOf(" pageCounter ") && (r[i].innerHTML = e), -1 < (" " + r[i].className + " ").replace(/[\n\t]/g, " ").indexOf(" totalPages ") && (r[i].innerHTML = "###jsPDFVarTotalPages###"); k(s, o, a), o.pdf.margins_doc.bottom += l, o.y = n }, i = s.getElementsByTagName("span"), h = 0; h < i.length; ++h)-1 < (" " + i[h].className + " ").replace(/[\n\t]/g, " ").indexOf(" totalPages ") && o.pdf.internal.events.subscribe("htmlRenderingFinished", o.pdf.putTotalPages.bind(o.pdf, "###jsPDFVarTotalPages###"), !0); o.pdf.internal.events.subscribe("addPage", r, !1), r(), E.FOOTER = 1 } }, m = function (t, e, n, r, i, o) { if (!e) return !1; var a, s, l, h; "string" == typeof e || e.parentNode || (e = "" + e.innerHTML), "string" == typeof e && (a = e.replace(/<\/?script[^>]*?>/gi, ""), h = "jsPDFhtmlText" + Date.now().toString() + (1e3 * Math.random()).toFixed(0), (l = document.createElement("div")).style.cssText = "position: absolute !important;clip: rect(1px 1px 1px 1px); /* IE6, IE7 */clip: rect(1px, 1px, 1px, 1px);padding:0 !important;border:0 !important;height: 1px !important;width: 1px !important; top:auto;left:-100px;overflow: hidden;", l.innerHTML = '