/** @license * * jsPDF - PDF Document creation from JavaScript * Version 2.1.1 Built on 2020-09-07T12:58:19.950Z * CommitID 00000000 * * Copyright (c) 2010-2020 James Hall , https://github.com/MrRio/jsPDF * 2015-2020 yWorks GmbH, http://www.yworks.com * 2015-2020 Lukas Holländer , https://github.com/HackbrettXXX * 2016-2018 Aras Abbasi * 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 * * Permission is hereby granted, free of charge, to any person obtaining * a copy of this software and associated documentation files (the * "Software"), to deal in the Software without restriction, including * without limitation the rights to use, copy, modify, merge, publish, * distribute, sublicense, and/or sell copies of the Software, and to * permit persons to whom the Software is furnished to do so, subject to * the following conditions: * * The above copyright notice and this permission notice shall be * included in all copies or substantial portions of the Software. * * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND * NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE * LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION * OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION * WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. * * Contributor(s): * siefkenj, ahwolf, rickygu, Midnith, saintclair, eaparango, * kim3er, mfo, alnorth, Flamenco */ var t=function(){return"undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:this}();function e(){t.console&&"function"==typeof t.console.log&&t.console.log.apply(t.console,arguments)}var n={log:e,warn:function(n){t.console&&("function"==typeof t.console.warn?t.console.warn.apply(t.console,arguments):e.call(null,arguments))},error:function(n){t.console&&("function"==typeof t.console.error?t.console.error.apply(t.console,arguments):e(n))}}; /** * @license * FileSaver.js * A saveAs() FileSaver implementation. * * By Eli Grey, http://eligrey.com * * License : https://github.com/eligrey/FileSaver.js/blob/master/LICENSE.md (MIT) * source : http://purl.eligrey.com/github/FileSaver.js */function r(t,e,r){var i=new XMLHttpRequest;i.open("GET",t),i.responseType="blob",i.onload=function(){u(i.response,e,r)},i.onerror=function(){n.error("could not download file")},i.send()}function i(t){var e=new XMLHttpRequest;e.open("HEAD",t,!1);try{e.send()}catch(t){}return e.status>=200&&e.status<=299}function a(t){try{t.dispatchEvent(new MouseEvent("click"))}catch(n){var e=document.createEvent("MouseEvents");e.initMouseEvent("click",!0,!0,window,0,0,0,80,20,!1,!1,!1,!1,0,null),t.dispatchEvent(e)}}var o,s,u=t.saveAs||("object"!=typeof window||window!==t?function(){}:"download"in HTMLAnchorElement.prototype?function(e,n,o){var s=t.URL||t.webkitURL,u=document.createElement("a");n=n||e.name||"download",u.download=n,u.rel="noopener","string"==typeof e?(u.href=e,u.origin!==location.origin?i(u.href)?r(e,n,o):a(u,u.target="_blank"):a(u)):(u.href=s.createObjectURL(e),setTimeout((function(){s.revokeObjectURL(u.href)}),4e4),setTimeout((function(){a(u)}),0))}:"msSaveOrOpenBlob"in navigator?function(t,e,o){if(e=e||t.name||"download","string"==typeof t)if(i(t))r(t,e,o);else{var s=document.createElement("a");s.href=t,s.target="_blank",setTimeout((function(){a(s)}))}else navigator.msSaveOrOpenBlob(function(t,e){return void 0===e?e={autoBom:!1}:"object"!=typeof e&&(n.warn("Deprecated: Expected third argument to be a object"),e={autoBom:!e}),e.autoBom&&/^\s*(?:text\/\S*|application\/xml|\S*\/\S*\+xml)\s*;.*charset\s*=\s*utf-8/i.test(t.type)?new Blob([String.fromCharCode(65279),t],{type:t.type}):t}(t,o),e)}:function(e,n,i,a){if((a=a||open("","_blank"))&&(a.document.title=a.document.body.innerText="downloading..."),"string"==typeof e)return r(e,n,i);var o="application/octet-stream"===e.type,s=/constructor/i.test(t.HTMLElement)||t.safari,u=/CriOS\/[\d]+/.test(navigator.userAgent);if((u||o&&s)&&"object"==typeof FileReader){var c=new FileReader;c.onloadend=function(){var t=c.result;t=u?t:t.replace(/^data:[^;]*;/,"data:attachment/file;"),a?a.location.href=t:location=t,a=null},c.readAsDataURL(e)}else{var h=t.URL||t.webkitURL,l=h.createObjectURL(e);a?a.location=l:location.href=l,a=null,setTimeout((function(){h.revokeObjectURL(l)}),4e4)}}); /** * A class to parse color values * @author Stoyan Stefanov * {@link http://www.phpied.com/rgb-color-parser-in-javascript/} * @license Use it if you like it */function c(t){var e;t=t||"",this.ok=!1,"#"==t.charAt(0)&&(t=t.substr(1,6));t={aliceblue:"f0f8ff",antiquewhite:"faebd7",aqua:"00ffff",aquamarine:"7fffd4",azure:"f0ffff",beige:"f5f5dc",bisque:"ffe4c4",black:"000000",blanchedalmond:"ffebcd",blue:"0000ff",blueviolet:"8a2be2",brown:"a52a2a",burlywood:"deb887",cadetblue:"5f9ea0",chartreuse:"7fff00",chocolate:"d2691e",coral:"ff7f50",cornflowerblue:"6495ed",cornsilk:"fff8dc",crimson:"dc143c",cyan:"00ffff",darkblue:"00008b",darkcyan:"008b8b",darkgoldenrod:"b8860b",darkgray:"a9a9a9",darkgreen:"006400",darkkhaki:"bdb76b",darkmagenta:"8b008b",darkolivegreen:"556b2f",darkorange:"ff8c00",darkorchid:"9932cc",darkred:"8b0000",darksalmon:"e9967a",darkseagreen:"8fbc8f",darkslateblue:"483d8b",darkslategray:"2f4f4f",darkturquoise:"00ced1",darkviolet:"9400d3",deeppink:"ff1493",deepskyblue:"00bfff",dimgray:"696969",dodgerblue:"1e90ff",feldspar:"d19275",firebrick:"b22222",floralwhite:"fffaf0",forestgreen:"228b22",fuchsia:"ff00ff",gainsboro:"dcdcdc",ghostwhite:"f8f8ff",gold:"ffd700",goldenrod:"daa520",gray:"808080",green:"008000",greenyellow:"adff2f",honeydew:"f0fff0",hotpink:"ff69b4",indianred:"cd5c5c",indigo:"4b0082",ivory:"fffff0",khaki:"f0e68c",lavender:"e6e6fa",lavenderblush:"fff0f5",lawngreen:"7cfc00",lemonchiffon:"fffacd",lightblue:"add8e6",lightcoral:"f08080",lightcyan:"e0ffff",lightgoldenrodyellow:"fafad2",lightgrey:"d3d3d3",lightgreen:"90ee90",lightpink:"ffb6c1",lightsalmon:"ffa07a",lightseagreen:"20b2aa",lightskyblue:"87cefa",lightslateblue:"8470ff",lightslategray:"778899",lightsteelblue:"b0c4de",lightyellow:"ffffe0",lime:"00ff00",limegreen:"32cd32",linen:"faf0e6",magenta:"ff00ff",maroon:"800000",mediumaquamarine:"66cdaa",mediumblue:"0000cd",mediumorchid:"ba55d3",mediumpurple:"9370d8",mediumseagreen:"3cb371",mediumslateblue:"7b68ee",mediumspringgreen:"00fa9a",mediumturquoise:"48d1cc",mediumvioletred:"c71585",midnightblue:"191970",mintcream:"f5fffa",mistyrose:"ffe4e1",moccasin:"ffe4b5",navajowhite:"ffdead",navy:"000080",oldlace:"fdf5e6",olive:"808000",olivedrab:"6b8e23",orange:"ffa500",orangered:"ff4500",orchid:"da70d6",palegoldenrod:"eee8aa",palegreen:"98fb98",paleturquoise:"afeeee",palevioletred:"d87093",papayawhip:"ffefd5",peachpuff:"ffdab9",peru:"cd853f",pink:"ffc0cb",plum:"dda0dd",powderblue:"b0e0e6",purple:"800080",red:"ff0000",rosybrown:"bc8f8f",royalblue:"4169e1",saddlebrown:"8b4513",salmon:"fa8072",sandybrown:"f4a460",seagreen:"2e8b57",seashell:"fff5ee",sienna:"a0522d",silver:"c0c0c0",skyblue:"87ceeb",slateblue:"6a5acd",slategray:"708090",snow:"fffafa",springgreen:"00ff7f",steelblue:"4682b4",tan:"d2b48c",teal:"008080",thistle:"d8bfd8",tomato:"ff6347",turquoise:"40e0d0",violet:"ee82ee",violetred:"d02090",wheat:"f5deb3",white:"ffffff",whitesmoke:"f5f5f5",yellow:"ffff00",yellowgreen:"9acd32"}[t=(t=t.replace(/ /g,"")).toLowerCase()]||t;for(var n=[{re:/^rgb\((\d{1,3}),\s*(\d{1,3}),\s*(\d{1,3})\)$/,example:["rgb(123, 234, 45)","rgb(255,234,245)"],process:function(t){return[parseInt(t[1]),parseInt(t[2]),parseInt(t[3])]}},{re:/^(\w{2})(\w{2})(\w{2})$/,example:["#00ff00","336699"],process:function(t){return[parseInt(t[1],16),parseInt(t[2],16),parseInt(t[3],16)]}},{re:/^(\w{1})(\w{1})(\w{1})$/,example:["#fb0","f0f"],process:function(t){return[parseInt(t[1]+t[1],16),parseInt(t[2]+t[2],16),parseInt(t[3]+t[3],16)]}}],r=0;r255?255:this.r,this.g=this.g<0||isNaN(this.g)?0:this.g>255?255:this.g,this.b=this.b<0||isNaN(this.b)?0:this.b>255?255:this.b,this.toRGB=function(){return"rgb("+this.r+", "+this.g+", "+this.b+")"},this.toHex=function(){var t=this.r.toString(16),e=this.g.toString(16),n=this.b.toString(16);return 1==t.length&&(t="0"+t),1==e.length&&(e="0"+e),1==n.length&&(n="0"+n),"#"+t+e+n}}function h(e){if("object"!=typeof e)throw new Error("Invalid Context passed to initialize PubSub (jsPDF-module)");var r={};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)");r.hasOwnProperty(t)||(r[t]={});var i=Math.random().toString(35);return r[t][i]=[e,!!n],i},this.unsubscribe=function(t){for(var e in r)if(r[e][t])return delete r[e][t],0===Object.keys(r[e]).length&&delete r[e],!0;return!1},this.publish=function(i){if(r.hasOwnProperty(i)){var a=Array.prototype.slice.call(arguments,1),o=[];for(var s in r[i]){var u=r[i][s];try{u[0].apply(e,a)}catch(e){t.console&&n.error("jsPDF PubSub Error",e.message,e)}u[1]&&o.push(s)}o.length&&o.forEach(this.unsubscribe)}},this.getTopics=function(){return r}}function l(t){if(!(this instanceof l))return new l(t);var e="opacity,stroke-opacity".split(",");for(var n in t)t.hasOwnProperty(n)&&e.indexOf(n)>=0&&(this[n]=t[n]);this.id="",this.objectNumber=-1}function f(t,e){this.gState=t,this.matrix=e,this.id="",this.objectNumber=-1}function d(t,e,n,r,i){if(!(this instanceof d))return new d(t,e,n,r,i);this.type="axial"===t?2:3,this.coords=e,this.colors=n,f.call(this,r,i)}function p(t,e,n,r,i){if(!(this instanceof p))return new p(t,e,n,r,i);this.boundingBox=t,this.xStep=e,this.yStep=n,this.stream="",this.cloneIndex=0,f.call(this,r,i)}function g(e){var r,i="string"==typeof arguments[0]?arguments[0]:"p",a=arguments[1],o=arguments[2],f=arguments[3],m=[],v=1,b=16,y="S";"object"==typeof(e=e||{})&&(i=e.orientation,a=e.unit||a,o=e.format||o,f=e.compress||e.compressPdf||f,v="number"==typeof e.userUnit?Math.abs(e.userUnit):1,void 0!==e.precision&&(r=e.precision),void 0!==e.floatPrecision&&(b=e.floatPrecision),y=e.defaultPathOperation||"S"),m=e.filters||(!0===f?["FlateEncode"]:m),a=a||"mm",i=(""+(i||"P")).toLowerCase();var w=e.putOnlyUsedFonts||!1,N={},L={internal:{},__private__:{}};L.__private__.PubSub=h;var x="1.3",A=L.__private__.getPdfVersion=function(){return x};L.__private__.setPdfVersion=function(t){x=t};var _={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]};L.__private__.getPageFormats=function(){return _};var S=L.__private__.getPageFormat=function(t){return _[t]};o=o||"a4";var P={COMPAT:"compat",ADVANCED:"advanced"},k=P.COMPAT;function F(){this.saveGraphicsState(),ot(new Dt(Nt,0,0,-Nt,0,Cn()*Nt).toString()+" cm"),this.setFontSize(this.getFontSize()/Nt),y="n",k=P.ADVANCED}function I(){this.restoreGraphicsState(),y="S",k=P.COMPAT}L.advancedAPI=function(t){var e=k===P.COMPAT;return e&&F.call(this),"function"!=typeof t||(t(this),e&&I.call(this)),this},L.compatAPI=function(t){var e=k===P.ADVANCED;return e&&I.call(this),"function"!=typeof t||(t(this),e&&F.call(this)),this},L.isAdvancedAPI=function(){return k===P.ADVANCED};var C,j=function(t){if(k!==P.ADVANCED)throw new Error(t+" is only available in 'advanced' API mode. You need to call advancedAPI() first.")},B=L.roundToPrecision=L.__private__.roundToPrecision=function(t,e){var n=r||e;if(isNaN(t)||isNaN(n))throw new Error("Invalid argument passed to jsPDF.roundToPrecision");return t.toFixed(n).replace(/0+$/,"")};C=L.hpf=L.__private__.hpf="number"==typeof b?function(t){if(isNaN(t))throw new Error("Invalid argument passed to jsPDF.hpf");return B(t,b)}:"smart"===b?function(t){if(isNaN(t))throw new Error("Invalid argument passed to jsPDF.hpf");return B(t,t>-1&&t<1?16:5)}:function(t){if(isNaN(t))throw new Error("Invalid argument passed to jsPDF.hpf");return B(t,16)};var O=L.f2=L.__private__.f2=function(t){if(isNaN(t))throw new Error("Invalid argument passed to jsPDF.f2");return B(t,2)},M=L.__private__.f3=function(t){if(isNaN(t))throw new Error("Invalid argument passed to jsPDF.f3");return B(t,3)},E=L.scale=L.__private__.scale=function(t){if(isNaN(t))throw new Error("Invalid argument passed to jsPDF.scale");return k===P.COMPAT?t*Nt:k===P.ADVANCED?t:void 0},q=function(t){return k===P.COMPAT?Cn()-t:k===P.ADVANCED?t:void 0},R=function(t){return E(q(t))};L.__private__.setPrecision=L.setPrecision=function(t){"number"==typeof parseInt(t,10)&&(r=parseInt(t,10))};var T,D="00000000000000000000000000000000",U=L.__private__.getFileId=function(){return D},z=L.__private__.setFileId=function(t){return D=void 0!==t&&/^[a-fA-F0-9]{32}$/.test(t)?t.toUpperCase():D.split("").map((function(){return"ABCDEF0123456789".charAt(Math.floor(16*Math.random()))})).join("")};L.setFileId=function(t){return z(t),this},L.getFileId=function(){return U()};var H=L.__private__.convertDateToPDFDate=function(t){var e=t.getTimezoneOffset(),n=e<0?"+":"-",r=Math.floor(Math.abs(e/60)),i=Math.abs(e%60),a=[n,J(r),"'",J(i),"'"].join("");return["D:",t.getFullYear(),J(t.getMonth()+1),J(t.getDate()),J(t.getHours()),J(t.getMinutes()),J(t.getSeconds()),a].join("")},W=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),a=parseInt(t.substr(12,2),10),o=parseInt(t.substr(14,2),10);return new Date(e,n,r,i,a,o,0)},V=L.__private__.setCreationDate=function(t){var e;if(void 0===t&&(t=new Date),t instanceof Date)e=H(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 T=e},G=L.__private__.getCreationDate=function(t){var e=T;return"jsDate"===t&&(e=W(T)),e};L.setCreationDate=function(t){return V(t),this},L.getCreationDate=function(t){return G(t)};var Y,J=L.__private__.padd2=function(t){return("0"+parseInt(t)).slice(-2)},X=L.__private__.padd2Hex=function(t){return("00"+(t=t.toString())).substr(t.length)},K=0,Z=[],$=[],Q=0,tt=[],et=[],nt=!1,rt=$,it=function(){K=0,Q=0,$=[],Z=[],tt=[],Jt=Vt(),Xt=Vt()};L.__private__.setCustomOutputDestination=function(t){nt=!0,rt=t};var at=function(t){nt||(rt=t)};L.__private__.resetCustomOutputDestination=function(){nt=!1,rt=$};var ot=L.__private__.out=function(t){return t=t.toString(),Q+=t.length+1,rt.push(t),rt},st=L.__private__.write=function(t){return ot(1===arguments.length?t.toString():Array.prototype.join.call(arguments," "))},ut=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},ct=[["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]];L.__private__.getStandardFonts=function(){return ct};var ht=e.fontSize||16;L.__private__.setFontSize=L.setFontSize=function(t){return ht=k===P.ADVANCED?t/Nt:t,this};var lt,ft=L.__private__.getFontSize=L.getFontSize=function(){return k===P.COMPAT?ht:ht*Nt},dt=e.R2L||!1;L.__private__.setR2L=L.setR2L=function(t){return dt=t,this},L.__private__.getR2L=L.getR2L=function(){return dt};var pt,gt=L.__private__.setZoomMode=function(t){var e=[void 0,null,"fullwidth","fullheight","fullpage","original"];if(/^\d*\.?\d*%$/.test(t))lt=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.');lt=t}else lt=parseInt(t,10)};L.__private__.getZoomMode=function(){return lt};var mt,vt=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.');pt=t};L.__private__.getPageMode=function(){return pt};var bt=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.');mt=t};L.__private__.getLayoutMode=function(){return mt},L.__private__.setDisplayMode=L.setDisplayMode=function(t,e,n){return gt(t),bt(e),vt(n),this};var yt={title:"",subject:"",author:"",keywords:"",creator:""};L.__private__.getDocumentProperty=function(t){if(-1===Object.keys(yt).indexOf(t))throw new Error("Invalid argument passed to jsPDF.getDocumentProperty");return yt[t]},L.__private__.getDocumentProperties=function(){return yt},L.__private__.setDocumentProperties=L.setProperties=L.setDocumentProperties=function(t){for(var e in yt)yt.hasOwnProperty(e)&&t[e]&&(yt[e]=t[e]);return this},L.__private__.setDocumentProperty=function(t,e){if(-1===Object.keys(yt).indexOf(t))throw new Error("Invalid arguments passed to jsPDF.setDocumentProperty");return yt[t]=e};var wt,Nt,Lt,xt,At,_t={},St={},Pt=[],kt={},Ft={},It={},Ct={},jt=null,Bt=0,Ot=[],Mt=new h(L),Et=e.hotfixes||[],qt={},Rt={},Tt=[],Dt=function(t,e,n,r,i,a){if(!(this instanceof Dt))return new Dt(t,e,n,r,i,a);isNaN(t)&&(t=1),isNaN(e)&&(e=0),isNaN(n)&&(n=0),isNaN(r)&&(r=1),isNaN(i)&&(i=0),isNaN(a)&&(a=0),this._matrix=[t,e,n,r,i,a]};Object.defineProperty(Dt.prototype,"sx",{get:function(){return this._matrix[0]},set:function(t){this._matrix[0]=t}}),Object.defineProperty(Dt.prototype,"shy",{get:function(){return this._matrix[1]},set:function(t){this._matrix[1]=t}}),Object.defineProperty(Dt.prototype,"shx",{get:function(){return this._matrix[2]},set:function(t){this._matrix[2]=t}}),Object.defineProperty(Dt.prototype,"sy",{get:function(){return this._matrix[3]},set:function(t){this._matrix[3]=t}}),Object.defineProperty(Dt.prototype,"tx",{get:function(){return this._matrix[4]},set:function(t){this._matrix[4]=t}}),Object.defineProperty(Dt.prototype,"ty",{get:function(){return this._matrix[5]},set:function(t){this._matrix[5]=t}}),Object.defineProperty(Dt.prototype,"a",{get:function(){return this._matrix[0]},set:function(t){this._matrix[0]=t}}),Object.defineProperty(Dt.prototype,"b",{get:function(){return this._matrix[1]},set:function(t){this._matrix[1]=t}}),Object.defineProperty(Dt.prototype,"c",{get:function(){return this._matrix[2]},set:function(t){this._matrix[2]=t}}),Object.defineProperty(Dt.prototype,"d",{get:function(){return this._matrix[3]},set:function(t){this._matrix[3]=t}}),Object.defineProperty(Dt.prototype,"e",{get:function(){return this._matrix[4]},set:function(t){this._matrix[4]=t}}),Object.defineProperty(Dt.prototype,"f",{get:function(){return this._matrix[5]},set:function(t){this._matrix[5]=t}}),Object.defineProperty(Dt.prototype,"rotation",{get:function(){return Math.atan2(this.shx,this.sx)}}),Object.defineProperty(Dt.prototype,"scaleX",{get:function(){return this.decompose().scale.sx}}),Object.defineProperty(Dt.prototype,"scaleY",{get:function(){return this.decompose().scale.sy}}),Object.defineProperty(Dt.prototype,"isIdentity",{get:function(){return 1===this.sx&&(0===this.shy&&(0===this.shx&&(1===this.sy&&(0===this.tx&&0===this.ty))))}}),Dt.prototype.join=function(t){return[this.sx,this.shy,this.shx,this.sy,this.tx,this.ty].map(C).join(t)},Dt.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,a=t.tx*this.sx+t.ty*this.shx+this.tx,o=t.tx*this.shy+t.ty*this.sy+this.ty;return new Dt(e,n,r,i,a,o)},Dt.prototype.decompose=function(){var t=this.sx,e=this.shy,n=this.shx,r=this.sy,i=this.tx,a=this.ty,o=Math.sqrt(t*t+e*e),s=(t/=o)*n+(e/=o)*r;n-=t*s,r-=e*s;var u=Math.sqrt(n*n+r*r);return s/=u,t*(r/=u)>16&255,r=u>>8&255,i=255&u}if(void 0===r||void 0===a&&n===r&&r===i)if("string"==typeof n)e=n+" "+o[0];else switch(t.precision){case 2:e=O(n/255)+" "+o[0];break;case 3:default:e=M(n/255)+" "+o[0]}else if(void 0===a||"object"==typeof a){if(a&&!isNaN(a.a)&&0===a.a)return e=["1.","1.","1.",o[1]].join(" ");if("string"==typeof n)e=[n,r,i,o[1]].join(" ");else switch(t.precision){case 2:e=[O(n/255),O(r/255),O(i/255),o[1]].join(" ");break;default:case 3:e=[M(n/255),M(r/255),M(i/255),o[1]].join(" ")}}else if("string"==typeof n)e=[n,r,i,a,o[2]].join(" ");else switch(t.precision){case 2:e=[O(n),O(r),O(i),O(a),o[2]].join(" ");break;case 3:default:e=[M(n),M(r),M(i),M(a),o[2]].join(" ")}return e},$t=L.__private__.getFilters=function(){return m},Qt=L.__private__.putStream=function(t){var e=(t=t||{}).data||"",n=t.filters||$t(),r=t.alreadyAppliedFilters||[],i=t.addLength1||!1,a=e.length,o={};!0===n&&(n=["FlateEncode"]);var s=t.additionalKeyValues||[],u=(o=void 0!==g.API.processDataByFilters?g.API.processDataByFilters(e,n):{data:e,reverseChain:[]}).reverseChain+(Array.isArray(r)?r.join(" "):r.toString());if(0!==o.data.length&&(s.push({key:"Length",value:o.data.length}),!0===i&&s.push({key:"Length1",value:a})),0!=u.length)if(u.split("/").length-1==1)s.push({key:"Filter",value:u});else{s.push({key:"Filter",value:"["+u+"]"});for(var c=0;c>"),0!==o.data.length&&(ot("stream"),ot(o.data),ot("endstream"))},te=L.__private__.putPage=function(t){var e=t.number,n=t.data,r=t.objId,i=t.contentsObjId;Gt(r,!0),ot("<>"),ot("endobj");var a=n.join("\n");return k===P.ADVANCED&&(a+="\nQ"),Gt(i,!0),Qt({data:a,filters:$t()}),ot("endobj"),r},ee=L.__private__.putPages=function(){var t,e,n=[];for(t=1;t<=Bt;t++)Ot[t].objId=Vt(),Ot[t].contentsObjId=Vt();for(t=1;t<=Bt;t++)n.push(te({number:t,data:et[t],objId:Ot[t].objId,contentsObjId:Ot[t].contentsObjId,mediaBox:Ot[t].mediaBox,cropBox:Ot[t].cropBox,bleedBox:Ot[t].bleedBox,trimBox:Ot[t].trimBox,artBox:Ot[t].artBox,userUnit:Ot[t].userUnit,rootDictionaryObjId:Jt,resourceDictionaryObjId:Xt}));Gt(Jt,!0),ot("<>"),ot("endobj"),Mt.publish("postPutPages")},ne=function(t){var e=function(t,e){return-1!==t.indexOf(" ")?"("+_e(t,e)+")":_e(t,e)};Mt.publish("putFont",{font:t,out:ot,newObject:Wt,putStream:Qt,pdfEscapeWithNeededParanthesis:e}),!0!==t.isAlreadyPutted&&(t.objectNumber=Wt(),ot("<<"),ot("/Type /Font"),ot("/BaseFont /"+e(t.postScriptName)),ot("/Subtype /Type1"),"string"==typeof t.encoding&&ot("/Encoding /"+t.encoding),ot("/FirstChar 32"),ot("/LastChar 255"),ot(">>"),ot("endobj"))},re=function(){for(var t in _t)_t.hasOwnProperty(t)&&(!1===w||!0===w&&N.hasOwnProperty(t))&&ne(_t[t])},ie=function(t){t.objectNumber=Wt();var e=[];e.push({key:"Type",value:"/XObject"}),e.push({key:"Subtype",value:"/Form"}),e.push({key:"BBox",value:"["+[C(t.x),C(t.y),C(t.x+t.width),C(t.y+t.height)].join(" ")+"]"}),e.push({key:"Matrix",value:"["+t.matrix.toString()+"]"});var n=t.pages[1].join("\n");Qt({data:n,additionalKeyValues:e}),ot("endobj")},ae=function(){for(var t in qt)qt.hasOwnProperty(t)&&ie(qt[t])},oe=function(t,e){var n,r=[],i=1/(e-1);for(n=0;n<1;n+=i)r.push(n);if(r.push(1),0!=t[0].offset){var a={offset:0,color:t[0].color};t.unshift(a)}if(1!=t[t.length-1].offset){var o={offset:1,color:t[t.length-1].color};t.push(o)}for(var s="",u=0,c=0;ct[u+1].offset;)u++;var h=t[u].offset,l=(n-h)/(t[u+1].offset-h),f=t[u].color,d=t[u+1].color;s+=X(Math.round((1-l)*f[0]+l*d[0]).toString(16))+X(Math.round((1-l)*f[1]+l*d[1]).toString(16))+X(Math.round((1-l)*f[2]+l*d[2]).toString(16))}return s.trim()},se=function(t,e){e||(e=21);var n=Wt(),r=oe(t.colors,e),i=[];i.push({key:"FunctionType",value:"0"}),i.push({key:"Domain",value:"[0.0 1.0]"}),i.push({key:"Size",value:"["+e+"]"}),i.push({key:"BitsPerSample",value:"8"}),i.push({key:"Range",value:"[0.0 1.0 0.0 1.0 0.0 1.0]"}),i.push({key:"Decode",value:"[0.0 1.0 0.0 1.0 0.0 1.0]"}),Qt({data:r,additionalKeyValues:i,alreadyAppliedFilters:["/ASCIIHexDecode"]}),ot("endobj"),t.objectNumber=Wt(),ot("<< /ShadingType "+t.type),ot("/ColorSpace /DeviceRGB");var a="/Coords ["+C(parseFloat(t.coords[0]))+" "+C(parseFloat(t.coords[1]))+" ";2===t.type?a+=C(parseFloat(t.coords[2]))+" "+C(parseFloat(t.coords[3])):a+=C(parseFloat(t.coords[2]))+" "+C(parseFloat(t.coords[3]))+" "+C(parseFloat(t.coords[4]))+" "+C(parseFloat(t.coords[5])),ot(a+="]"),t.matrix&&ot("/Matrix ["+t.matrix.toString()+"]"),ot("/Function "+n+" 0 R"),ot("/Extend [true true]"),ot(">>"),ot("endobj")},ue=function(t,e){var n=Vt(),r=Wt();e.push({resourcesOid:n,objectOid:r}),t.objectNumber=r;var i=[];i.push({key:"Type",value:"/Pattern"}),i.push({key:"PatternType",value:"1"}),i.push({key:"PaintType",value:"1"}),i.push({key:"TilingType",value:"1"}),i.push({key:"BBox",value:"["+t.boundingBox.map(C).join(" ")+"]"}),i.push({key:"XStep",value:C(t.xStep)}),i.push({key:"YStep",value:C(t.yStep)}),i.push({key:"Resources",value:n+" 0 R"}),t.matrix&&i.push({key:"Matrix",value:"["+t.matrix.toString()+"]"}),Qt({data:t.stream,additionalKeyValues:i}),ot("endobj")},ce=function(t){var e;for(e in kt)kt.hasOwnProperty(e)&&(kt[e]instanceof d?se(kt[e]):kt[e]instanceof p&&ue(kt[e],t))},he=function(t){for(var e in t.objectNumber=Wt(),ot("<<"),t)switch(e){case"opacity":ot("/ca "+O(t[e]));break;case"stroke-opacity":ot("/CA "+O(t[e]))}ot(">>"),ot("endobj")},le=function(){var t;for(t in It)It.hasOwnProperty(t)&&he(It[t])},fe=function(){for(var t in ot("/XObject <<"),qt)qt.hasOwnProperty(t)&&qt[t].objectNumber>=0&&ot("/"+t+" "+qt[t].objectNumber+" 0 R");Mt.publish("putXobjectDict"),ot(">>")},de=function(){for(var t in ot("/Font <<"),_t)_t.hasOwnProperty(t)&&(!1===w||!0===w&&N.hasOwnProperty(t))&&ot("/"+t+" "+_t[t].objectNumber+" 0 R");ot(">>")},pe=function(){if(Object.keys(kt).length>0){for(var t in ot("/Shading <<"),kt)kt.hasOwnProperty(t)&&kt[t]instanceof d&&kt[t].objectNumber>=0&&ot("/"+t+" "+kt[t].objectNumber+" 0 R");Mt.publish("putShadingPatternDict"),ot(">>")}},ge=function(t){if(Object.keys(kt).length>0){for(var e in ot("/Pattern <<"),kt)kt.hasOwnProperty(e)&&kt[e]instanceof L.TilingPattern&&kt[e].objectNumber>=0&&kt[e].objectNumber>")}},me=function(){if(Object.keys(It).length>0){var t;for(t in ot("/ExtGState <<"),It)It.hasOwnProperty(t)&&It[t].objectNumber>=0&&ot("/"+t+" "+It[t].objectNumber+" 0 R");Mt.publish("putGStateDict"),ot(">>")}},ve=function(t){Gt(t.resourcesOid,!0),ot("<<"),ot("/ProcSet [/PDF /Text /ImageB /ImageC /ImageI]"),de(),pe(),ge(t.objectOid),me(),fe(),ot(">>"),ot("endobj")},be=function(){var t=[];re(),le(),ae(),ce(t),Mt.publish("putResources"),t.forEach(ve),ve({resourcesOid:Xt,objectOid:Number.MAX_SAFE_INTEGER}),Mt.publish("postPutResources")},ye=function(){Mt.publish("putAdditionalObjects");for(var t=0;t>8&&(u=!0);t=s.join("")}for(n=t.length;void 0===u&&0!==n;)t.charCodeAt(n-1)>>8&&(u=!0),n--;if(!u)return t;for(s=e.noBOM?[]:[254,255],n=0,r=t.length;n>8)>>8)throw new Error("Character at position "+n+" of string '"+t+"' exceeds 16bits. Cannot be encoded into UCS-2 BE");s.push(h),s.push(c-(h<<8))}return String.fromCharCode.apply(void 0,s)},_e=L.__private__.pdfEscape=L.pdfEscape=function(t,e){return Ae(t,e).replace(/\\/g,"\\\\").replace(/\(/g,"\\(").replace(/\)/g,"\\)")},Se=L.__private__.beginPage=function(t){et[++Bt]=[],Ot[Bt]={objId:0,contentsObjId:0,userUnit:Number(v),artBox:null,bleedBox:null,cropBox:null,trimBox:null,mediaBox:{bottomLeftX:0,bottomLeftY:0,topRightX:Number(t[0]),topRightY:Number(t[1])}},Fe(Bt),at(et[Y])},Pe=function(t,e){var r,a,s;switch(i=e||i,"string"==typeof t&&(r=S(t.toLowerCase()),Array.isArray(r)&&(a=r[0],s=r[1])),Array.isArray(t)&&(a=t[0]*Nt,s=t[1]*Nt),isNaN(a)&&(a=o[0],s=o[1]),(a>14400||s>14400)&&(n.warn("A page in a PDF can not be wider or taller than 14400 userUnit. jsPDF limits the width/height to 14400"),a=Math.min(14400,a),s=Math.min(14400,s)),o=[a,s],i.substr(0,1)){case"l":s>a&&(o=[s,a]);break;case"p":a>s&&(o=[s,a])}Se(o),on(an),ot(pn),0!==wn&&ot(wn+" J"),0!==Nn&&ot(Nn+" j"),Mt.publish("addPage",{pageNumber:Bt})},ke=function(t){t>0&&t<=Bt&&(et.splice(t,1),Ot.splice(t,1),Bt--,Y>Bt&&(Y=Bt),this.setPage(Y))},Fe=function(t){t>0&&t<=Bt&&(Y=t)},Ie=L.__private__.getNumberOfPages=L.getNumberOfPages=function(){return et.length-1},Ce=function(t,e,r){var i,a=void 0;return r=r||{},t=void 0!==t?t:_t[wt].fontName,e=void 0!==e?e:_t[wt].fontStyle,i=t.toLowerCase(),void 0!==St[i]&&void 0!==St[i][e]?a=St[i][e]:void 0!==St[t]&&void 0!==St[t][e]?a=St[t][e]:!1===r.disableWarning&&n.warn("Unable to look up font label for font '"+t+"', '"+e+"'. Refer to getFontList() for available fonts."),a||r.noFallback||null==(a=St.times[e])&&(a=St.times.normal),a},je=L.__private__.putInfo=function(){for(var t in Wt(),ot("<<"),ot("/Producer (jsPDF "+g.version+")"),yt)yt.hasOwnProperty(t)&&yt[t]&&ot("/"+t.substr(0,1).toUpperCase()+t.substr(1)+" ("+_e(yt[t])+")");ot("/CreationDate ("+T+")"),ot(">>"),ot("endobj")},Be=L.__private__.putCatalog=function(t){var e=(t=t||{}).rootDictionaryObjId||Jt;switch(Wt(),ot("<<"),ot("/Type /Catalog"),ot("/Pages "+e+" 0 R"),lt||(lt="fullwidth"),lt){case"fullwidth":ot("/OpenAction [3 0 R /FitH null]");break;case"fullheight":ot("/OpenAction [3 0 R /FitV null]");break;case"fullpage":ot("/OpenAction [3 0 R /Fit]");break;case"original":ot("/OpenAction [3 0 R /XYZ null null 1]");break;default:var n=""+lt;"%"===n.substr(n.length-1)&&(lt=parseInt(lt)/100),"number"==typeof lt&&ot("/OpenAction [3 0 R /XYZ null null "+O(lt)+"]")}switch(mt||(mt="continuous"),mt){case"continuous":ot("/PageLayout /OneColumn");break;case"single":ot("/PageLayout /SinglePage");break;case"two":case"twoleft":ot("/PageLayout /TwoColumnLeft");break;case"tworight":ot("/PageLayout /TwoColumnRight")}pt&&ot("/PageMode /"+pt),Mt.publish("putCatalog"),ot(">>"),ot("endobj")},Oe=L.__private__.putTrailer=function(){ot("trailer"),ot("<<"),ot("/Size "+(K+1)),ot("/Root "+K+" 0 R"),ot("/Info "+(K-1)+" 0 R"),ot("/ID [ <"+D+"> <"+D+"> ]"),ot(">>")},Me=L.__private__.putHeader=function(){ot("%PDF-"+x),ot("%ºß¬à")},Ee=L.__private__.putXRef=function(){var t="0000000000";ot("xref"),ot("0 "+(K+1)),ot("0000000000 65535 f ");for(var e=1;e<=K;e++){"function"==typeof Z[e]?ot((t+Z[e]()).slice(-10)+" 00000 n "):void 0!==Z[e]?ot((t+Z[e]).slice(-10)+" 00000 n "):ot("0000000000 00000 n ")}},qe=L.__private__.buildDocument=function(){it(),at($),Mt.publish("buildDocument"),Me(),ee(),ye(),be(),je(),Be();var t=Q;return Ee(),Oe(),ot("startxref"),ot(""+t),ot("%%EOF"),at(et[Y]),$.join("\n")},Re=L.__private__.getBlob=function(t){return new Blob([ut(t)],{type:"application/pdf"})},Te=L.output=L.__private__.output=xe((function(e,r){switch("string"==typeof(r=r||{})?r={filename:r}:r.filename=r.filename||"generated.pdf",e){case void 0:return qe();case"save":L.save(r.filename);break;case"arraybuffer":return ut(qe());case"blob":return Re(qe());case"bloburi":case"bloburl":if(void 0!==t.URL&&"function"==typeof t.URL.createObjectURL)return t.URL&&t.URL.createObjectURL(Re(qe()))||void 0;n.warn("bloburl is not supported by your system, because URL.createObjectURL is not supported by your browser.");break;case"datauristring":case"dataurlstring":var i="",a=qe();try{i=s(a)}catch(t){i=s(unescape(encodeURIComponent(a)))}return"data:application/pdf;filename="+r.filename+";base64,"+i;case"pdfobjectnewwindow":if("[object Window]"===Object.prototype.toString.call(t)){var o='