UNPKG

html-pdf-adaptive

Version:
1 lines 486 kB
define(function(){"use strict";var St="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:{};function t(t,e){return t(e={exports:{}},e.exports),e.exports}var nt=t(function(t){var e=function(o){var a,t=Object.prototype,u=t.hasOwnProperty,e="function"==typeof Symbol?Symbol:{},n=e.iterator||"@@iterator",A=e.asyncIterator||"@@asyncIterator",r=e.toStringTag||"@@toStringTag";function s(t,e,A,r){var i,o,s,a,n=e&&e.prototype instanceof B?e:B,c=Object.create(n.prototype),u=new E(r||[]);return c._invoke=(i=t,o=A,s=u,a=h,function(t,e){if(a===d)throw new Error("Generator is already running");if(a===p){if("throw"===t)throw e;return L()}for(s.method=t,s.arg=e;;){var A=s.delegate;if(A){var r=F(A,s);if(r){if(r===g)continue;return r}}if("next"===s.method)s.sent=s._sent=s.arg;else if("throw"===s.method){if(a===h)throw a=p,s.arg;s.dispatchException(s.arg)}else"return"===s.method&&s.abrupt("return",s.arg);a=d;var n=l(i,o,s);if("normal"===n.type){if(a=s.done?p:f,n.arg===g)continue;return{value:n.arg,done:s.done}}"throw"===n.type&&(a=p,s.method="throw",s.arg=n.arg)}}),c}function l(t,e,A){try{return{type:"normal",arg:t.call(e,A)}}catch(t){return{type:"throw",arg:t}}}o.wrap=s;var h="suspendedStart",f="suspendedYield",d="executing",p="completed",g={};function B(){}function i(){}function c(){}var w={};w[n]=function(){return this};var m=Object.getPrototypeOf,v=m&&m(m(N([])));v&&v!==t&&u.call(v,n)&&(w=v);var y=c.prototype=B.prototype=Object.create(w);function C(t){["next","throw","return"].forEach(function(e){t[e]=function(t){return this._invoke(e,t)}})}function Q(a,c){var e;this._invoke=function(A,r){function t(){return new c(function(t,e){!function e(t,A,r,n){var i=l(a[t],a,A);if("throw"!==i.type){var o=i.arg,s=o.value;return s&&"object"==typeof s&&u.call(s,"__await")?c.resolve(s.__await).then(function(t){e("next",t,r,n)},function(t){e("throw",t,r,n)}):c.resolve(s).then(function(t){o.value=t,r(o)},function(t){return e("throw",t,r,n)})}n(i.arg)}(A,r,t,e)})}return e=e?e.then(t,t):t()}}function F(t,e){var A=t.iterator[e.method];if(A===a){if(e.delegate=null,"throw"===e.method){if(t.iterator.return&&(e.method="return",e.arg=a,F(t,e),"throw"===e.method))return g;e.method="throw",e.arg=new TypeError("The iterator does not provide a 'throw' method")}return g}var r=l(A,t.iterator,e.arg);if("throw"===r.type)return e.method="throw",e.arg=r.arg,e.delegate=null,g;var n=r.arg;return n?n.done?(e[t.resultName]=n.value,e.next=t.nextLoc,"return"!==e.method&&(e.method="next",e.arg=a),e.delegate=null,g):n:(e.method="throw",e.arg=new TypeError("iterator result is not an object"),e.delegate=null,g)}function b(t){var e={tryLoc:t[0]};1 in t&&(e.catchLoc=t[1]),2 in t&&(e.finallyLoc=t[2],e.afterLoc=t[3]),this.tryEntries.push(e)}function U(t){var e=t.completion||{};e.type="normal",delete e.arg,t.completion=e}function E(t){this.tryEntries=[{tryLoc:"root"}],t.forEach(b,this),this.reset(!0)}function N(e){if(e){var t=e[n];if(t)return t.call(e);if("function"==typeof e.next)return e;if(!isNaN(e.length)){var A=-1,r=function t(){for(;++A<e.length;)if(u.call(e,A))return t.value=e[A],t.done=!1,t;return t.value=a,t.done=!0,t};return r.next=r}}return{next:L}}function L(){return{value:a,done:!0}}return i.prototype=y.constructor=c,c.constructor=i,c[r]=i.displayName="GeneratorFunction",o.isGeneratorFunction=function(t){var e="function"==typeof t&&t.constructor;return!!e&&(e===i||"GeneratorFunction"===(e.displayName||e.name))},o.mark=function(t){return Object.setPrototypeOf?Object.setPrototypeOf(t,c):(t.__proto__=c,r in t||(t[r]="GeneratorFunction")),t.prototype=Object.create(y),t},o.awrap=function(t){return{__await:t}},C(Q.prototype),Q.prototype[A]=function(){return this},o.AsyncIterator=Q,o.async=function(t,e,A,r,n){void 0===n&&(n=Promise);var i=new Q(s(t,e,A,r),n);return o.isGeneratorFunction(e)?i:i.next().then(function(t){return t.done?t.value:i.next()})},C(y),y[r]="Generator",y[n]=function(){return this},y.toString=function(){return"[object Generator]"},o.keys=function(A){var r=[];for(var t in A)r.push(t);return r.reverse(),function t(){for(;r.length;){var e=r.pop();if(e in A)return t.value=e,t.done=!1,t}return t.done=!0,t}},o.values=N,E.prototype={constructor:E,reset:function(t){if(this.prev=0,this.next=0,this.sent=this._sent=a,this.done=!1,this.delegate=null,this.method="next",this.arg=a,this.tryEntries.forEach(U),!t)for(var e in this)"t"===e.charAt(0)&&u.call(this,e)&&!isNaN(+e.slice(1))&&(this[e]=a)},stop:function(){this.done=!0;var t=this.tryEntries[0].completion;if("throw"===t.type)throw t.arg;return this.rval},dispatchException:function(A){if(this.done)throw A;var r=this;function t(t,e){return i.type="throw",i.arg=A,r.next=t,e&&(r.method="next",r.arg=a),!!e}for(var e=this.tryEntries.length-1;0<=e;--e){var n=this.tryEntries[e],i=n.completion;if("root"===n.tryLoc)return t("end");if(n.tryLoc<=this.prev){var o=u.call(n,"catchLoc"),s=u.call(n,"finallyLoc");if(o&&s){if(this.prev<n.catchLoc)return t(n.catchLoc,!0);if(this.prev<n.finallyLoc)return t(n.finallyLoc)}else if(o){if(this.prev<n.catchLoc)return t(n.catchLoc,!0)}else{if(!s)throw new Error("try statement without catch or finally");if(this.prev<n.finallyLoc)return t(n.finallyLoc)}}}},abrupt:function(t,e){for(var A=this.tryEntries.length-1;0<=A;--A){var r=this.tryEntries[A];if(r.tryLoc<=this.prev&&u.call(r,"finallyLoc")&&this.prev<r.finallyLoc){var n=r;break}}n&&("break"===t||"continue"===t)&&n.tryLoc<=e&&e<=n.finallyLoc&&(n=null);var i=n?n.completion:{};return i.type=t,i.arg=e,n?(this.method="next",this.next=n.finallyLoc,g):this.complete(i)},complete:function(t,e){if("throw"===t.type)throw t.arg;return"break"===t.type||"continue"===t.type?this.next=t.arg:"return"===t.type?(this.rval=this.arg=t.arg,this.method="return",this.next="end"):"normal"===t.type&&e&&(this.next=e),g},finish:function(t){for(var e=this.tryEntries.length-1;0<=e;--e){var A=this.tryEntries[e];if(A.finallyLoc===t)return this.complete(A.completion,A.afterLoc),U(A),g}},catch:function(t){for(var e=this.tryEntries.length-1;0<=e;--e){var A=this.tryEntries[e];if(A.tryLoc===t){var r=A.completion;if("throw"===r.type){var n=r.arg;U(A)}return n}}throw new Error("illegal catch attempt")},delegateYield:function(t,e,A){return this.delegate={iterator:N(t),resultName:e,nextLoc:A},"next"===this.method&&(this.arg=a),g}},o}(t.exports);try{regeneratorRuntime=e}catch(t){Function("r","regeneratorRuntime = r")(e)}});function a(t,e,A,r,n,i,o){try{var s=t[i](o),a=s.value}catch(t){return void A(t)}s.done?e(a):Promise.resolve(a).then(r,n)}var it=function(s){return function(){var t=this,o=arguments;return new Promise(function(e,A){var r=s.apply(t,o);function n(t){a(r,e,A,n,i,"next",t)}function i(t){a(r,e,A,n,i,"throw",t)}n(void 0)})}},ot=t(function(Ht,xt){!function(){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,A,r=t.console,n=function(){},i=["memory"],o="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=i.pop();)r[e]||(r[e]={});for(;A=o.pop();)r[A]||(r[A]=n)}var s,a,c,u,l="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=";void 0===t.btoa&&(t.btoa=function(t){var e,A,r,n,i,o=0,s=0,a="",c=[];if(!t)return t;for(;e=(i=t.charCodeAt(o++)<<16|t.charCodeAt(o++)<<8|t.charCodeAt(o++))>>18&63,A=i>>12&63,r=i>>6&63,n=63&i,c[s++]=l.charAt(e)+l.charAt(A)+l.charAt(r)+l.charAt(n),o<t.length;);a=c.join("");var u=t.length%3;return(u?a.slice(0,u-3):a)+"===".slice(u||3)}),void 0===t.atob&&(t.atob=function(t){var e,A,r,n,i,o,s=0,a=0,c=[];if(!t)return t;for(t+="";e=(o=l.indexOf(t.charAt(s++))<<18|l.indexOf(t.charAt(s++))<<12|(n=l.indexOf(t.charAt(s++)))<<6|(i=l.indexOf(t.charAt(s++))))>>16&255,A=o>>8&255,r=255&o,c[a++]=64==n?String.fromCharCode(e):64==i?String.fromCharCode(e,A):String.fromCharCode(e,A,r),s<t.length;);return c.join("")}),Array.prototype.map||(Array.prototype.map=function(t){if(null==this||"function"!=typeof t)throw new TypeError;for(var e=Object(this),A=e.length>>>0,r=new Array(A),n=1<arguments.length?arguments[1]:void 0,i=0;i<A;i++)i in e&&(r[i]=t.call(n,e[i],i,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 A=Object(this),r=A.length>>>0,n=0;n<r;n++)n in A&&t.call(e,A[n],n,A)}),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),A=e.length>>>0;if("function"!=typeof t)throw new TypeError("predicate must be a function");for(var r=arguments[1],n=0;n<A;){var i=e[n];if(t.call(r,i,n,e))return i;n++}},configurable:!0,writable:!0}),Object.keys||(Object.keys=(s=Object.prototype.hasOwnProperty,a=!{toString:null}.propertyIsEnumerable("toString"),u=(c=["toString","toLocaleString","valueOf","hasOwnProperty","isPrototypeOf","propertyIsEnumerable","constructor"]).length,function(t){if("object"!==se(t)&&("function"!=typeof t||null===t))throw new TypeError;var e,A,r=[];for(e in t)s.call(t,e)&&r.push(e);if(a)for(A=0;A<u;A++)s.call(t,c[A])&&r.push(c[A]);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 A=arguments[e];if(null!=A)for(var r in A)Object.prototype.hasOwnProperty.call(A,r)&&(t[r]=A[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 St&&St||Function('return typeof this === "object" && this.content')()||Function("return this")());var t,e,A,U,a,E,N,f,d,L,o,i,s,c,u,l,r,n,h,p,g,B,w,m,v,y,H,x,S,C,Q,F,b,I,_,T,O,R,P,M,K,D,k,z,j,q,V,X,G,J,W,Y,Z,$,tt,et,At,rt,nt,it,ot,st,at=function(ne){function ie(i){if("object"!==se(i))throw new Error("Invalid Context passed to initialize PubSub (jsPDF-module)");var o={};this.subscribe=function(t,e,A){if(A=A||!1,"string"!=typeof t||"function"!=typeof e||"boolean"!=typeof A)throw new Error("Invalid arguments passed to PubSub.subscribe (jsPDF-module)");o.hasOwnProperty(t)||(o[t]={});var r=Math.random().toString(35);return o[t][r]=[e,!!A],r},this.unsubscribe=function(t){for(var e in o)if(o[e][t])return delete o[e][t],0===Object.keys(o[e]).length&&delete o[e],!0;return!1},this.publish=function(t){if(o.hasOwnProperty(t)){var e=Array.prototype.slice.call(arguments,1),A=[];for(var r in o[t]){var n=o[t][r];try{n[0].apply(i,e)}catch(t){ne.console&&console.error("jsPDF PubSub Error",t.message,t)}n[1]&&A.push(r)}A.length&&A.forEach(this.unsubscribe)}},this.getTopics=function(){return o}}function oe(t,e,n,A){var r={},i=[],o=1;"object"===se(t)&&(t=(r=t).orientation,e=r.unit||e,n=r.format||n,A=r.compress||r.compressPdf||A,i=r.filters||(!0===A?["FlateEncode"]:i),o="number"==typeof r.userUnit?Math.abs(r.userUnit):1),e=e||"mm",t=(""+(t||"P")).toLowerCase();var s=r.putOnlyUsedFonts||!0,W={},a={internal:{},__private__:{}};a.__private__.PubSub=ie;var c="1.3",u=a.__private__.getPdfVersion=function(){return c},l=(a.__private__.setPdfVersion=function(t){c=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]}),h=(a.__private__.getPageFormats=function(){return l},a.__private__.getPageFormat=function(t){return l[t]});"string"==typeof n&&(n=h(n)),n=n||h("a4");var f,Y=a.f2=a.__private__.f2=function(t){if(isNaN(t))throw new Error("Invalid argument passed to jsPDF.f2");return t.toFixed(2)},Z=a.__private__.f3=function(t){if(isNaN(t))throw new Error("Invalid argument passed to jsPDF.f3");return t.toFixed(3)},d="00000000000000000000000000000000",p=a.__private__.getFileId=function(){return d},g=a.__private__.setFileId=function(t){return t=t||"12345678901234567890123456789012".split("").map(function(){return"ABCDEF0123456789".charAt(Math.floor(16*Math.random()))}).join(""),d=t};a.setFileId=function(t){return g(t),this},a.getFileId=function(){return p()};var B=a.__private__.convertDateToPDFDate=function(t){var e=t.getTimezoneOffset(),A=e<0?"+":"-",r=Math.floor(Math.abs(e/60)),n=Math.abs(e%60),i=[A,N(r),"'",N(n),"'"].join("");return["D:",t.getFullYear(),N(t.getMonth()+1),N(t.getDate()),N(t.getHours()),N(t.getMinutes()),N(t.getSeconds()),i].join("")},w=a.__private__.convertPDFDateToDate=function(t){var e=parseInt(t.substr(2,4),10),A=parseInt(t.substr(6,2),10)-1,r=parseInt(t.substr(8,2),10),n=parseInt(t.substr(10,2),10),i=parseInt(t.substr(12,2),10),o=parseInt(t.substr(14,2),10);parseInt(t.substr(16,2),10),parseInt(t.substr(20,2),10);return new Date(e,A,r,n,i,o,0)},m=a.__private__.setCreationDate=function(t){var e;if(void 0===t&&(t=new Date),"object"===se(t)&&"[object Date]"===Object.prototype.toString.call(t))e=B(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 f=e},v=a.__private__.getCreationDate=function(t){var e=f;return"jsDate"===t&&(e=w(f)),e};a.setCreationDate=function(t){return m(t),this},a.getCreationDate=function(t){return v(t)};var y,C,Q,F,b,$,U,E,N=a.__private__.padd2=function(t){return("0"+parseInt(t)).slice(-2)},L=!1,H=[],x=[],S=0,tt=(a.__private__.setCustomOutputDestination=function(t){C=t},a.__private__.resetCustomOutputDestination=function(t){C=void 0},a.__private__.out=function(t){var e;return t="string"==typeof t?t:t.toString(),(e=void 0===C?L?H[y]:x:C).push(t),L||(S+=t.length+1),e}),I=a.__private__.write=function(t){return tt(1===arguments.length?t.toString():Array.prototype.join.call(arguments," "))},_=a.__private__.getArrayBuffer=function(t){for(var e=t.length,A=new ArrayBuffer(e),r=new Uint8Array(A);e--;)r[e]=t.charCodeAt(e);return A},T=[["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=(a.__private__.getStandardFonts=function(t){return T},r.fontSize||16),O=(a.__private__.setFontSize=a.setFontSize=function(t){return et=t,this},a.__private__.getFontSize=a.getFontSize=function(){return et}),At=r.R2L||!1,R=(a.__private__.setR2L=a.setR2L=function(t){return At=t,this},a.__private__.getR2L=a.getR2L=function(t){return At},a.__private__.setZoomMode=function(t){var e=[void 0,null,"fullwidth","fullheight","fullpage","original"];if(/^\d*\.?\d*\%$/.test(t))Q=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.');Q=t}else Q=parseInt(t,10)}),P=(a.__private__.getZoomMode=function(){return Q},a.__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.');F=t}),M=(a.__private__.getPageMode=function(){return F},a.__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.');b=t}),K=(a.__private__.getLayoutMode=function(){return b},a.__private__.setDisplayMode=a.setDisplayMode=function(t,e,A){return R(t),M(e),P(A),this},{title:"",subject:"",author:"",keywords:"",creator:""}),D=(a.__private__.getDocumentProperty=function(t){if(-1===Object.keys(K).indexOf(t))throw new Error("Invalid argument passed to jsPDF.getDocumentProperty");return K[t]},a.__private__.getDocumentProperties=function(t){return K},a.__private__.setDocumentProperties=a.setProperties=a.setDocumentProperties=function(t){for(var e in K)K.hasOwnProperty(e)&&t[e]&&(K[e]=t[e]);return this},a.__private__.setDocumentProperty=function(t,e){if(-1===Object.keys(K).indexOf(t))throw new Error("Invalid arguments passed to jsPDF.setDocumentProperty");return K[t]=e},0),k=[],rt={},z={},j=0,q=[],V=[],nt=new ie(a),X=r.hotfixes||[],G=a.__private__.newObject=function(){var t=J();return it(t,!0),t},J=a.__private__.newObjectDeferred=function(){return k[++D]=function(){return S},D},it=function(t,e){return e="boolean"==typeof e&&e,k[t]=S,e&&tt(t+" 0 obj"),t},ot=a.__private__.newAdditionalObject=function(){var t={objId:J(),content:""};return V.push(t),t},st=J(),at=J(),ct=a.__private__.decodeColorString=function(t){var e=t.split(" ");if(2===e.length&&("g"===e[1]||"G"===e[1])){var A=parseFloat(e[0]);e=[A,A,A,"r"]}for(var r="#",n=0;n<3;n++)r+=("0"+Math.floor(255*parseFloat(e[n])).toString(16)).slice(-2);return r},ut=a.__private__.encodeColorString=function(t){var e;"string"==typeof t&&(t={ch1:t});var A=t.ch1,r=t.ch2,n=t.ch3,i=t.ch4,o=(t.precision,"draw"===t.pdfColorType?["G","RG","K"]:["g","rg","k"]);if("string"==typeof A&&"#"!==A.charAt(0)){var s=new RGBColor(A);if(s.ok)A=s.toHex();else if(!/^\d*\.?\d*$/.test(A))throw new Error('Invalid color "'+A+'" passed to jsPDF.encodeColorString.')}if("string"==typeof A&&/^#[0-9A-Fa-f]{3}$/.test(A)&&(A="#"+A[1]+A[1]+A[2]+A[2]+A[3]+A[3]),"string"==typeof A&&/^#[0-9A-Fa-f]{6}$/.test(A)){var a=parseInt(A.substr(1),16);A=a>>16&255,r=a>>8&255,n=255&a}if(void 0===r||void 0===i&&A===r&&r===n){if("string"==typeof A)e=A+" "+o[0];else switch(t.precision){case 2:e=Y(A/255)+" "+o[0];break;case 3:default:e=Z(A/255)+" "+o[0]}}else if(void 0===i||"object"===se(i)){if(i&&!isNaN(i.a)&&0===i.a)return e=["1.000","1.000","1.000",o[1]].join(" ");if("string"==typeof A)e=[A,r,n,o[1]].join(" ");else switch(t.precision){case 2:e=[Y(A/255),Y(r/255),Y(n/255),o[1]].join(" ");break;default:case 3:e=[Z(A/255),Z(r/255),Z(n/255),o[1]].join(" ")}}else if("string"==typeof A)e=[A,r,n,i,o[2]].join(" ");else switch(t.precision){case 2:e=[Y(A/255),Y(r/255),Y(n/255),Y(i/255),o[2]].join(" ");break;case 3:default:e=[Z(A/255),Z(r/255),Z(n/255),Z(i/255),o[2]].join(" ")}return e},lt=a.__private__.getFilters=function(){return i},ht=a.__private__.putStream=function(t){var e=(t=t||{}).data||"",A=t.filters||lt(),r=t.alreadyAppliedFilters||[],n=t.addLength1||!1,i=e.length,o={};!0===A&&(A=["FlateEncode"]);var s=t.additionalKeyValues||[],a=(o=void 0!==oe.API.processDataByFilters?oe.API.processDataByFilters(e,A):{data:e,reverseChain:[]}).reverseChain+(Array.isArray(r)?r.join(" "):r.toString());0!==o.data.length&&(s.push({key:"Length",value:o.data.length}),!0===n&&s.push({key:"Length1",value:i})),0!=a.length&&(a.split("/").length-1==1?s.push({key:"Filter",value:a}):s.push({key:"Filter",value:"["+a+"]"})),tt("<<");for(var c=0;c<s.length;c++)tt("/"+s[c].key+" "+s[c].value);tt(">>"),0!==o.data.length&&(tt("stream"),tt(o.data),tt("endstream"))},ft=a.__private__.putPage=function(t){t.mediaBox;var e=t.number,A=t.data,r=t.objId,n=t.contentsObjId;it(r,!0);q[y].mediaBox.topRightX,q[y].mediaBox.bottomLeftX,q[y].mediaBox.topRightY,q[y].mediaBox.bottomLeftY;tt("<</Type /Page"),tt("/Parent "+t.rootDictionaryObjId+" 0 R"),tt("/Resources "+t.resourceDictionaryObjId+" 0 R"),tt("/MediaBox ["+parseFloat(Y(t.mediaBox.bottomLeftX))+" "+parseFloat(Y(t.mediaBox.bottomLeftY))+" "+Y(t.mediaBox.topRightX)+" "+Y(t.mediaBox.topRightY)+"]"),null!==t.cropBox&&tt("/CropBox ["+Y(t.cropBox.bottomLeftX)+" "+Y(t.cropBox.bottomLeftY)+" "+Y(t.cropBox.topRightX)+" "+Y(t.cropBox.topRightY)+"]"),null!==t.bleedBox&&tt("/BleedBox ["+Y(t.bleedBox.bottomLeftX)+" "+Y(t.bleedBox.bottomLeftY)+" "+Y(t.bleedBox.topRightX)+" "+Y(t.bleedBox.topRightY)+"]"),null!==t.trimBox&&tt("/TrimBox ["+Y(t.trimBox.bottomLeftX)+" "+Y(t.trimBox.bottomLeftY)+" "+Y(t.trimBox.topRightX)+" "+Y(t.trimBox.topRightY)+"]"),null!==t.artBox&&tt("/ArtBox ["+Y(t.artBox.bottomLeftX)+" "+Y(t.artBox.bottomLeftY)+" "+Y(t.artBox.topRightX)+" "+Y(t.artBox.topRightY)+"]"),"number"==typeof t.userUnit&&1!==t.userUnit&&tt("/UserUnit "+t.userUnit),nt.publish("putPage",{objId:r,pageContext:q[e],pageNumber:e,page:A}),tt("/Contents "+n+" 0 R"),tt(">>"),tt("endobj");var i=A.join("\n");return it(n,!0),ht({data:i,filters:lt()}),tt("endobj"),r},dt=a.__private__.putPages=function(){var t,e,A=[];for(t=1;t<=j;t++)q[t].objId=J(),q[t].contentsObjId=J();for(t=1;t<=j;t++)A.push(ft({number:t,data:H[t],objId:q[t].objId,contentsObjId:q[t].contentsObjId,mediaBox:q[t].mediaBox,cropBox:q[t].cropBox,bleedBox:q[t].bleedBox,trimBox:q[t].trimBox,artBox:q[t].artBox,userUnit:q[t].userUnit,rootDictionaryObjId:st,resourceDictionaryObjId:at}));it(st,!0),tt("<</Type /Pages");var r="/Kids [";for(e=0;e<j;e++)r+=A[e]+" 0 R ";tt(r+"]"),tt("/Count "+j),tt(">>"),tt("endobj"),nt.publish("postPutPages")},pt=function(){!function(){for(var t in rt)rt.hasOwnProperty(t)&&(!1===s||!0===s&&W.hasOwnProperty(t))&&(e=rt[t],nt.publish("putFont",{font:e,out:tt,newObject:G,putStream:ht}),!0!==e.isAlreadyPutted&&(e.objectNumber=G(),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}(),nt.publish("putResources"),it(at,!0),tt("<<"),function(){for(var t in tt("/ProcSet [/PDF /Text /ImageB /ImageC /ImageI]"),tt("/Font <<"),rt)rt.hasOwnProperty(t)&&(!1===s||!0===s&&W.hasOwnProperty(t))&&tt("/"+t+" "+rt[t].objectNumber+" 0 R");tt(">>"),tt("/XObject <<"),nt.publish("putXobjectDict"),tt(">>")}(),tt(">>"),tt("endobj"),nt.publish("postPutResources")},gt=function(t,e,A){z.hasOwnProperty(e)||(z[e]={}),z[e][A]=t},Bt=function(t,e,A,r,n){n=n||!1;var i="F"+(Object.keys(rt).length+1).toString(10),o={id:i,postScriptName:t,fontName:e,fontStyle:A,encoding:r,isStandardFont:n,metadata:{}};return nt.publish("addFont",{font:o,instance:this}),void 0!==i&&(rt[i]=o,gt(i,e,A)),i},wt=a.__private__.pdfEscape=a.pdfEscape=function(t,e){return function(t,e){var A,r,n,i,o,s,a,c,u;if(n=(e=e||{}).sourceEncoding||"Unicode",o=e.outputEncoding,(e.autoencode||o)&&rt[$].metadata&&rt[$].metadata[n]&&rt[$].metadata[n].encoding&&(i=rt[$].metadata[n].encoding,!o&&rt[$].encoding&&(o=rt[$].encoding),!o&&i.codePages&&(o=i.codePages[0]),"string"==typeof o&&(o=i[o]),o)){for(a=!1,s=[],A=0,r=t.length;A<r;A++)(c=o[t.charCodeAt(A)])?s.push(String.fromCharCode(c)):s.push(t[A]),s[A].charCodeAt(0)>>8&&(a=!0);t=s.join("")}for(A=t.length;void 0===a&&0!==A;)t.charCodeAt(A-1)>>8&&(a=!0),A--;if(!a)return t;for(s=e.noBOM?[]:[254,255],A=0,r=t.length;A<r;A++){if((u=(c=t.charCodeAt(A))>>8)>>8)throw new Error("Character at position "+A+" of string '"+t+"' exceeds 16bits. Cannot be encoded into UCS-2 BE");s.push(u),s.push(c-(u<<8))}return String.fromCharCode.apply(void 0,s)}(t,e).replace(/\\/g,"\\\\").replace(/\(/g,"\\(").replace(/\)/g,"\\)")},mt=a.__private__.beginPage=function(t,e){var A,r="string"==typeof e&&e.toLowerCase();if("string"==typeof t&&(A=h(t.toLowerCase()))&&(t=A[0],e=A[1]),Array.isArray(t)&&(e=t[1],t=t[0]),(isNaN(t)||isNaN(e))&&(t=n[0],e=n[1]),r){switch(r.substr(0,1)){case"l":t<e&&(r="s");break;case"p":e<t&&(r="s")}"s"===r&&(A=t,t=e,e=A)}(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)),n=[t,e],L=!0,H[++j]=[],q[j]={objId:0,contentsObjId:0,userUnit:Number(o),artBox:null,bleedBox:null,cropBox:null,trimBox:null,mediaBox:{bottomLeftX:0,bottomLeftY:0,topRightX:Number(t),topRightY:Number(e)}},yt(j)},vt=function(){mt.apply(this,arguments),Kt(Mt),tt(Gt),0!==te&&tt(te+" J"),0!==Ae&&tt(Ae+" j"),nt.publish("addPage",{pageNumber:j})},yt=function(t){0<t&&t<=j&&(y=t)},Ct=a.__private__.getNumberOfPages=a.getNumberOfPages=function(){return H.length-1},Qt=function(t,e,A){var r,n=void 0;return A=A||{},t=void 0!==t?t:rt[$].fontName,e=void 0!==e?e:rt[$].fontStyle,r=t.toLowerCase(),void 0!==z[r]&&void 0!==z[r][e]?n=z[r][e]:void 0!==z[t]&&void 0!==z[t][e]?n=z[t][e]:!1===A.disableWarning&&console.warn("Unable to look up font label for font '"+t+"', '"+e+"'. Refer to getFontList() for available fonts."),n||A.noFallback||null==(n=z.times[e])&&(n=z.times.normal),n},Ft=a.__private__.putInfo=function(){for(var t in G(),tt("<<"),tt("/Producer (jsPDF "+oe.version+")"),K)K.hasOwnProperty(t)&&K[t]&&tt("/"+t.substr(0,1).toUpperCase()+t.substr(1)+" ("+wt(K[t])+")");tt("/CreationDate ("+f+")"),tt(">>"),tt("endobj")},bt=a.__private__.putCatalog=function(t){var e=(t=t||{}).rootDictionaryObjId||st;switch(G(),tt("<<"),tt("/Type /Catalog"),tt("/Pages "+e+" 0 R"),Q||(Q="fullwidth"),Q){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 A=""+Q;"%"===A.substr(A.length-1)&&(Q=parseInt(Q)/100),"number"==typeof Q&&tt("/OpenAction [3 0 R /XYZ null null "+Y(Q)+"]")}switch(b||(b="continuous"),b){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")}F&&tt("/PageMode /"+F),nt.publish("putCatalog"),tt(">>"),tt("endobj")},Ut=a.__private__.putTrailer=function(){tt("trailer"),tt("<<"),tt("/Size "+(D+1)),tt("/Root "+D+" 0 R"),tt("/Info "+(D-1)+" 0 R"),tt("/ID [ <"+d+"> <"+d+"> ]"),tt(">>")},Et=a.__private__.putHeader=function(){tt("%PDF-"+c),tt("%ºß¬à")},Nt=a.__private__.putXRef=function(){var t=1,e="0000000000";for(tt("xref"),tt("0 "+(D+1)),tt("0000000000 65535 f "),t=1;t<=D;t++){"function"==typeof k[t]?tt((e+k[t]()).slice(-10)+" 00000 n "):void 0!==k[t]?tt((e+k[t]).slice(-10)+" 00000 n "):tt("0000000000 00000 n ")}},Lt=a.__private__.buildDocument=function(){L=!1,S=D=0,x=[],k=[],V=[],st=J(),at=J(),nt.publish("buildDocument"),Et(),dt(),function(){nt.publish("putAdditionalObjects");for(var t=0;t<V.length;t++){var e=V[t];it(e.objId,!0),tt(e.content),tt("endobj")}nt.publish("postPutAdditionalObjects")}(),pt(),Ft(),bt();var t=S;return Nt(),Ut(),tt("startxref"),tt(""+t),tt("%%EOF"),L=!0,x.join("\n")},Ht=a.__private__.getBlob=function(t){return new Blob([_(t)],{type:"application/pdf"})},xt=a.output=a.__private__.output=((E=function(t,e){e=e||{};var A=Lt();switch("string"==typeof e?e={filename:e}:e.filename=e.filename||"generated.pdf",t){case void 0:return A;case"save":a.save(e.filename);break;case"arraybuffer":return _(A);case"blob":return Ht(A);case"bloburi":case"bloburl":if(void 0!==ne.URL&&"function"==typeof ne.URL.createObjectURL)return ne.URL&&ne.URL.createObjectURL(Ht(A))||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(A);case"dataurlnewwindow":var r='<html><style>html, body { padding: 0; margin: 0; } iframe { width: 100%; height: 100%; border: 0;} </style><body><iframe src="'+this.output("datauristring")+'"></iframe></body></html>',n=ne.open();if(null!==n&&n.document.write(r),n||"undefined"==typeof safari)return n;case"datauri":case"dataurl":return ne.document.location.href="data:application/pdf;filename="+e.filename+";base64,"+btoa(A);default:return null}}).foo=function(){try{return E.apply(this,arguments)}catch(t){var e=t.stack||"";~e.indexOf(" at ")&&(e=e.split(" at ")[1]);var A="Error in function "+e.split("\n")[0].split("<")[0]+": "+t.message;if(!ne.console)throw new Error(A);ne.console.error(A,t),ne.alert&&alert(A)}},(E.foo.bar=E).foo),St=function(t){return!0===Array.isArray(X)&&-1<X.indexOf(t)};switch(e){case"pt":U=1;break;case"mm":U=72/25.4;break;case"cm":U=72/2.54;break;case"in":U=72;break;case"px":U=1==St("px_scaling")?.75:96/72;break;case"pc":case"em":U=12;break;case"ex":U=6;break;default:throw new Error("Invalid unit: "+e)}m(),g();var It=a.__private__.getPageInfo=function(t){if(isNaN(t)||t%1!=0)throw new Error("Invalid argument passed to jsPDF.getPageInfo");return{objId:q[t].objId,pageNumber:t,pageContext:q[t]}},_t=a.__private__.getPageInfoByObjId=function(t){for(var e in q)if(q[e].objId===t)break;if(isNaN(t)||t%1!=0)throw new Error("Invalid argument passed to jsPDF.getPageInfoByObjId");return It(e)},Tt=a.__private__.getCurrentPageInfo=function(){return{objId:q[y].objId,pageNumber:y,pageContext:q[y]}};a.addPage=function(){return vt.apply(this,arguments),this},a.setPage=function(){return yt.apply(this,arguments),this},a.insertPage=function(t){return this.addPage(),this.movePage(y,t),this},a.movePage=function(t,e){if(e<t){for(var A=H[t],r=q[t],n=t;e<n;n--)H[n]=H[n-1],q[n]=q[n-1];H[e]=A,q[e]=r,this.setPage(e)}else if(t<e){for(A=H[t],r=q[t],n=t;n<e;n++)H[n]=H[n+1],q[n]=q[n+1];H[e]=A,q[e]=r,this.setPage(e)}return this},a.deletePage=function(){return function(t){0<t&&t<=j&&(H.splice(t,1),--j<y&&(y=j),this.setPage(y))}.apply(this,arguments),this};a.__private__.text=a.text=function(t,e,A,n){var r;"number"!=typeof t||"number"!=typeof e||"string"!=typeof A&&!Array.isArray(A)||(r=A,A=e,e=t,t=r);var i=arguments[3],o=arguments[4],s=arguments[5];if("object"===se(i)&&null!==i||("string"==typeof o&&(s=o,o=null),"string"==typeof i&&(s=i,i=null),"number"==typeof i&&(o=i,i=null),n={flags:i,angle:o,align:s}),(i=i||{}).noBOM=i.noBOM||!0,i.autoencode=i.autoencode||!0,isNaN(e)||isNaN(A)||null==t)throw new Error("Invalid arguments passed to jsPDF.text");if(0===t.length)return l;var a,c="",u="number"==typeof n.lineHeightFactor?n.lineHeightFactor:Pt,l=n.scope||this;function h(t){for(var e,A=t.concat(),r=[],n=A.length;n--;)"string"==typeof(e=A.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 f(t,e){var A;if("string"==typeof t)A=e(t)[0];else if(Array.isArray(t)){for(var r,n,i=t.concat(),o=[],s=i.length;s--;)"string"==typeof(r=i.shift())?o.push(e(r)[0]):Array.isArray(r)&&"string"===r[0]&&(n=e(r[0],r[1],r[2]),o.push([n[0],n[1],n[2]]));A=o}return A}var d=!1,p=!0;if("string"==typeof t)d=!0;else if(Array.isArray(t)){for(var g,B=t.concat(),w=[],m=B.length;m--;)("string"!=typeof(g=B.shift())||Array.isArray(g)&&"string"!=typeof g[0])&&(p=!1);d=p}if(!1===d)throw new Error('Type of text must be string or Array. "'+t+'" is not recognized.');var v=rt[$].encoding;"WinAnsiEncoding"!==v&&"StandardEncoding"!==v||(t=f(t,function(t,e,A){return[(r=t,r=r.split("\t").join(Array(n.TabLen||9).join(" ")),wt(r,i)),e,A];var r})),"string"==typeof t&&(t=t.match(/[\r?\n]/)?t.split(/\r\n|\r|\n/g):[t]);var y=et/l.internal.scaleFactor,C=y*(Pt-1);switch(n.baseline){case"bottom":A-=C;break;case"top":A+=y-C;break;case"hanging":A+=y-2*C;break;case"middle":A+=y/2-C}0<(O=n.maxWidth||0)&&("string"==typeof t?t=l.splitTextToSize(t,O):"[object Array]"===Object.prototype.toString.call(t)&&(t=l.splitTextToSize(t.join(" "),O)));var Q={text:t,x:e,y:A,options:n,mutex:{pdfEscape:wt,activeFontKey:$,fonts:rt,activeFontSize:et}};nt.publish("preProcessText",Q),t=Q.text;o=(n=Q.options).angle;var F=l.internal.scaleFactor,b=[];if(o){o*=Math.PI/180;var U=Math.cos(o),E=Math.sin(o);b=[Y(U),Y(E),Y(-1*E),Y(U)]}void 0!==(T=n.charSpace)&&(c+=Z(T*F)+" Tc\n");n.lang;var N=-1,L=void 0!==n.renderingMode?n.renderingMode:n.stroke,H=l.internal.getCurrentPageInfo().pageContext;switch(L){case 0:case!1:case"fill":N=0;break;case 1:case!0:case"stroke":N=1;break;case 2:case"fillThenStroke":N=2;break;case 3:case"invisible":N=3;break;case 4:case"fillAndAddForClipping":N=4;break;case 5:case"strokeAndAddPathForClipping":N=5;break;case 6:case"fillThenStrokeAndAddToPathForClipping":N=6;break;case 7:case"addToPathForClipping":N=7}var x=void 0!==H.usedRenderingMode?H.usedRenderingMode:-1;-1!==N?c+=N+" Tr\n":-1!==x&&(c+="0 Tr\n"),-1!==N&&(H.usedRenderingMode=N);s=n.align||"left";var S=et*u,I=l.internal.pageSize.getWidth(),_=(F=l.internal.scaleFactor,rt[$]),T=n.charSpace||Zt,O=n.maxWidth||0,R=(i={},[]);if("[object Array]"===Object.prototype.toString.call(t)){var P,M;w=h(t);"left"!==s&&(M=w.map(function(t){return l.getStringUnitWidth(t,{font:_,charSpace:T,fontSize:et})*et/F}));var K,D=Math.max.apply(Math,M),k=0;if("right"===s){e-=M[0],t=[];var z=0;for(m=w.length;z<m;z++)D-M[z],P=0===z?(K=jt(e),qt(A)):(K=(k-M[z])*F,-S),t.push([w[z],K,P]),k=M[z]}else if("center"===s){e-=M[0]/2,t=[];for(z=0,m=w.length;z<m;z++)(D-M[z])/2,P=0===z?(K=jt(e),qt(A)):(K=(k-M[z])/2*F,-S),t.push([w[z],K,P]),k=M[z]}else if("left"===s){t=[];for(z=0,m=w.length;z<m;z++)P=0===z?qt(A):-S,K=0===z?jt(e):0,t.push(w[z])}else{if("justify"!==s)throw new Error('Unrecognized alignment option, use "left", "center", "right" or "justify".');t=[];for(O=0!==O?O:I,z=0,m=w.length;z<m;z++)P=0===z?qt(A):-S,K=0===z?jt(e):0,z<m-1&&R.push(((O-M[z])/(w[z].split(" ").length-1)*F).toFixed(2)),t.push([w[z],K,P])}}!0===("boolean"==typeof n.R2L?n.R2L:At)&&(t=f(t,function(t,e,A){return[t.split("").reverse().join(""),e,A]}));Q={text:t,x:e,y:A,options:n,mutex:{pdfEscape:wt,activeFontKey:$,fonts:rt,activeFontSize:et}};nt.publish("postProcessText",Q),t=Q.text,a=Q.mutex.isHex;w=h(t);t=[];var j,q,V,X=0,G=(m=w.length,"");for(z=0;z<m;z++)G="",Array.isArray(w[z])?(j=parseFloat(w[z][1]),q=parseFloat(w[z][2]),V=(a?"<":"(")+w[z][0]+(a?">":")"),X=1):(j=jt(e),q=qt(A),V=(a?"<":"(")+w[z]+(a?">":")")),void 0!==R&&void 0!==R[z]&&(G=R[z]+" Tw\n"),0!==b.length&&0===z?t.push(G+b.join(" ")+" "+j.toFixed(2)+" "+q.toFixed(2)+" Tm\n"+V):1===X||0===X&&0===z?t.push(G+j.toFixed(2)+" "+q.toFixed(2)+" Td\n"+V):t.push(G+V);t=0===X?t.join(" Tj\nT* "):t.join(" Tj\n"),t+=" Tj\n";var J="BT\n/"+$+" "+et+" Tf\n"+(et*u).toFixed(2)+" TL\n"+Wt+"\n";return J+=c,J+=t,tt(J+="ET"),W[$]=!0,l},a.__private__.lstext=a.lstext=function(t,e,A,r){return console.warn("jsPDF.lstext is deprecated"),this.text(t,e,A,{charSpace:r})},a.__private__.clip=a.clip=function(t){tt("evenodd"===t?"W*":"W"),tt("n")},a.__private__.clip_fixed=a.clip_fixed=function(t){console.log("clip_fixed is deprecated"),a.clip(t)};var Ot=a.__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},Rt=a.__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};a.__private__.line=a.line=function(t,e,A,r){if(isNaN(t)||isNaN(e)||isNaN(A)||isNaN(r))throw new Error("Invalid arguments passed to jsPDF.line");return this.lines([[A-t,r-e]],t,e)},a.__private__.lines=a.lines=function(t,e,A,r,n,i){var o,s,a,c,u,l,h,f,d,p,g,B;if("number"==typeof t&&(B=A,A=e,e=t,t=B),r=r||[1,1],i=i||!1,isNaN(e)||isNaN(A)||!Array.isArray(t)||!Array.isArray(r)||!Ot(n)||"boolean"!=typeof i)throw new Error("Invalid arguments passed to jsPDF.lines");for(tt(Z(jt(e))+" "+Z(qt(A))+" m "),o=r[0],s=r[1],c=t.length,p=e,g=A,a=0;a<c;a++)2===(u=t[a]).length?(p=u[0]*o+p,g=u[1]*s+g,tt(Z(jt(p))+" "+Z(qt(g))+" l")):(l=u[0]*o+p,h=u[1]*s+g,f=u[2]*o+p,d=u[3]*s+g,p=u[4]*o+p,g=u[5]*s+g,tt(Z(jt(l))+" "+Z(qt(h))+" "+Z(jt(f))+" "+Z(qt(d))+" "+Z(jt(p))+" "+Z(qt(g))+" c"));return i&&tt(" h"),null!==n&&tt(Rt(n)),this},a.__private__.rect=a.rect=function(t,e,A,r,n){if(isNaN(t)||isNaN(e)||isNaN(A)||isNaN(r)||!Ot(n))throw new Error("Invalid arguments passed to jsPDF.rect");return tt([Y(jt(t)),Y(qt(e)),Y(A*U),Y(-r*U),"re"].join(" ")),null!==n&&tt(Rt(n)),this},a.__private__.triangle=a.triangle=function(t,e,A,r,n,i,o){if(isNaN(t)||isNaN(e)||isNaN(A)||isNaN(r)||isNaN(n)||isNaN(i)||!Ot(o))throw new Error("Invalid arguments passed to jsPDF.triangle");return this.lines([[A-t,r-e],[n-A,i-r],[t-n,e-i]],t,e,[1,1],o,!0),this},a.__private__.roundedRect=a.roundedRect=function(t,e,A,r,n,i,o){if(isNaN(t)||isNaN(e)||isNaN(A)||isNaN(r)||isNaN(n)||isNaN(i)||!Ot(o))throw new Error("Invalid arguments passed to jsPDF.roundedRect");var s=4/3*(Math.SQRT2-1);return this.lines([[A-2*n,0],[n*s,0,n,i-i*s,n,i],[0,r-2*i],[0,i*s,-n*s,i,-n,i],[2*n-A,0],[-n*s,0,-n,-i*s,-n,-i],[0,2*i-r],[0,-i*s,n*s,-i,n,-i]],t+n,e,[1,1],o),this},a.__private__.ellipse=a.ellipse=function(t,e,A,r,n){if(isNaN(t)||isNaN(e)||isNaN(A)||isNaN(r)||!Ot(n))throw new Error("Invalid arguments passed to jsPDF.ellipse");var i=4/3*(Math.SQRT2-1)*A,o=4/3*(Math.SQRT2-1)*r;return tt([Y(jt(t+A)),Y(qt(e)),"m",Y(jt(t+A)),Y(qt(e-o)),Y(jt(t+i)),Y(qt(e-r)),Y(jt(t)),Y(qt(e-r)),"c"].join(" ")),tt([Y(jt(t-i)),Y(qt(e-r)),Y(jt(t-A)),Y(qt(e-o)),Y(jt(t-A)),Y(qt(e)),"c"].join(" ")),tt([Y(jt(t-A)),Y(qt(e+o)),Y(jt(t-i)),Y(qt(e+r)),Y(jt(t)),Y(qt(e+r)),"c"].join(" ")),tt([Y(jt(t+i)),Y(qt(e+r)),Y(jt(t+A)),Y(qt(e+o)),Y(jt(t+A)),Y(qt(e)),"c"].join(" ")),null!==n&&tt(Rt(n)),this},a.__private__.circle=a.circle=function(t,e,A,r){if(isNaN(t)||isNaN(e)||isNaN(A)||!Ot(r))throw new Error("Invalid arguments passed to jsPDF.circle");return this.ellipse(t,e,A,A,r)};a.setFont=function(t,e){return $=Qt(t,e,{disableWarning:!1}),this},a.setFontStyle=a.setFontType=function(t){return $=Qt(void 0,t),this};a.__private__.getFontList=a.getFontList=function(){var t,e,A,r={};for(t in z)if(z.hasOwnProperty(t))for(e in r[t]=A=[],z[t])z[t].hasOwnProperty(e)&&A.push(e);return r};a.addFont=function(t,e,A,r){Bt.call(this,t,e,A,r=r||"Identity-H")};var Pt,Mt=r.lineWidth||.200025,Kt=a.__private__.setLineWidth=a.setLineWidth=function(t){return tt((t*U).toFixed(2)+" w"),this},Dt=(a.__private__.setLineDash=oe.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*U).toFixed(3)}).join(" "),e=parseFloat((e*U).toFixed(3)),tt("["+t+"] "+e+" d"),this},a.__private__.getLineHeight=a.getLineHeight=function(){return et*Pt}),kt=(Dt=a.__private__.getLineHeight=a.getLineHeight=function(){return et*Pt},a.__private__.setLineHeightFactor=a.setLineHeightFactor=function(t){return"number"==typeof(t=t||1.15)&&(Pt=t),this}),zt=a.__private__.getLineHeightFactor=a.getLineHeightFactor=function(){return Pt};kt(r.lineHeight);var jt=a.__private__.getHorizontalCoordinate=function(t){return t*U},qt=a.__private__.getVerticalCoordinate=function(t){return q[y].mediaBox.topRightY-q[y].mediaBox.bottomLeftY-t*U},Vt=a.__private__.getHorizontalCoordinateString=function(t){return Y(t*U)},Xt=a.__private__.getVerticalCoordinateString=function(t){return Y(q[y].mediaBox.topRightY-q[y].mediaBox.bottomLeftY-t*U)},Gt=r.strokeColor||"0 G",Jt=(a.__private__.getStrokeColor=a.getDrawColor=function(){return ct(Gt)},a.__private__.setStrokeColor=a.setDrawColor=function(t,e,A,r){return Gt=ut({ch1:t,ch2:e,ch3:A,ch4:r,pdfColorType:"draw",precision:2}),tt(Gt),this},r.fillColor||"0 g"),Wt=(a.__private__.getFillColor=a.getFillColor=function(){return ct(Jt)},a.__private__.setFillColor=a.setFillColor=function(t,e,A,r){return Jt=ut({ch1:t,ch2:e,ch3:A,ch4:r,pdfColorType:"fill",precision:2}),tt(Jt),this},r.textColor||"0 g"),Yt=a.__private__.getTextColor=a.getTextColor=function(){return ct(Wt)},Zt=(a.__private__.setTextColor=a.setTextColor=function(t,e,A,r){return Wt=ut({ch1:t,ch2:e,ch3:A,ch4:r,pdfColorType:"text",precision:3}),this},r.charSpace||0),$t=a.__private__.getCharSpace=a.getCharSpace=function(){return Zt},te=(a.__private__.setCharSpace=a.setCharSpace=function(t){if(isNaN(t))throw new Error("Invalid argument passed to jsPDF.setCharSpace");return Zt=t,this},0);a.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};a.__private__.setLineCap=a.setLineCap=function(t){var e=a.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,Ae=0;a.__private__.setLineJoin=a.setLineJoin=function(t){var e=a.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((Ae=e)+" j"),this},a.__private__.setMiterLimit=a.setMiterLimit=function(t){if(t=t||0,isNaN(t))throw new Error("Invalid argument passed to jsPDF.setMiterLimit");return ee=parseFloat(Y(t*U)),tt(ee+" M"),this};for(var re in a.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 A=ae(Ht(Lt()),r);"function"==typeof ae.unload&&ne.setTimeout&&setTimeout(ae.unload,911),t(A)}catch(t){e(t.message)}});ae(Ht(Lt()),r),"function"==typeof ae.unload&&ne.setTimeout&&setTimeout(ae.unload,911)},oe.API)oe.API.hasOwnProperty(re)&&("events"===re&&oe.API.events.length?function(t,e){var A,r,n;for(n=e.length-1;-1!==n;n--)A=e[n][0],r=e[n][1],t.subscribe.apply(t,[A].concat("function"==typeof r?[r]:r))}(nt,oe.API.events):a[re]=oe.API[re]);return a.internal={pdfEscape:wt,getStyle:Rt,getFont:function(){return rt[Qt.apply(a,arguments)]},getFontSize:O,getCharSpace:$t,getTextColor:Yt,getLineHeight:Dt,getLineHeightFactor:zt,write:I,getHorizontalCoordinate:jt,getVerticalCoordinate:qt,getCoordinateString:Vt,getVerticalCoordinateString:Xt,collections:{},newObject:G,newAdditionalObject:ot,newObjectDeferred:J,newObjectDeferredBegin:it,getFilters:lt,putStream:ht,events:nt,scaleFactor:U,pageSize:{getWidth:function(){return(q[y].mediaBox.topRightX-q[y].mediaBox.bottomLeftX)/U},setWidth:function(t){q[y].mediaBox.topRightX=t*U+q[y].mediaBox.bottomLeftX},getHeight:function(){return(q[y].mediaBox.topRightY-q[y].mediaBox.bottomLeftY)/U},setHeight:function(t){q[y].mediaBox.topRightY=t*U+q[y].mediaBox.bottomLeftY}},output:xt,getNumberOfPages:Ct,pages:H,out:tt,f2:Y,f3:Z,getPageInfo:It,getPageInfoByObjId:_t,getCurrentPageInfo:Tt,getPDFVersion:u,hasHotfix:St},Object.defineProperty(a.internal.pageSize,"width",{get:function(){return(q[y].mediaBox.topRightX-q[y].mediaBox.bottomLeftX)/U},set:function(t){q[y].mediaBox.topRightX=t*U+q[y].mediaBox.bottomLeftX},enumerable:!0,configurable:!0}),Object.defineProperty(a.internal.pageSize,"height",{get:function(){return(q[y].mediaBox.topRightY-q[y].mediaBox.bottomLeftY)/U},set:function(t){q[y].mediaBox.topRightY=t*U+q[y].mediaBox.bottomLeftY},enumerable:!0,configurable:!0}),function(t){for(var e=0,A=T.length;e<A;e++){var r=Bt(t[e][0],t[e][1],t[e][2],T[e][3],!0);W[r]=!0;var n=t[e][0].split("-");gt(r,n[0],n[1]||"")}nt.publish("addFonts",{fonts:rt,dictionary:z})}(T),$="F1",vt(n,t),nt.publish("initialized"),a}return oe.API={events:[]},oe.version="1.5.3",Ht.exports?(Ht.exports=oe,Ht.exports.jsPDF=oe):ne.jsPDF=oe,oe}("undefined"!=typeof self&&self||"undefined"!=typeof window&&window||"undefined"!=typeof St&&St||Function('return typeof this === "object" && this.content')()||Function("return this")());(function(t,e){var F,A=1,b=function(t){return t.replace(/\\/g,"\\\\").replace(/\(/g,"\\(").replace(/\)/g,"\\)")},B=function(t){return t.replace(/\\\\/g,"\\").replace(/\\\(/g,"(").replace(/\\\)/g,")")},U=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},w=function(t){return t*A},m=function(t){return t/A},a=function(t){var e=new I,A=X.internal.getHeight(t)||0,r=X.internal.getWidth(t)||0;return e.BBox=[0,0,Number(U(r)),Number(U(A))],e},n=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},i=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)},o=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},v=t.__acroform__.getBitForPdf=function(t,e){if(isNaN(t)||isNaN(e))throw new Error("Invalid arguments passed to jsPDF.API.__acroform__.getBitForPdf");return o(t,e-1)},y=t.__acroform__.setBitForPdf=function(t,e){if(isNaN(t)||isNaN(e))throw new Error("Invalid arguments passed to jsPDF.API.__acroform__.setBitForPdf");return n(t,e-1)},C=t.__acroform__.clearBitForPdf=function(t,e,A){if(isNaN(t)||isNaN(e))throw new Error("Invalid arguments passed to jsPDF.API.__acroform__.clearBitForPdf");return i(t,e-1)},l=t.__acroform__.calculateCoordinates=function(t){var e=this.internal.getHorizontalCoordinate,A=this.internal.getVerticalCoordinate,r=t[0],n=t[1],i=t[2],o=t[3],s={};return s.lowerLeft_X=e(r)||0,s.lowerLeft_Y=A(n+o)||0,s.upperRight_X=e(r+i)||0,s.upperRight_Y=A(n)||0,[Number(U(s.lowerLeft_X)),Number(U(s.lowerLeft_Y)),Number(U(s.upperRight_X)),Number(U(s.upperRight_Y))]},h=function(t){if(t.appearanceStreamContent)return t.appearanceStreamContent;if(t.V||t.DV){var e=[],A=t.V||t.DV,r=c(t,A),n=F.internal.getFont(t.fontName,t.fontStyle).id;e.push("/Tx BMC"),e.push("q"),e.push("BT"),e.push(F.__private__.encodeColorString(t.color)),e.push("/"+n+" "+U(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 i=new a(t);return i.stream=e.join("\n"),i}},c=function(n,t){var e=n.maxFontSize||12,A=(n.fontName,{text:"",fontSize:""}),i=(t=")"==(t="("==t.substr(0,1)?t.substr(1):t).substr(t.length-1)?t.substr(0,t.length-1):t).split(" "),r=(F.__private__.encodeColorString(n.color),e),o=X.internal.getHeight(n)||0;o=o<0?-o:o;var s=X.internal.getWidth(n)||0;s=s<0?-s:s;var a=function(t,e,A){if(t+1<i.length){var r=e+" "+i[t+1];return E(r,n,A).width<=s-4}return!1};r++;t:for(;;){t="";var c=E("3",n,--r).height,u=n.multiline?o-r:(o-c)/2,l=-2,h=u+=2,f=0,d=0,p=0;if(r<=0){t="(...) Tj\n",t+="% Width of Text: "+E(t,n,r=12).width+", FieldWidth:"+s+"\n";break}p=E(i[0]+" ",n,r).width;var g="",B=0;for(var w in i)if(i.hasOwnProperty(w)){g=" "==(g+=i[w]+" ").substr(g.length-1)?g.substr(0,g.length-1):g;var m=parseInt(w);p=E(g+" ",n,r).width;var v=a(m,g,r),y=w>=i.length-1;if(v&&!y){g+=" ";continue}if(v||y){if(y)d=m;else if(n.multiline&&o<(c+2)*(B+2)+2)continue t}else{if(!n.multiline)continue t;if(o<(c+2)*(B+2)+2)continue t;d=m}for(var C="",Q=f;Q<=d;Q++)C+=i[Q]+" ";switch(C=" "==C.substr(C.length-1)?C.substr(0,C.length-1):C,p=E(C,n,r).width,n.textAlign){case"right":l=s-p-2;break;case"center":l=(s-p)/2;break;case"left":default:l=2}t+=U(l)+" "+U(h)+" Td\n",t+="("+b(C)+") Tj\n",t+=-U(l)+" 0 Td\n",h=-(r+2),p=0,f=d+1,B++,g=""}break}return A.text=t,A.fontSize=r,A},E=function(t,e,A){var r=F.internal.getFont(e.fontName,e.fontStyle),n=F.getStringUnitWidth(t,{font:r,fontSize:parseFloat(A),charSpace:0})*parseFloat(A);return{height:F.getStringUnitWidth("3",{font:r,fontSize:parseFloat(A),charSpace:0})*parseFloat(A)*1.5,width:n}},u={fields:[],xForms:[],acroFormDictionaryRoot:null,printedOut:!1,internal:null,isInitialized:!1},f=function(){F.internal.acroformPlugin.acroFormDictionaryRoot.objId=void 0;var t=F.internal.acroformPlugin.acroFormDictionaryRoot.Fields;for(var e in t)if(t.hasOwnProperty(e)){var A=t[e];A.objId=void 0,A.hasAnnotation&&d.call(F,A)}},d=function(t){var e={type:"reference",object:t};void 0===F.internal.getPageInfo(t.page).pageContext.annotations.find(function(t){return t.type===e.type&&t.object===e.object})&&F.internal.getPageInfo(t.page).pageContext.annotations.push(e)},p=function(){if(void 0===F.internal.acroformPlugin.acroFormDictionaryRoot)throw new Error("putCatalogCallback: Root missing.");F.internal.write("/AcroForm "+F.internal.acroformPlugin.acroFormDictionaryRoot.objId+" 0 R")},g=function(){F.internal.events.unsubscribe(F.internal.acroformPlugin.acroFormDictionaryRoot._eventID),delete F.internal.acroformPlugin.acroFormDictionaryRoot._eventID,F.internal.acroformPlugin.printedOut=!0},Q=function(t){var e=!t;t||(F.internal.newObjectDeferredBegin(F.internal.acroformPlugin.acroFormDictionaryRoot.objId,!0),F.internal.acroformPlugin.acroFormDictionaryRoot.putStream());t=t||F.internal.acroformPlugin.acroFormDictionaryRoot.Kids;for(var A in t)if(t.hasOwnProperty(A)){var r=t[A],n=[],i=r.Rect;if(r.Rect&&(r.Rect=l.call(this,r.Rect)),F.internal.newObjectDeferredBegin(r.objId,!0),r.DA=X.createDefaultAppearanceStream(r),"object"===