From 4f3707adaafa415462f078e721f676bf42b4467e Mon Sep 17 00:00:00 2001 From: Tiavina Date: Fri, 7 Mar 2025 17:10:49 +0300 Subject: [PATCH] finish send pdf from frontend, wip save pdf state --- gestion/js/factureShow.app.js | 2 +- gestion/lib/Db/Bdd.php | 6 +++++- gestion/src/js/factureShow.js | 1 + gestion/templates/content/factureshow.php | 23 ++++++++++++++++++++++- 4 files changed, 29 insertions(+), 3 deletions(-) diff --git a/gestion/js/factureShow.app.js b/gestion/js/factureShow.app.js index e06173d..7733e64 100644 --- a/gestion/js/factureShow.app.js +++ b/gestion/js/factureShow.app.js @@ -1,2 +1,2 @@ /*! For license information please see factureShow.app.js.LICENSE.txt */ -(()=>{var e,n,r,a,o={2:(t,e,n)=>{var r=n(6926),a=n(9310);(t.exports=function(t,e){return a[t]||(a[t]=void 0!==e?e:{})})("versions",[]).push({version:"3.28.0",mode:r?"pure":"global",copyright:"© 2014-2023 Denis Pushkarev (zloirock.ru)",license:"https://github.com/zloirock/core-js/blob/v3.28.0/LICENSE",source:"https://github.com/zloirock/core-js"})},54:(t,e,n)=>{"use strict";var r,a,o=n(2368),i=n(281),A=n(5362),s=n(6844),l=n(2192),c=n(2),d=n(3105),u=n(9206).get,p=n(1036),f=n(8121),h=c("native-string-replace",String.prototype.replace),g=RegExp.prototype.exec,m=g,b=i("".charAt),v=i("".indexOf),w=i("".replace),y=i("".slice),x=(a=/b*/g,o(g,r=/a/,"a"),o(g,a,"a"),0!==r.lastIndex||0!==a.lastIndex),B=l.BROKEN_CARET,C=void 0!==/()??/.exec("")[1];(x||C||B||p||f)&&(m=function(t){var e,n,r,a,i,l,c,p=this,f=u(p),F=A(t),U=f.raw;if(U)return U.lastIndex=p.lastIndex,e=o(m,U,F),p.lastIndex=U.lastIndex,e;var Q=f.groups,T=B&&p.sticky,L=o(s,p),_=p.source,S=0,k=F;if(T&&(L=w(L,"y",""),-1===v(L,"g")&&(L+="g"),k=y(F,p.lastIndex),p.lastIndex>0&&(!p.multiline||p.multiline&&"\n"!==b(F,p.lastIndex-1))&&(_="(?: "+_+")",k=" "+k,S++),n=new RegExp("^(?:"+_+")",L)),C&&(n=new RegExp("^"+_+"$(?!\\s)",L)),x&&(r=p.lastIndex),a=o(g,T?n:p,k),T?a?(a.input=y(a.input,S),a[0]=y(a[0],S),a.index=p.lastIndex,p.lastIndex+=a[0].length):p.lastIndex=0:x&&a&&(p.lastIndex=p.global?a.index+a[0].length:r),C&&a&&a.length>1&&o(h,a[0],n,(function(){for(i=1;i{"use strict";var r=n(9070),a=n(2368),o=n(281),i=n(779),A=n(2074),s=n(3938),l=n(8420),c=n(8406),d=n(9328),u=n(3747),p=n(5362),f=n(1229),h=n(7234),g=n(6457),m=n(4433),b=n(6793),v=n(1602)("replace"),w=Math.max,y=Math.min,x=o([].concat),B=o([].push),C=o("".indexOf),F=o("".slice),U="$0"==="a".replace(/./,"$0"),Q=!!/./[v]&&""===/./[v]("a","$0");i("replace",(function(t,e,n){var o=Q?"$":"$0";return[function(t,n){var r=f(this),o=c(t)?void 0:g(t,v);return o?a(o,t,r,n):a(e,p(r),t,n)},function(t,a){var i=s(this),A=p(t);if("string"==typeof a&&-1===C(a,o)&&-1===C(a,"$<")){var c=n(e,i,A,a);if(c.done)return c.value}var f=l(a);f||(a=p(a));var g=i.global;if(g){var v=i.unicode;i.lastIndex=0}for(var U=[];;){var Q=b(i,A);if(null===Q)break;if(B(U,Q),!g)break;""===p(Q[0])&&(i.lastIndex=h(A,u(i.lastIndex),v))}for(var T,L="",_=0,S=0;S=_&&(L+=F(A,_,E)+P,_=E+k.length)}return L+F(A,_)}]}),!!A((function(){var t=/./;return t.exec=function(){var t=[];return t.groups={a:"7"},t},"7"!=="".replace(t,"$")}))||!U||Q)},200:(t,e,n)=>{var r=function(t){return t&&t.Math==Math&&t};t.exports=r("object"==typeof globalThis&&globalThis)||r("object"==typeof window&&window)||r("object"==typeof self&&self)||r("object"==typeof n.g&&n.g)||function(){return this}()||Function("return this")()},281:(t,e,n)=>{var r=n(8823),a=Function.prototype,o=a.call,i=r&&a.bind.bind(o,o);t.exports=r?i:function(t){return function(){return o.apply(t,arguments)}}},290:t=>{t.exports=["constructor","hasOwnProperty","isPrototypeOf","propertyIsEnumerable","toLocaleString","toString","valueOf"]},353:(t,e,n)=>{var r=n(2368),a=n(6490),o=n(7658),i=n(6844),A=RegExp.prototype;t.exports=function(t){var e=t.flags;return void 0!==e||"flags"in A||a(t,"flags")||!o(A,t)?e:r(i,t)}},354:function(t){t.exports=function(){"use strict";var t=function(e,n){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n])},t(e,n)};function e(e,n){if("function"!=typeof n&&null!==n)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");function r(){this.constructor=e}t(e,n),e.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}var n=function(){return n=Object.assign||function(t){for(var e,n=1,r=arguments.length;n0&&a[a.length-1])||6!==o[0]&&2!==o[0])){i=0;continue}if(3===o[0]&&(!a||o[1]>a[0]&&o[1]=55296&&a<=56319&&n>10),i%1024+56320)),(a+1===n||r.length>16384)&&(o+=String.fromCharCode.apply(String,r),r.length=0)}return o},c="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",d="undefined"==typeof Uint8Array?[]:new Uint8Array(256),u=0;u<64;u++)d[c.charCodeAt(u)]=u;for(var p="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",f="undefined"==typeof Uint8Array?[]:new Uint8Array(256),h=0;h<64;h++)f[p.charCodeAt(h)]=h;for(var g=function(t,e,n){return t.slice?t.slice(e,n):new Uint16Array(Array.prototype.slice.call(t,e,n))},m=function(){function t(t,e,n,r,a,o){this.initialValue=t,this.errorValue=e,this.highStart=n,this.highValueIndex=r,this.index=a,this.data=o}return t.prototype.get=function(t){var e;if(t>=0){if(t<55296||t>56319&&t<=65535)return e=((e=this.index[t>>5])<<2)+(31&t),this.data[e];if(t<=65535)return e=((e=this.index[2048+(t-55296>>5)])<<2)+(31&t),this.data[e];if(t>11),e=this.index[e],e+=t>>5&63,e=((e=this.index[e])<<2)+(31&t),this.data[e];if(t<=1114111)return this.data[this.highValueIndex]}return this.errorValue},t}(),b="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",v="undefined"==typeof Uint8Array?[]:new Uint8Array(256),w=0;w<64;w++)v[b.charCodeAt(w)]=w;var y=10,x=13,B=15,C=17,F=18,U=19,Q=20,T=21,L=22,_=24,S=25,k=26,E=27,I=28,N=30,D=32,H=33,P=34,O=35,M=37,j=38,R=39,K=40,G=42,q=[9001,65288],z="×",V="÷",W=function(t){var e,n,r,a=function(t){var e,n,r,a,o,i=.75*t.length,A=t.length,s=0;"="===t[t.length-1]&&(i--,"="===t[t.length-2]&&i--);var l="undefined"!=typeof ArrayBuffer&&"undefined"!=typeof Uint8Array&&void 0!==Uint8Array.prototype.slice?new ArrayBuffer(i):new Array(i),c=Array.isArray(l)?l:new Uint8Array(l);for(e=0;e>4,c[s++]=(15&r)<<4|a>>2,c[s++]=(3&a)<<6|63&o;return l}(t),o=Array.isArray(a)?function(t){for(var e=t.length,n=[],r=0;r0;){var i=r[--o];if(Array.isArray(t)?-1!==t.indexOf(i):t===i)for(var A=n;A<=r.length;){var s;if((s=r[++A])===e)return!0;if(s!==y)break}if(i!==y)break}return!1},rt=function(t,e){for(var n=t;n>=0;){var r=e[n];if(r!==y)return r;n--}return 0},at=function(t,e,n,r,a){if(0===n[r])return z;var o=r-1;if(Array.isArray(a)&&!0===a[o])return z;var i=o-1,A=o+1,s=e[o],l=i>=0?e[i]:0,c=e[A];if(2===s&&3===c)return z;if(-1!==X.indexOf(s))return"!";if(-1!==X.indexOf(c))return z;if(-1!==Y.indexOf(c))return z;if(8===rt(o,e))return V;if(11===W.get(t[o]))return z;if((s===D||s===H)&&11===W.get(t[A]))return z;if(7===s||7===c)return z;if(9===s)return z;if(-1===[y,x,B].indexOf(s)&&9===c)return z;if(-1!==[C,F,U,_,I].indexOf(c))return z;if(rt(o,e)===L)return z;if(nt(23,L,o,e))return z;if(nt([C,F],T,o,e))return z;if(nt(12,12,o,e))return z;if(s===y)return V;if(23===s||23===c)return z;if(16===c||16===s)return V;if(-1!==[x,B,T].indexOf(c)||14===s)return z;if(36===l&&-1!==et.indexOf(s))return z;if(s===I&&36===c)return z;if(c===Q)return z;if(-1!==J.indexOf(c)&&s===S||-1!==J.indexOf(s)&&c===S)return z;if(s===E&&-1!==[M,D,H].indexOf(c)||-1!==[M,D,H].indexOf(s)&&c===k)return z;if(-1!==J.indexOf(s)&&-1!==$.indexOf(c)||-1!==$.indexOf(s)&&-1!==J.indexOf(c))return z;if(-1!==[E,k].indexOf(s)&&(c===S||-1!==[L,B].indexOf(c)&&e[A+1]===S)||-1!==[L,B].indexOf(s)&&c===S||s===S&&-1!==[S,I,_].indexOf(c))return z;if(-1!==[S,I,_,C,F].indexOf(c))for(var d=o;d>=0;){if((u=e[d])===S)return z;if(-1===[I,_].indexOf(u))break;d--}if(-1!==[E,k].indexOf(c))for(d=-1!==[C,F].indexOf(s)?i:o;d>=0;){var u;if((u=e[d])===S)return z;if(-1===[I,_].indexOf(u))break;d--}if(j===s&&-1!==[j,R,P,O].indexOf(c)||-1!==[R,P].indexOf(s)&&-1!==[R,K].indexOf(c)||-1!==[K,O].indexOf(s)&&c===K)return z;if(-1!==tt.indexOf(s)&&-1!==[Q,k].indexOf(c)||-1!==tt.indexOf(c)&&s===E)return z;if(-1!==J.indexOf(s)&&-1!==J.indexOf(c))return z;if(s===_&&-1!==J.indexOf(c))return z;if(-1!==J.concat(S).indexOf(s)&&c===L&&-1===q.indexOf(t[A])||-1!==J.concat(S).indexOf(c)&&s===F)return z;if(41===s&&41===c){for(var p=n[o],f=1;p>0&&41===e[--p];)f++;if(f%2!=0)return z}return s===D&&c===H?z:V},ot=function(t,e){e||(e={lineBreak:"normal",wordBreak:"normal"});var n=function(t,e){void 0===e&&(e="strict");var n=[],r=[],a=[];return t.forEach((function(t,o){var i=W.get(t);if(i>50?(a.push(!0),i-=50):a.push(!1),-1!==["normal","auto","loose"].indexOf(e)&&-1!==[8208,8211,12316,12448].indexOf(t))return r.push(o),n.push(16);if(4===i||11===i){if(0===o)return r.push(o),n.push(N);var A=n[o-1];return-1===Z.indexOf(A)?(r.push(r[o-1]),n.push(A)):(r.push(o),n.push(N))}return r.push(o),31===i?n.push("strict"===e?T:M):i===G||29===i?n.push(N):43===i?t>=131072&&t<=196605||t>=196608&&t<=262141?n.push(M):n.push(N):void n.push(i)})),[r,n,a]}(t,e.lineBreak),r=n[0],a=n[1],o=n[2];"break-all"!==e.wordBreak&&"break-word"!==e.wordBreak||(a=a.map((function(t){return-1!==[S,N,G].indexOf(t)?M:t})));var i="keep-all"===e.wordBreak?o.map((function(e,n){return e&&t[n]>=19968&&t[n]<=40959})):void 0;return[r,a,i]},it=function(){function t(t,e,n,r){this.codePoints=t,this.required="!"===e,this.start=n,this.end=r}return t.prototype.slice=function(){return l.apply(void 0,this.codePoints.slice(this.start,this.end))},t}(),At=45,st=43,lt=-1,ct=function(t){return t>=48&&t<=57},dt=function(t){return ct(t)||t>=65&&t<=70||t>=97&&t<=102},ut=function(t){return 10===t||9===t||32===t},pt=function(t){return function(t){return function(t){return t>=97&&t<=122}(t)||function(t){return t>=65&&t<=90}(t)}(t)||function(t){return t>=128}(t)||95===t},ft=function(t){return pt(t)||ct(t)||t===At},ht=function(t){return t>=0&&t<=8||11===t||t>=14&&t<=31||127===t},gt=function(t,e){return 92===t&&10!==e},mt=function(t,e,n){return t===At?pt(e)||gt(e,n):!!pt(t)||!(92!==t||!gt(t,e))},bt=function(t,e,n){return t===st||t===At?!!ct(e)||46===e&&ct(n):ct(46===t?e:t)},vt=function(t){var e=0,n=1;t[e]!==st&&t[e]!==At||(t[e]===At&&(n=-1),e++);for(var r=[];ct(t[e]);)r.push(t[e++]);var a=r.length?parseInt(l.apply(void 0,r),10):0;46===t[e]&&e++;for(var o=[];ct(t[e]);)o.push(t[e++]);var i=o.length,A=i?parseInt(l.apply(void 0,o),10):0;69!==t[e]&&101!==t[e]||e++;var s=1;t[e]!==st&&t[e]!==At||(t[e]===At&&(s=-1),e++);for(var c=[];ct(t[e]);)c.push(t[e++]);var d=c.length?parseInt(l.apply(void 0,c),10):0;return n*(a+A*Math.pow(10,-i))*Math.pow(10,s*d)},wt={type:2},yt={type:3},xt={type:4},Bt={type:13},Ct={type:8},Ft={type:21},Ut={type:9},Qt={type:10},Tt={type:11},Lt={type:12},_t={type:14},St={type:23},kt={type:1},Et={type:25},It={type:24},Nt={type:26},Dt={type:27},Ht={type:28},Pt={type:29},Ot={type:31},Mt={type:32},jt=function(){function t(){this._value=[]}return t.prototype.write=function(t){this._value=this._value.concat(s(t))},t.prototype.read=function(){for(var t=[],e=this.consumeToken();e!==Mt;)t.push(e),e=this.consumeToken();return t},t.prototype.consumeToken=function(){var t=this.consumeCodePoint();switch(t){case 34:return this.consumeStringToken(34);case 35:var e=this.peekCodePoint(0),n=this.peekCodePoint(1),r=this.peekCodePoint(2);if(ft(e)||gt(n,r)){var a=mt(e,n,r)?2:1;return{type:5,value:this.consumeName(),flags:a}}break;case 36:if(61===this.peekCodePoint(0))return this.consumeCodePoint(),Bt;break;case 39:return this.consumeStringToken(39);case 40:return wt;case 41:return yt;case 42:if(61===this.peekCodePoint(0))return this.consumeCodePoint(),_t;break;case st:if(bt(t,this.peekCodePoint(0),this.peekCodePoint(1)))return this.reconsumeCodePoint(t),this.consumeNumericToken();break;case 44:return xt;case At:var o=t,i=this.peekCodePoint(0),A=this.peekCodePoint(1);if(bt(o,i,A))return this.reconsumeCodePoint(t),this.consumeNumericToken();if(mt(o,i,A))return this.reconsumeCodePoint(t),this.consumeIdentLikeToken();if(i===At&&62===A)return this.consumeCodePoint(),this.consumeCodePoint(),It;break;case 46:if(bt(t,this.peekCodePoint(0),this.peekCodePoint(1)))return this.reconsumeCodePoint(t),this.consumeNumericToken();break;case 47:if(42===this.peekCodePoint(0))for(this.consumeCodePoint();;){var s=this.consumeCodePoint();if(42===s&&47===(s=this.consumeCodePoint()))return this.consumeToken();if(s===lt)return this.consumeToken()}break;case 58:return Nt;case 59:return Dt;case 60:if(33===this.peekCodePoint(0)&&this.peekCodePoint(1)===At&&this.peekCodePoint(2)===At)return this.consumeCodePoint(),this.consumeCodePoint(),Et;break;case 64:var c=this.peekCodePoint(0),d=this.peekCodePoint(1),u=this.peekCodePoint(2);if(mt(c,d,u))return{type:7,value:this.consumeName()};break;case 91:return Ht;case 92:if(gt(t,this.peekCodePoint(0)))return this.reconsumeCodePoint(t),this.consumeIdentLikeToken();break;case 93:return Pt;case 61:if(61===this.peekCodePoint(0))return this.consumeCodePoint(),Ct;break;case 123:return Tt;case 125:return Lt;case 117:case 85:var p=this.peekCodePoint(0),f=this.peekCodePoint(1);return p!==st||!dt(f)&&63!==f||(this.consumeCodePoint(),this.consumeUnicodeRangeToken()),this.reconsumeCodePoint(t),this.consumeIdentLikeToken();case 124:if(61===this.peekCodePoint(0))return this.consumeCodePoint(),Ut;if(124===this.peekCodePoint(0))return this.consumeCodePoint(),Ft;break;case 126:if(61===this.peekCodePoint(0))return this.consumeCodePoint(),Qt;break;case lt:return Mt}return ut(t)?(this.consumeWhiteSpace(),Ot):ct(t)?(this.reconsumeCodePoint(t),this.consumeNumericToken()):pt(t)?(this.reconsumeCodePoint(t),this.consumeIdentLikeToken()):{type:6,value:l(t)}},t.prototype.consumeCodePoint=function(){var t=this._value.shift();return void 0===t?-1:t},t.prototype.reconsumeCodePoint=function(t){this._value.unshift(t)},t.prototype.peekCodePoint=function(t){return t>=this._value.length?-1:this._value[t]},t.prototype.consumeUnicodeRangeToken=function(){for(var t=[],e=this.consumeCodePoint();dt(e)&&t.length<6;)t.push(e),e=this.consumeCodePoint();for(var n=!1;63===e&&t.length<6;)t.push(e),e=this.consumeCodePoint(),n=!0;if(n)return{type:30,start:parseInt(l.apply(void 0,t.map((function(t){return 63===t?48:t}))),16),end:parseInt(l.apply(void 0,t.map((function(t){return 63===t?70:t}))),16)};var r=parseInt(l.apply(void 0,t),16);if(this.peekCodePoint(0)===At&&dt(this.peekCodePoint(1))){this.consumeCodePoint(),e=this.consumeCodePoint();for(var a=[];dt(e)&&a.length<6;)a.push(e),e=this.consumeCodePoint();return{type:30,start:r,end:parseInt(l.apply(void 0,a),16)}}return{type:30,start:r,end:r}},t.prototype.consumeIdentLikeToken=function(){var t=this.consumeName();return"url"===t.toLowerCase()&&40===this.peekCodePoint(0)?(this.consumeCodePoint(),this.consumeUrlToken()):40===this.peekCodePoint(0)?(this.consumeCodePoint(),{type:19,value:t}):{type:20,value:t}},t.prototype.consumeUrlToken=function(){var t=[];if(this.consumeWhiteSpace(),this.peekCodePoint(0)===lt)return{type:22,value:""};var e=this.peekCodePoint(0);if(39===e||34===e){var n=this.consumeStringToken(this.consumeCodePoint());return 0===n.type&&(this.consumeWhiteSpace(),this.peekCodePoint(0)===lt||41===this.peekCodePoint(0))?(this.consumeCodePoint(),{type:22,value:n.value}):(this.consumeBadUrlRemnants(),St)}for(;;){var r=this.consumeCodePoint();if(r===lt||41===r)return{type:22,value:l.apply(void 0,t)};if(ut(r))return this.consumeWhiteSpace(),this.peekCodePoint(0)===lt||41===this.peekCodePoint(0)?(this.consumeCodePoint(),{type:22,value:l.apply(void 0,t)}):(this.consumeBadUrlRemnants(),St);if(34===r||39===r||40===r||ht(r))return this.consumeBadUrlRemnants(),St;if(92===r){if(!gt(r,this.peekCodePoint(0)))return this.consumeBadUrlRemnants(),St;t.push(this.consumeEscapedCodePoint())}else t.push(r)}},t.prototype.consumeWhiteSpace=function(){for(;ut(this.peekCodePoint(0));)this.consumeCodePoint()},t.prototype.consumeBadUrlRemnants=function(){for(;;){var t=this.consumeCodePoint();if(41===t||t===lt)return;gt(t,this.peekCodePoint(0))&&this.consumeEscapedCodePoint()}},t.prototype.consumeStringSlice=function(t){for(var e="";t>0;){var n=Math.min(5e4,t);e+=l.apply(void 0,this._value.splice(0,n)),t-=n}return this._value.shift(),e},t.prototype.consumeStringToken=function(t){for(var e="",n=0;;){var r=this._value[n];if(r===lt||void 0===r||r===t)return{type:0,value:e+=this.consumeStringSlice(n)};if(10===r)return this._value.splice(0,n),kt;if(92===r){var a=this._value[n+1];a!==lt&&void 0!==a&&(10===a?(e+=this.consumeStringSlice(n),n=-1,this._value.shift()):gt(r,a)&&(e+=this.consumeStringSlice(n),e+=l(this.consumeEscapedCodePoint()),n=-1))}n++}},t.prototype.consumeNumber=function(){var t=[],e=4,n=this.peekCodePoint(0);for(n!==st&&n!==At||t.push(this.consumeCodePoint());ct(this.peekCodePoint(0));)t.push(this.consumeCodePoint());n=this.peekCodePoint(0);var r=this.peekCodePoint(1);if(46===n&&ct(r))for(t.push(this.consumeCodePoint(),this.consumeCodePoint()),e=8;ct(this.peekCodePoint(0));)t.push(this.consumeCodePoint());n=this.peekCodePoint(0),r=this.peekCodePoint(1);var a=this.peekCodePoint(2);if((69===n||101===n)&&((r===st||r===At)&&ct(a)||ct(r)))for(t.push(this.consumeCodePoint(),this.consumeCodePoint()),e=8;ct(this.peekCodePoint(0));)t.push(this.consumeCodePoint());return[vt(t),e]},t.prototype.consumeNumericToken=function(){var t=this.consumeNumber(),e=t[0],n=t[1],r=this.peekCodePoint(0),a=this.peekCodePoint(1),o=this.peekCodePoint(2);return mt(r,a,o)?{type:15,number:e,flags:n,unit:this.consumeName()}:37===r?(this.consumeCodePoint(),{type:16,number:e,flags:n}):{type:17,number:e,flags:n}},t.prototype.consumeEscapedCodePoint=function(){var t=this.consumeCodePoint();if(dt(t)){for(var e=l(t);dt(this.peekCodePoint(0))&&e.length<6;)e+=l(this.consumeCodePoint());ut(this.peekCodePoint(0))&&this.consumeCodePoint();var n=parseInt(e,16);return 0===n||function(t){return t>=55296&&t<=57343}(n)||n>1114111?65533:n}return t===lt?65533:t},t.prototype.consumeName=function(){for(var t="";;){var e=this.consumeCodePoint();if(ft(e))t+=l(e);else{if(!gt(e,this.peekCodePoint(0)))return this.reconsumeCodePoint(e),t;t+=l(this.consumeEscapedCodePoint())}}},t}(),Rt=function(){function t(t){this._tokens=t}return t.create=function(e){var n=new jt;return n.write(e),new t(n.read())},t.parseValue=function(e){return t.create(e).parseComponentValue()},t.parseValues=function(e){return t.create(e).parseComponentValues()},t.prototype.parseComponentValue=function(){for(var t=this.consumeToken();31===t.type;)t=this.consumeToken();if(32===t.type)throw new SyntaxError("Error parsing CSS component value, unexpected EOF");this.reconsumeToken(t);var e=this.consumeComponentValue();do{t=this.consumeToken()}while(31===t.type);if(32===t.type)return e;throw new SyntaxError("Error parsing CSS component value, multiple values found when expecting only one")},t.prototype.parseComponentValues=function(){for(var t=[];;){var e=this.consumeComponentValue();if(32===e.type)return t;t.push(e),t.push()}},t.prototype.consumeComponentValue=function(){var t=this.consumeToken();switch(t.type){case 11:case 28:case 2:return this.consumeSimpleBlock(t.type);case 19:return this.consumeFunction(t)}return t},t.prototype.consumeSimpleBlock=function(t){for(var e={type:t,values:[]},n=this.consumeToken();;){if(32===n.type||Yt(n,t))return e;this.reconsumeToken(n),e.values.push(this.consumeComponentValue()),n=this.consumeToken()}},t.prototype.consumeFunction=function(t){for(var e={name:t.value,values:[],type:18};;){var n=this.consumeToken();if(32===n.type||3===n.type)return e;this.reconsumeToken(n),e.values.push(this.consumeComponentValue())}},t.prototype.consumeToken=function(){var t=this._tokens.shift();return void 0===t?Mt:t},t.prototype.reconsumeToken=function(t){this._tokens.unshift(t)},t}(),Kt=function(t){return 15===t.type},Gt=function(t){return 17===t.type},qt=function(t){return 20===t.type},zt=function(t){return 0===t.type},Vt=function(t,e){return qt(t)&&t.value===e},Wt=function(t){return 31!==t.type},Jt=function(t){return 31!==t.type&&4!==t.type},Xt=function(t){var e=[],n=[];return t.forEach((function(t){if(4===t.type){if(0===n.length)throw new Error("Error parsing function args, zero tokens for arg");return e.push(n),void(n=[])}31!==t.type&&n.push(t)})),n.length&&e.push(n),e},Yt=function(t,e){return 11===e&&12===t.type||28===e&&29===t.type||2===e&&3===t.type},$t=function(t){return 17===t.type||15===t.type},Zt=function(t){return 16===t.type||$t(t)},te=function(t){return t.length>1?[t[0],t[1]]:[t[0]]},ee={type:17,number:0,flags:4},ne={type:16,number:50,flags:4},re={type:16,number:100,flags:4},ae=function(t,e,n){var r=t[0],a=t[1];return[oe(r,e),oe(void 0!==a?a:r,n)]},oe=function(t,e){if(16===t.type)return t.number/100*e;if(Kt(t))switch(t.unit){case"rem":case"em":return 16*t.number;default:return t.number}return t.number},ie="grad",Ae="turn",se=function(t,e){if(15===e.type)switch(e.unit){case"deg":return Math.PI*e.number/180;case ie:return Math.PI/200*e.number;case"rad":return e.number;case Ae:return 2*Math.PI*e.number}throw new Error("Unsupported angle type")},le=function(t){return 15===t.type&&("deg"===t.unit||t.unit===ie||"rad"===t.unit||t.unit===Ae)},ce=function(t){switch(t.filter(qt).map((function(t){return t.value})).join(" ")){case"to bottom right":case"to right bottom":case"left top":case"top left":return[ee,ee];case"to top":case"bottom":return de(0);case"to bottom left":case"to left bottom":case"right top":case"top right":return[ee,re];case"to right":case"left":return de(90);case"to top left":case"to left top":case"right bottom":case"bottom right":return[re,re];case"to bottom":case"top":return de(180);case"to top right":case"to right top":case"left bottom":case"bottom left":return[re,ee];case"to left":case"right":return de(270)}return 0},de=function(t){return Math.PI*t/180},ue=function(t,e){if(18===e.type){var n=we[e.name];if(void 0===n)throw new Error('Attempting to parse an unsupported color function "'+e.name+'"');return n(t,e.values)}if(5===e.type){if(3===e.value.length){var r=e.value.substring(0,1),a=e.value.substring(1,2),o=e.value.substring(2,3);return he(parseInt(r+r,16),parseInt(a+a,16),parseInt(o+o,16),1)}if(4===e.value.length){r=e.value.substring(0,1),a=e.value.substring(1,2),o=e.value.substring(2,3);var i=e.value.substring(3,4);return he(parseInt(r+r,16),parseInt(a+a,16),parseInt(o+o,16),parseInt(i+i,16)/255)}if(6===e.value.length)return r=e.value.substring(0,2),a=e.value.substring(2,4),o=e.value.substring(4,6),he(parseInt(r,16),parseInt(a,16),parseInt(o,16),1);if(8===e.value.length)return r=e.value.substring(0,2),a=e.value.substring(2,4),o=e.value.substring(4,6),i=e.value.substring(6,8),he(parseInt(r,16),parseInt(a,16),parseInt(o,16),parseInt(i,16)/255)}if(20===e.type){var A=xe[e.value.toUpperCase()];if(void 0!==A)return A}return xe.TRANSPARENT},pe=function(t){return!(255&t)},fe=function(t){var e=255&t,n=255&t>>8,r=255&t>>16,a=255&t>>24;return e<255?"rgba("+a+","+r+","+n+","+e/255+")":"rgb("+a+","+r+","+n+")"},he=function(t,e,n,r){return(t<<24|e<<16|n<<8|Math.round(255*r))>>>0},ge=function(t,e){if(17===t.type)return t.number;if(16===t.type){var n=3===e?1:255;return 3===e?t.number/100*n:Math.round(t.number/100*n)}return 0},me=function(t,e){var n=e.filter(Jt);if(3===n.length){var r=n.map(ge),a=r[0],o=r[1],i=r[2];return he(a,o,i,1)}if(4===n.length){var A=n.map(ge),s=(a=A[0],o=A[1],i=A[2],A[3]);return he(a,o,i,s)}return 0};function be(t,e,n){return n<0&&(n+=1),n>=1&&(n-=1),n<1/6?(e-t)*n*6+t:n<.5?e:n<2/3?6*(e-t)*(2/3-n)+t:t}var ve=function(t,e){var n=e.filter(Jt),r=n[0],a=n[1],o=n[2],i=n[3],A=(17===r.type?de(r.number):se(t,r))/(2*Math.PI),s=Zt(a)?a.number/100:0,l=Zt(o)?o.number/100:0,c=void 0!==i&&Zt(i)?oe(i,1):1;if(0===s)return he(255*l,255*l,255*l,1);var d=l<=.5?l*(s+1):l+s-l*s,u=2*l-d,p=be(u,d,A+1/3),f=be(u,d,A),h=be(u,d,A-1/3);return he(255*p,255*f,255*h,c)},we={hsl:ve,hsla:ve,rgb:me,rgba:me},ye=function(t,e){return ue(t,Rt.create(e).parseComponentValue())},xe={ALICEBLUE:4042850303,ANTIQUEWHITE:4209760255,AQUA:16777215,AQUAMARINE:2147472639,AZURE:4043309055,BEIGE:4126530815,BISQUE:4293182719,BLACK:255,BLANCHEDALMOND:4293643775,BLUE:65535,BLUEVIOLET:2318131967,BROWN:2771004159,BURLYWOOD:3736635391,CADETBLUE:1604231423,CHARTREUSE:2147418367,CHOCOLATE:3530104575,CORAL:4286533887,CORNFLOWERBLUE:1687547391,CORNSILK:4294499583,CRIMSON:3692313855,CYAN:16777215,DARKBLUE:35839,DARKCYAN:9145343,DARKGOLDENROD:3095837695,DARKGRAY:2846468607,DARKGREEN:6553855,DARKGREY:2846468607,DARKKHAKI:3182914559,DARKMAGENTA:2332068863,DARKOLIVEGREEN:1433087999,DARKORANGE:4287365375,DARKORCHID:2570243327,DARKRED:2332033279,DARKSALMON:3918953215,DARKSEAGREEN:2411499519,DARKSLATEBLUE:1211993087,DARKSLATEGRAY:793726975,DARKSLATEGREY:793726975,DARKTURQUOISE:13554175,DARKVIOLET:2483082239,DEEPPINK:4279538687,DEEPSKYBLUE:12582911,DIMGRAY:1768516095,DIMGREY:1768516095,DODGERBLUE:512819199,FIREBRICK:2988581631,FLORALWHITE:4294635775,FORESTGREEN:579543807,FUCHSIA:4278255615,GAINSBORO:3705462015,GHOSTWHITE:4177068031,GOLD:4292280575,GOLDENROD:3668254975,GRAY:2155905279,GREEN:8388863,GREENYELLOW:2919182335,GREY:2155905279,HONEYDEW:4043305215,HOTPINK:4285117695,INDIANRED:3445382399,INDIGO:1258324735,IVORY:4294963455,KHAKI:4041641215,LAVENDER:3873897215,LAVENDERBLUSH:4293981695,LAWNGREEN:2096890111,LEMONCHIFFON:4294626815,LIGHTBLUE:2916673279,LIGHTCORAL:4034953471,LIGHTCYAN:3774873599,LIGHTGOLDENRODYELLOW:4210742015,LIGHTGRAY:3553874943,LIGHTGREEN:2431553791,LIGHTGREY:3553874943,LIGHTPINK:4290167295,LIGHTSALMON:4288707327,LIGHTSEAGREEN:548580095,LIGHTSKYBLUE:2278488831,LIGHTSLATEGRAY:2005441023,LIGHTSLATEGREY:2005441023,LIGHTSTEELBLUE:2965692159,LIGHTYELLOW:4294959359,LIME:16711935,LIMEGREEN:852308735,LINEN:4210091775,MAGENTA:4278255615,MAROON:2147483903,MEDIUMAQUAMARINE:1724754687,MEDIUMBLUE:52735,MEDIUMORCHID:3126187007,MEDIUMPURPLE:2473647103,MEDIUMSEAGREEN:1018393087,MEDIUMSLATEBLUE:2070474495,MEDIUMSPRINGGREEN:16423679,MEDIUMTURQUOISE:1221709055,MEDIUMVIOLETRED:3340076543,MIDNIGHTBLUE:421097727,MINTCREAM:4127193855,MISTYROSE:4293190143,MOCCASIN:4293178879,NAVAJOWHITE:4292783615,NAVY:33023,OLDLACE:4260751103,OLIVE:2155872511,OLIVEDRAB:1804477439,ORANGE:4289003775,ORANGERED:4282712319,ORCHID:3664828159,PALEGOLDENROD:4008225535,PALEGREEN:2566625535,PALETURQUOISE:2951671551,PALEVIOLETRED:3681588223,PAPAYAWHIP:4293907967,PEACHPUFF:4292524543,PERU:3448061951,PINK:4290825215,PLUM:3718307327,POWDERBLUE:2967529215,PURPLE:2147516671,REBECCAPURPLE:1714657791,RED:4278190335,ROSYBROWN:3163525119,ROYALBLUE:1097458175,SADDLEBROWN:2336560127,SALMON:4202722047,SANDYBROWN:4104413439,SEAGREEN:780883967,SEASHELL:4294307583,SIENNA:2689740287,SILVER:3233857791,SKYBLUE:2278484991,SLATEBLUE:1784335871,SLATEGRAY:1887473919,SLATEGREY:1887473919,SNOW:4294638335,SPRINGGREEN:16744447,STEELBLUE:1182971135,TAN:3535047935,TEAL:8421631,THISTLE:3636451583,TOMATO:4284696575,TRANSPARENT:0,TURQUOISE:1088475391,VIOLET:4001558271,WHEAT:4125012991,WHITE:4294967295,WHITESMOKE:4126537215,YELLOW:4294902015,YELLOWGREEN:2597139199},Be={name:"background-clip",initialValue:"border-box",prefix:!1,type:1,parse:function(t,e){return e.map((function(t){if(qt(t))switch(t.value){case"padding-box":return 1;case"content-box":return 2}return 0}))}},Ce={name:"background-color",initialValue:"transparent",prefix:!1,type:3,format:"color"},Fe=function(t,e){var n=ue(t,e[0]),r=e[1];return r&&Zt(r)?{color:n,stop:r}:{color:n,stop:null}},Ue=function(t,e){var n=t[0],r=t[t.length-1];null===n.stop&&(n.stop=ee),null===r.stop&&(r.stop=re);for(var a=[],o=0,i=0;io?a.push(s):a.push(o),o=s}else a.push(null)}var l=null;for(i=0;it.optimumDistance)?{optimumCorner:e,optimumDistance:A}:t}),{optimumDistance:a?1/0:-1/0,optimumCorner:null}).optimumCorner},_e=function(t,e){var n=de(180),r=[];return Xt(e).forEach((function(e,a){if(0===a){var o=e[0];if(20===o.type&&-1!==["top","left","right","bottom"].indexOf(o.value))return void(n=ce(e));if(le(o))return void(n=(se(t,o)+de(270))%de(360))}var i=Fe(t,e);r.push(i)})),{angle:n,stops:r,type:1}},Se="closest-side",ke="farthest-side",Ee="closest-corner",Ie="farthest-corner",Ne="circle",De="ellipse",He="cover",Pe="contain",Oe=function(t,e){var n=0,r=3,a=[],o=[];return Xt(e).forEach((function(e,i){var A=!0;if(0===i?A=e.reduce((function(t,e){if(qt(e))switch(e.value){case"center":return o.push(ne),!1;case"top":case"left":return o.push(ee),!1;case"right":case"bottom":return o.push(re),!1}else if(Zt(e)||$t(e))return o.push(e),!1;return t}),A):1===i&&(A=e.reduce((function(t,e){if(qt(e))switch(e.value){case Ne:return n=0,!1;case De:return n=1,!1;case Pe:case Se:return r=0,!1;case ke:return r=1,!1;case Ee:return r=2,!1;case He:case Ie:return r=3,!1}else if($t(e)||Zt(e))return Array.isArray(r)||(r=[]),r.push(e),!1;return t}),A)),A){var s=Fe(t,e);a.push(s)}})),{size:r,shape:n,stops:a,position:o,type:2}},Me=function(t,e){if(22===e.type){var n={url:e.value,type:0};return t.cache.addImage(e.value),n}if(18===e.type){var r=Re[e.name];if(void 0===r)throw new Error('Attempting to parse an unsupported image function "'+e.name+'"');return r(t,e.values)}throw new Error("Unsupported image type "+e.type)};var je,Re={"linear-gradient":function(t,e){var n=de(180),r=[];return Xt(e).forEach((function(e,a){if(0===a){var o=e[0];if(20===o.type&&"to"===o.value)return void(n=ce(e));if(le(o))return void(n=se(t,o))}var i=Fe(t,e);r.push(i)})),{angle:n,stops:r,type:1}},"-moz-linear-gradient":_e,"-ms-linear-gradient":_e,"-o-linear-gradient":_e,"-webkit-linear-gradient":_e,"radial-gradient":function(t,e){var n=0,r=3,a=[],o=[];return Xt(e).forEach((function(e,i){var A=!0;if(0===i){var s=!1;A=e.reduce((function(t,e){if(s)if(qt(e))switch(e.value){case"center":return o.push(ne),t;case"top":case"left":return o.push(ee),t;case"right":case"bottom":return o.push(re),t}else(Zt(e)||$t(e))&&o.push(e);else if(qt(e))switch(e.value){case Ne:return n=0,!1;case De:return n=1,!1;case"at":return s=!0,!1;case Se:return r=0,!1;case He:case ke:return r=1,!1;case Pe:case Ee:return r=2,!1;case Ie:return r=3,!1}else if($t(e)||Zt(e))return Array.isArray(r)||(r=[]),r.push(e),!1;return t}),A)}if(A){var l=Fe(t,e);a.push(l)}})),{size:r,shape:n,stops:a,position:o,type:2}},"-moz-radial-gradient":Oe,"-ms-radial-gradient":Oe,"-o-radial-gradient":Oe,"-webkit-radial-gradient":Oe,"-webkit-gradient":function(t,e){var n=de(180),r=[],a=1;return Xt(e).forEach((function(e,n){var o=e[0];if(0===n){if(qt(o)&&"linear"===o.value)return void(a=1);if(qt(o)&&"radial"===o.value)return void(a=2)}if(18===o.type)if("from"===o.name){var i=ue(t,o.values[0]);r.push({stop:ee,color:i})}else if("to"===o.name)i=ue(t,o.values[0]),r.push({stop:re,color:i});else if("color-stop"===o.name){var A=o.values.filter(Jt);if(2===A.length){i=ue(t,A[1]);var s=A[0];Gt(s)&&r.push({stop:{type:16,number:100*s.number,flags:s.flags},color:i})}}})),1===a?{angle:(n+de(180))%de(360),stops:r,type:a}:{size:3,shape:0,stops:r,position:[],type:a}}},Ke={name:"background-image",initialValue:"none",type:1,prefix:!1,parse:function(t,e){if(0===e.length)return[];var n=e[0];return 20===n.type&&"none"===n.value?[]:e.filter((function(t){return Jt(t)&&function(t){return!(20===t.type&&"none"===t.value||18===t.type&&!Re[t.name])}(t)})).map((function(e){return Me(t,e)}))}},Ge={name:"background-origin",initialValue:"border-box",prefix:!1,type:1,parse:function(t,e){return e.map((function(t){if(qt(t))switch(t.value){case"padding-box":return 1;case"content-box":return 2}return 0}))}},qe={name:"background-position",initialValue:"0% 0%",type:1,prefix:!1,parse:function(t,e){return Xt(e).map((function(t){return t.filter(Zt)})).map(te)}},ze={name:"background-repeat",initialValue:"repeat",prefix:!1,type:1,parse:function(t,e){return Xt(e).map((function(t){return t.filter(qt).map((function(t){return t.value})).join(" ")})).map(Ve)}},Ve=function(t){switch(t){case"no-repeat":return 1;case"repeat-x":case"repeat no-repeat":return 2;case"repeat-y":case"no-repeat repeat":return 3;default:return 0}};!function(t){t.AUTO="auto",t.CONTAIN="contain",t.COVER="cover"}(je||(je={}));var We,Je={name:"background-size",initialValue:"0",prefix:!1,type:1,parse:function(t,e){return Xt(e).map((function(t){return t.filter(Xe)}))}},Xe=function(t){return qt(t)||Zt(t)},Ye=function(t){return{name:"border-"+t+"-color",initialValue:"transparent",prefix:!1,type:3,format:"color"}},$e=Ye("top"),Ze=Ye("right"),tn=Ye("bottom"),en=Ye("left"),nn=function(t){return{name:"border-radius-"+t,initialValue:"0 0",prefix:!1,type:1,parse:function(t,e){return te(e.filter(Zt))}}},rn=nn("top-left"),an=nn("top-right"),on=nn("bottom-right"),An=nn("bottom-left"),sn=function(t){return{name:"border-"+t+"-style",initialValue:"solid",prefix:!1,type:2,parse:function(t,e){switch(e){case"none":return 0;case"dashed":return 2;case"dotted":return 3;case"double":return 4}return 1}}},ln=sn("top"),cn=sn("right"),dn=sn("bottom"),un=sn("left"),pn=function(t){return{name:"border-"+t+"-width",initialValue:"0",type:0,prefix:!1,parse:function(t,e){return Kt(e)?e.number:0}}},fn=pn("top"),hn=pn("right"),gn=pn("bottom"),mn=pn("left"),bn={name:"color",initialValue:"transparent",prefix:!1,type:3,format:"color"},vn={name:"direction",initialValue:"ltr",prefix:!1,type:2,parse:function(t,e){return"rtl"===e?1:0}},wn={name:"display",initialValue:"inline-block",prefix:!1,type:1,parse:function(t,e){return e.filter(qt).reduce((function(t,e){return t|yn(e.value)}),0)}},yn=function(t){switch(t){case"block":case"-webkit-box":return 2;case"inline":return 4;case"run-in":return 8;case"flow":return 16;case"flow-root":return 32;case"table":return 64;case"flex":case"-webkit-flex":return 128;case"grid":case"-ms-grid":return 256;case"ruby":return 512;case"subgrid":return 1024;case"list-item":return 2048;case"table-row-group":return 4096;case"table-header-group":return 8192;case"table-footer-group":return 16384;case"table-row":return 32768;case"table-cell":return 65536;case"table-column-group":return 131072;case"table-column":return 262144;case"table-caption":return 524288;case"ruby-base":return 1048576;case"ruby-text":return 2097152;case"ruby-base-container":return 4194304;case"ruby-text-container":return 8388608;case"contents":return 16777216;case"inline-block":return 33554432;case"inline-list-item":return 67108864;case"inline-table":return 134217728;case"inline-flex":return 268435456;case"inline-grid":return 536870912}return 0},xn={name:"float",initialValue:"none",prefix:!1,type:2,parse:function(t,e){switch(e){case"left":return 1;case"right":return 2;case"inline-start":return 3;case"inline-end":return 4}return 0}},Bn={name:"letter-spacing",initialValue:"0",prefix:!1,type:0,parse:function(t,e){return 20===e.type&&"normal"===e.value?0:17===e.type||15===e.type?e.number:0}};!function(t){t.NORMAL="normal",t.STRICT="strict"}(We||(We={}));var Cn,Fn={name:"line-break",initialValue:"normal",prefix:!1,type:2,parse:function(t,e){return"strict"===e?We.STRICT:We.NORMAL}},Un={name:"line-height",initialValue:"normal",prefix:!1,type:4},Qn=function(t,e){return qt(t)&&"normal"===t.value?1.2*e:17===t.type?e*t.number:Zt(t)?oe(t,e):e},Tn={name:"list-style-image",initialValue:"none",type:0,prefix:!1,parse:function(t,e){return 20===e.type&&"none"===e.value?null:Me(t,e)}},Ln={name:"list-style-position",initialValue:"outside",prefix:!1,type:2,parse:function(t,e){return"inside"===e?0:1}},_n={name:"list-style-type",initialValue:"none",prefix:!1,type:2,parse:function(t,e){switch(e){case"disc":return 0;case"circle":return 1;case"square":return 2;case"decimal":return 3;case"cjk-decimal":return 4;case"decimal-leading-zero":return 5;case"lower-roman":return 6;case"upper-roman":return 7;case"lower-greek":return 8;case"lower-alpha":return 9;case"upper-alpha":return 10;case"arabic-indic":return 11;case"armenian":return 12;case"bengali":return 13;case"cambodian":return 14;case"cjk-earthly-branch":return 15;case"cjk-heavenly-stem":return 16;case"cjk-ideographic":return 17;case"devanagari":return 18;case"ethiopic-numeric":return 19;case"georgian":return 20;case"gujarati":return 21;case"gurmukhi":case"hebrew":return 22;case"hiragana":return 23;case"hiragana-iroha":return 24;case"japanese-formal":return 25;case"japanese-informal":return 26;case"kannada":return 27;case"katakana":return 28;case"katakana-iroha":return 29;case"khmer":return 30;case"korean-hangul-formal":return 31;case"korean-hanja-formal":return 32;case"korean-hanja-informal":return 33;case"lao":return 34;case"lower-armenian":return 35;case"malayalam":return 36;case"mongolian":return 37;case"myanmar":return 38;case"oriya":return 39;case"persian":return 40;case"simp-chinese-formal":return 41;case"simp-chinese-informal":return 42;case"tamil":return 43;case"telugu":return 44;case"thai":return 45;case"tibetan":return 46;case"trad-chinese-formal":return 47;case"trad-chinese-informal":return 48;case"upper-armenian":return 49;case"disclosure-open":return 50;case"disclosure-closed":return 51;default:return-1}}},Sn=function(t){return{name:"margin-"+t,initialValue:"0",prefix:!1,type:4}},kn=Sn("top"),En=Sn("right"),In=Sn("bottom"),Nn=Sn("left"),Dn={name:"overflow",initialValue:"visible",prefix:!1,type:1,parse:function(t,e){return e.filter(qt).map((function(t){switch(t.value){case"hidden":return 1;case"scroll":return 2;case"clip":return 3;case"auto":return 4;default:return 0}}))}},Hn={name:"overflow-wrap",initialValue:"normal",prefix:!1,type:2,parse:function(t,e){return"break-word"===e?"break-word":"normal"}},Pn=function(t){return{name:"padding-"+t,initialValue:"0",prefix:!1,type:3,format:"length-percentage"}},On=Pn("top"),Mn=Pn("right"),jn=Pn("bottom"),Rn=Pn("left"),Kn={name:"text-align",initialValue:"left",prefix:!1,type:2,parse:function(t,e){switch(e){case"right":return 2;case"center":case"justify":return 1;default:return 0}}},Gn={name:"position",initialValue:"static",prefix:!1,type:2,parse:function(t,e){switch(e){case"relative":return 1;case"absolute":return 2;case"fixed":return 3;case"sticky":return 4}return 0}},qn={name:"text-shadow",initialValue:"none",type:1,prefix:!1,parse:function(t,e){return 1===e.length&&Vt(e[0],"none")?[]:Xt(e).map((function(e){for(var n={color:xe.TRANSPARENT,offsetX:ee,offsetY:ee,blur:ee},r=0,a=0;a1?1:0],this.overflowWrap=Cr(t,Hn,e.overflowWrap),this.paddingTop=Cr(t,On,e.paddingTop),this.paddingRight=Cr(t,Mn,e.paddingRight),this.paddingBottom=Cr(t,jn,e.paddingBottom),this.paddingLeft=Cr(t,Rn,e.paddingLeft),this.paintOrder=Cr(t,br,e.paintOrder),this.position=Cr(t,Gn,e.position),this.textAlign=Cr(t,Kn,e.textAlign),this.textDecorationColor=Cr(t,rr,null!==(n=e.textDecorationColor)&&void 0!==n?n:e.color),this.textDecorationLine=Cr(t,ar,null!==(r=e.textDecorationLine)&&void 0!==r?r:e.textDecoration),this.textShadow=Cr(t,qn,e.textShadow),this.textTransform=Cr(t,zn,e.textTransform),this.transform=Cr(t,Vn,e.transform),this.transformOrigin=Cr(t,Yn,e.transformOrigin),this.visibility=Cr(t,$n,e.visibility),this.webkitTextStrokeColor=Cr(t,vr,e.webkitTextStrokeColor),this.webkitTextStrokeWidth=Cr(t,wr,e.webkitTextStrokeWidth),this.wordBreak=Cr(t,Zn,e.wordBreak),this.zIndex=Cr(t,tr,e.zIndex)}return t.prototype.isVisible=function(){return this.display>0&&this.opacity>0&&0===this.visibility},t.prototype.isTransparent=function(){return pe(this.backgroundColor)},t.prototype.isTransformed=function(){return null!==this.transform},t.prototype.isPositioned=function(){return 0!==this.position},t.prototype.isPositionedWithZIndex=function(){return this.isPositioned()&&!this.zIndex.auto},t.prototype.isFloating=function(){return 0!==this.float},t.prototype.isInlineLevel=function(){return cr(this.display,4)||cr(this.display,33554432)||cr(this.display,268435456)||cr(this.display,536870912)||cr(this.display,67108864)||cr(this.display,134217728)},t}(),xr=function(t,e){this.content=Cr(t,dr,e.content),this.quotes=Cr(t,hr,e.quotes)},Br=function(t,e){this.counterIncrement=Cr(t,ur,e.counterIncrement),this.counterReset=Cr(t,pr,e.counterReset)},Cr=function(t,e,n){var r=new jt,a=null!=n?n.toString():e.initialValue;r.write(a);var o=new Rt(r.read());switch(e.type){case 2:var i=o.parseComponentValue();return e.parse(t,qt(i)?i.value:e.initialValue);case 0:return e.parse(t,o.parseComponentValue());case 1:return e.parse(t,o.parseComponentValues());case 4:return o.parseComponentValue();case 3:switch(e.format){case"angle":return se(t,o.parseComponentValue());case"color":return ue(t,o.parseComponentValue());case"image":return Me(t,o.parseComponentValue());case"length":var A=o.parseComponentValue();return $t(A)?A:ee;case"length-percentage":var s=o.parseComponentValue();return Zt(s)?s:ee;case"time":return er.parse(t,o.parseComponentValue())}}},Fr=function(t,e){var n=function(t){switch(t.getAttribute("data-html2canvas-debug")){case"all":return 1;case"clone":return 2;case"parse":return 3;case"render":return 4;default:return 0}}(t);return 1===n||e===n},Ur=function(t,e){this.context=t,this.textNodes=[],this.elements=[],this.flags=0,Fr(e,3),this.styles=new yr(t,window.getComputedStyle(e,null)),_a(e)&&(this.styles.animationDuration.some((function(t){return t>0}))&&(e.style.animationDuration="0s"),null!==this.styles.transform&&(e.style.transform="none")),this.bounds=A(this.context,e),Fr(e,4)&&(this.flags|=16)},Qr="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",Tr="undefined"==typeof Uint8Array?[]:new Uint8Array(256),Lr=0;Lr<64;Lr++)Tr[Qr.charCodeAt(Lr)]=Lr;for(var _r=function(t,e,n){return t.slice?t.slice(e,n):new Uint16Array(Array.prototype.slice.call(t,e,n))},Sr=function(){function t(t,e,n,r,a,o){this.initialValue=t,this.errorValue=e,this.highStart=n,this.highValueIndex=r,this.index=a,this.data=o}return t.prototype.get=function(t){var e;if(t>=0){if(t<55296||t>56319&&t<=65535)return e=((e=this.index[t>>5])<<2)+(31&t),this.data[e];if(t<=65535)return e=((e=this.index[2048+(t-55296>>5)])<<2)+(31&t),this.data[e];if(t>11),e=this.index[e],e+=t>>5&63,e=((e=this.index[e])<<2)+(31&t),this.data[e];if(t<=1114111)return this.data[this.highValueIndex]}return this.errorValue},t}(),kr="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",Er="undefined"==typeof Uint8Array?[]:new Uint8Array(256),Ir=0;Ir<64;Ir++)Er[kr.charCodeAt(Ir)]=Ir;var Nr,Dr=8,Hr=9,Pr=11,Or=12,Mr=function(){for(var t=[],e=0;e>10),i%1024+56320)),(a+1===n||r.length>16384)&&(o+=String.fromCharCode.apply(String,r),r.length=0)}return o},jr=function(t){var e,n,r,a=function(t){var e,n,r,a,o,i=.75*t.length,A=t.length,s=0;"="===t[t.length-1]&&(i--,"="===t[t.length-2]&&i--);var l="undefined"!=typeof ArrayBuffer&&"undefined"!=typeof Uint8Array&&void 0!==Uint8Array.prototype.slice?new ArrayBuffer(i):new Array(i),c=Array.isArray(l)?l:new Uint8Array(l);for(e=0;e>4,c[s++]=(15&r)<<4|a>>2,c[s++]=(3&a)<<6|63&o;return l}(t),o=Array.isArray(a)?function(t){for(var e=t.length,n=[],r=0;r=55296&&a<=56319&&n=n)return{done:!0,value:null};for(var t=Rr;ri.x||a.y>i.y;return i=a,0===e||A}));return t.body.removeChild(e),A}(document);return Object.defineProperty(Jr,"SUPPORT_WORD_BREAKING",{value:t}),t},get SUPPORT_SVG_DRAWING(){var t=function(t){var e=new Image,n=t.createElement("canvas"),r=n.getContext("2d");if(!r)return!1;e.src="data:image/svg+xml,";try{r.drawImage(e,0,0),n.toDataURL()}catch(t){return!1}return!0}(document);return Object.defineProperty(Jr,"SUPPORT_SVG_DRAWING",{value:t}),t},get SUPPORT_FOREIGNOBJECT_DRAWING(){var t="function"==typeof Array.from&&"function"==typeof window.fetch?function(t){var e=t.createElement("canvas"),n=100;e.width=n,e.height=n;var r=e.getContext("2d");if(!r)return Promise.reject(!1);r.fillStyle="rgb(0, 255, 0)",r.fillRect(0,0,n,n);var a=new Image,o=e.toDataURL();a.src=o;var i=Vr(n,n,0,0,a);return r.fillStyle="red",r.fillRect(0,0,n,n),Wr(i).then((function(e){r.drawImage(e,0,0);var a=r.getImageData(0,0,n,n).data;r.fillStyle="red",r.fillRect(0,0,n,n);var i=t.createElement("div");return i.style.backgroundImage="url("+o+")",i.style.height=n+"px",zr(a)?Wr(Vr(n,n,0,0,i)):Promise.reject(!1)})).then((function(t){return r.drawImage(t,0,0),zr(r.getImageData(0,0,n,n).data)})).catch((function(){return!1}))}(document):Promise.resolve(!1);return Object.defineProperty(Jr,"SUPPORT_FOREIGNOBJECT_DRAWING",{value:t}),t},get SUPPORT_CORS_IMAGES(){var t=void 0!==(new Image).crossOrigin;return Object.defineProperty(Jr,"SUPPORT_CORS_IMAGES",{value:t}),t},get SUPPORT_RESPONSE_TYPE(){var t="string"==typeof(new XMLHttpRequest).responseType;return Object.defineProperty(Jr,"SUPPORT_RESPONSE_TYPE",{value:t}),t},get SUPPORT_CORS_XHR(){var t="withCredentials"in new XMLHttpRequest;return Object.defineProperty(Jr,"SUPPORT_CORS_XHR",{value:t}),t},get SUPPORT_NATIVE_TEXT_SEGMENTATION(){var t=!("undefined"==typeof Intl||!Intl.Segmenter);return Object.defineProperty(Jr,"SUPPORT_NATIVE_TEXT_SEGMENTATION",{value:t}),t}},Xr=function(t,e){this.text=t,this.bounds=e},Yr=function(t,e){var n=e.ownerDocument;if(n){var r=n.createElement("html2canvaswrapper");r.appendChild(e.cloneNode(!0));var a=e.parentNode;if(a){a.replaceChild(r,e);var o=A(t,r);return r.firstChild&&a.replaceChild(r.firstChild,r),o}}return i.EMPTY},$r=function(t,e,n){var r=t.ownerDocument;if(!r)throw new Error("Node has no owner document");var a=r.createRange();return a.setStart(t,e),a.setEnd(t,e+n),a},Zr=function(t){if(Jr.SUPPORT_NATIVE_TEXT_SEGMENTATION){var e=new Intl.Segmenter(void 0,{granularity:"grapheme"});return Array.from(e.segment(t)).map((function(t){return t.segment}))}return function(t){for(var e,n=qr(t),r=[];!(e=n.next()).done;)e.value&&r.push(e.value.slice());return r}(t)},ta=function(t,e){return 0!==e.letterSpacing?Zr(t):function(t,e){if(Jr.SUPPORT_NATIVE_TEXT_SEGMENTATION){var n=new Intl.Segmenter(void 0,{granularity:"word"});return Array.from(n.segment(t)).map((function(t){return t.segment}))}return na(t,e)}(t,e)},ea=[32,160,4961,65792,65793,4153,4241],na=function(t,e){for(var n,r=function(t,e){var n=s(t),r=ot(n,e),a=r[0],o=r[1],i=r[2],A=n.length,l=0,c=0;return{next:function(){if(c>=A)return{done:!0,value:null};for(var t=z;c0)if(Jr.SUPPORT_RANGE_BOUNDS){var a=$r(r,A,e.length).getClientRects();if(a.length>1){var s=Zr(e),l=0;s.forEach((function(e){o.push(new Xr(e,i.fromDOMRectList(t,$r(r,l+A,e.length).getClientRects()))),l+=e.length}))}else o.push(new Xr(e,i.fromDOMRectList(t,a)))}else{var c=r.splitText(e.length);o.push(new Xr(e,Yr(t,r))),r=c}else Jr.SUPPORT_RANGE_BOUNDS||(r=r.splitText(e.length));A+=e.length})),o}(t,this.text,n,e)},aa=function(t,e){switch(e){case 1:return t.toLowerCase();case 3:return t.replace(oa,ia);case 2:return t.toUpperCase();default:return t}},oa=/(^|\s|:|-|\(|\))([a-z])/g,ia=function(t,e,n){return t.length>0?e+n.toUpperCase():t},Aa=function(t){function n(e,n){var r=t.call(this,e,n)||this;return r.src=n.currentSrc||n.src,r.intrinsicWidth=n.naturalWidth,r.intrinsicHeight=n.naturalHeight,r.context.cache.addImage(r.src),r}return e(n,t),n}(Ur),sa=function(t){function n(e,n){var r=t.call(this,e,n)||this;return r.canvas=n,r.intrinsicWidth=n.width,r.intrinsicHeight=n.height,r}return e(n,t),n}(Ur),la=function(t){function n(e,n){var r=t.call(this,e,n)||this,a=new XMLSerializer,o=A(e,n);return n.setAttribute("width",o.width+"px"),n.setAttribute("height",o.height+"px"),r.svg="data:image/svg+xml,"+encodeURIComponent(a.serializeToString(n)),r.intrinsicWidth=n.width.baseVal.value,r.intrinsicHeight=n.height.baseVal.value,r.context.cache.addImage(r.svg),r}return e(n,t),n}(Ur),ca=function(t){function n(e,n){var r=t.call(this,e,n)||this;return r.value=n.value,r}return e(n,t),n}(Ur),da=function(t){function n(e,n){var r=t.call(this,e,n)||this;return r.start=n.start,r.reversed="boolean"==typeof n.reversed&&!0===n.reversed,r}return e(n,t),n}(Ur),ua=[{type:15,flags:0,unit:"px",number:3}],pa=[{type:16,flags:0,number:50}],fa="checkbox",ha="radio",ga="password",ma=707406591,ba=function(t){function n(e,n){var r,a,o,A=t.call(this,e,n)||this;switch(A.type=n.type.toLowerCase(),A.checked=n.checked,A.value=0===(o=(a=n).type===ga?new Array(a.value.length+1).join("•"):a.value).length?a.placeholder||"":o,A.type!==fa&&A.type!==ha||(A.styles.backgroundColor=3739148031,A.styles.borderTopColor=A.styles.borderRightColor=A.styles.borderBottomColor=A.styles.borderLeftColor=2779096575,A.styles.borderTopWidth=A.styles.borderRightWidth=A.styles.borderBottomWidth=A.styles.borderLeftWidth=1,A.styles.borderTopStyle=A.styles.borderRightStyle=A.styles.borderBottomStyle=A.styles.borderLeftStyle=1,A.styles.backgroundClip=[0],A.styles.backgroundOrigin=[0],A.bounds=(r=A.bounds).width>r.height?new i(r.left+(r.width-r.height)/2,r.top,r.height,r.height):r.width0)n.textNodes.push(new ra(t,a,n.styles));else if(La(a))if(Ga(a)&&a.assignedNodes)a.assignedNodes().forEach((function(e){return Ba(t,e,n,r)}));else{var i=Ca(t,a);i.styles.isVisible()&&(Ua(a,i,r)?i.flags|=4:Qa(i.styles)&&(i.flags|=2),-1!==xa.indexOf(a.tagName)&&(i.flags|=8),n.elements.push(i),a.slot,a.shadowRoot?Ba(t,a.shadowRoot,i,r):Ra(a)||Na(a)||Ka(a)||Ba(t,a,i,r))}},Ca=function(t,e){return Oa(e)?new Aa(t,e):Ha(e)?new sa(t,e):Na(e)?new la(t,e):ka(e)?new ca(t,e):Ea(e)?new da(t,e):Ia(e)?new ba(t,e):Ka(e)?new va(t,e):Ra(e)?new wa(t,e):Ma(e)?new ya(t,e):new Ur(t,e)},Fa=function(t,e){var n=Ca(t,e);return n.flags|=4,Ba(t,e,n,n),n},Ua=function(t,e,n){return e.styles.isPositionedWithZIndex()||e.styles.opacity<1||e.styles.isTransformed()||Da(t)&&n.styles.isTransparent()},Qa=function(t){return t.isPositioned()||t.isFloating()},Ta=function(t){return t.nodeType===Node.TEXT_NODE},La=function(t){return t.nodeType===Node.ELEMENT_NODE},_a=function(t){return La(t)&&void 0!==t.style&&!Sa(t)},Sa=function(t){return"object"==typeof t.className},ka=function(t){return"LI"===t.tagName},Ea=function(t){return"OL"===t.tagName},Ia=function(t){return"INPUT"===t.tagName},Na=function(t){return"svg"===t.tagName},Da=function(t){return"BODY"===t.tagName},Ha=function(t){return"CANVAS"===t.tagName},Pa=function(t){return"VIDEO"===t.tagName},Oa=function(t){return"IMG"===t.tagName},Ma=function(t){return"IFRAME"===t.tagName},ja=function(t){return"STYLE"===t.tagName},Ra=function(t){return"TEXTAREA"===t.tagName},Ka=function(t){return"SELECT"===t.tagName},Ga=function(t){return"SLOT"===t.tagName},qa=function(t){return t.tagName.indexOf("-")>0},za=function(){function t(){this.counters={}}return t.prototype.getCounterValue=function(t){var e=this.counters[t];return e&&e.length?e[e.length-1]:1},t.prototype.getCounterValues=function(t){return this.counters[t]||[]},t.prototype.pop=function(t){var e=this;t.forEach((function(t){return e.counters[t].pop()}))},t.prototype.parse=function(t){var e=this,n=t.counterIncrement,r=t.counterReset,a=!0;null!==n&&n.forEach((function(t){var n=e.counters[t.counter];n&&0!==t.increment&&(a=!1,n.length||n.push(1),n[Math.max(0,n.length-1)]+=t.increment)}));var o=[];return a&&r.forEach((function(t){var n=e.counters[t.counter];o.push(t.counter),n||(n=e.counters[t.counter]=[]),n.push(t.reset)})),o},t}(),Va={integers:[1e3,900,500,400,100,90,50,40,10,9,5,4,1],values:["M","CM","D","CD","C","XC","L","XL","X","IX","V","IV","I"]},Wa={integers:[9e3,8e3,7e3,6e3,5e3,4e3,3e3,2e3,1e3,900,800,700,600,500,400,300,200,100,90,80,70,60,50,40,30,20,10,9,8,7,6,5,4,3,2,1],values:["Ք","Փ","Ւ","Ց","Ր","Տ","Վ","Ս","Ռ","Ջ","Պ","Չ","Ո","Շ","Ն","Յ","Մ","Ճ","Ղ","Ձ","Հ","Կ","Ծ","Խ","Լ","Ի","Ժ","Թ","Ը","Է","Զ","Ե","Դ","Գ","Բ","Ա"]},Ja={integers:[1e4,9e3,8e3,7e3,6e3,5e3,4e3,3e3,2e3,1e3,400,300,200,100,90,80,70,60,50,40,30,20,19,18,17,16,15,10,9,8,7,6,5,4,3,2,1],values:["י׳","ט׳","ח׳","ז׳","ו׳","ה׳","ד׳","ג׳","ב׳","א׳","ת","ש","ר","ק","צ","פ","ע","ס","נ","מ","ל","כ","יט","יח","יז","טז","טו","י","ט","ח","ז","ו","ה","ד","ג","ב","א"]},Xa={integers:[1e4,9e3,8e3,7e3,6e3,5e3,4e3,3e3,2e3,1e3,900,800,700,600,500,400,300,200,100,90,80,70,60,50,40,30,20,10,9,8,7,6,5,4,3,2,1],values:["ჵ","ჰ","ჯ","ჴ","ხ","ჭ","წ","ძ","ც","ჩ","შ","ყ","ღ","ქ","ფ","ჳ","ტ","ს","რ","ჟ","პ","ო","ჲ","ნ","მ","ლ","კ","ი","თ","ჱ","ზ","ვ","ე","დ","გ","ბ","ა"]},Ya=function(t,e,n,r,a,o){return tn?io(t,a,o.length>0):r.integers.reduce((function(e,n,a){for(;t>=n;)t-=n,e+=r.values[a];return e}),"")+o},$a=function(t,e,n,r){var a="";do{n||t--,a=r(t)+a,t/=e}while(t*e>=e);return a},Za=function(t,e,n,r,a){var o=n-e+1;return(t<0?"-":"")+($a(Math.abs(t),o,r,(function(t){return l(Math.floor(t%o)+e)}))+a)},to=function(t,e,n){void 0===n&&(n=". ");var r=e.length;return $a(Math.abs(t),r,!1,(function(t){return e[Math.floor(t%r)]}))+n},eo=function(t,e,n,r,a,o){if(t<-9999||t>9999)return io(t,4,a.length>0);var i=Math.abs(t),A=a;if(0===i)return e[0]+A;for(var s=0;i>0&&s<=4;s++){var l=i%10;0===l&&cr(o,1)&&""!==A?A=e[l]+A:l>1||1===l&&0===s||1===l&&1===s&&cr(o,2)||1===l&&1===s&&cr(o,4)&&t>100||1===l&&s>1&&cr(o,8)?A=e[l]+(s>0?n[s-1]:"")+A:1===l&&s>0&&(A=n[s-1]+A),i=Math.floor(i/10)}return(t<0?r:"")+A},no="十百千萬",ro="拾佰仟萬",ao="マイナス",oo="마이너스",io=function(t,e,n){var r=n?". ":"",a=n?"、":"",o=n?", ":"",i=n?" ":"";switch(e){case 0:return"•"+i;case 1:return"◦"+i;case 2:return"◾"+i;case 5:var A=Za(t,48,57,!0,r);return A.length<4?"0"+A:A;case 4:return to(t,"〇一二三四五六七八九",a);case 6:return Ya(t,1,3999,Va,3,r).toLowerCase();case 7:return Ya(t,1,3999,Va,3,r);case 8:return Za(t,945,969,!1,r);case 9:return Za(t,97,122,!1,r);case 10:return Za(t,65,90,!1,r);case 11:return Za(t,1632,1641,!0,r);case 12:case 49:return Ya(t,1,9999,Wa,3,r);case 35:return Ya(t,1,9999,Wa,3,r).toLowerCase();case 13:return Za(t,2534,2543,!0,r);case 14:case 30:return Za(t,6112,6121,!0,r);case 15:return to(t,"子丑寅卯辰巳午未申酉戌亥",a);case 16:return to(t,"甲乙丙丁戊己庚辛壬癸",a);case 17:case 48:return eo(t,"零一二三四五六七八九",no,"負",a,14);case 47:return eo(t,"零壹貳參肆伍陸柒捌玖",ro,"負",a,15);case 42:return eo(t,"零一二三四五六七八九",no,"负",a,14);case 41:return eo(t,"零壹贰叁肆伍陆柒捌玖",ro,"负",a,15);case 26:return eo(t,"〇一二三四五六七八九","十百千万",ao,a,0);case 25:return eo(t,"零壱弐参四伍六七八九","拾百千万",ao,a,7);case 31:return eo(t,"영일이삼사오육칠팔구","십백천만",oo,o,7);case 33:return eo(t,"零一二三四五六七八九","十百千萬",oo,o,0);case 32:return eo(t,"零壹貳參四五六七八九","拾百千",oo,o,7);case 18:return Za(t,2406,2415,!0,r);case 20:return Ya(t,1,19999,Xa,3,r);case 21:return Za(t,2790,2799,!0,r);case 22:return Za(t,2662,2671,!0,r);case 22:return Ya(t,1,10999,Ja,3,r);case 23:return to(t,"あいうえおかきくけこさしすせそたちつてとなにぬねのはひふへほまみむめもやゆよらりるれろわゐゑをん");case 24:return to(t,"いろはにほへとちりぬるをわかよたれそつねならむうゐのおくやまけふこえてあさきゆめみしゑひもせす");case 27:return Za(t,3302,3311,!0,r);case 28:return to(t,"アイウエオカキクケコサシスセソタチツテトナニヌネノハヒフヘホマミムメモヤユヨラリルレロワヰヱヲン",a);case 29:return to(t,"イロハニホヘトチリヌルヲワカヨタレソツネナラムウヰノオクヤマケフコエテアサキユメミシヱヒモセス",a);case 34:return Za(t,3792,3801,!0,r);case 37:return Za(t,6160,6169,!0,r);case 38:return Za(t,4160,4169,!0,r);case 39:return Za(t,2918,2927,!0,r);case 40:return Za(t,1776,1785,!0,r);case 43:return Za(t,3046,3055,!0,r);case 44:return Za(t,3174,3183,!0,r);case 45:return Za(t,3664,3673,!0,r);case 46:return Za(t,3872,3881,!0,r);default:return Za(t,48,57,!0,r)}},Ao="data-html2canvas-ignore",so=function(){function t(t,e,n){if(this.context=t,this.options=n,this.scrolledElements=[],this.referenceElement=e,this.counters=new za,this.quoteDepth=0,!e.ownerDocument)throw new Error("Cloned element does not have an owner document");this.documentElement=this.cloneNode(e.ownerDocument.documentElement,!1)}return t.prototype.toIFrame=function(t,e){var n=this,o=co(t,e);if(!o.contentWindow)return Promise.reject("Unable to find iframe window");var i=t.defaultView.pageXOffset,A=t.defaultView.pageYOffset,s=o.contentWindow,l=s.document,c=fo(o).then((function(){return r(n,void 0,void 0,(function(){var t,n;return a(this,(function(r){switch(r.label){case 0:return this.scrolledElements.forEach(vo),s&&(s.scrollTo(e.left,e.top),!/(iPad|iPhone|iPod)/g.test(navigator.userAgent)||s.scrollY===e.top&&s.scrollX===e.left||(this.context.logger.warn("Unable to restore scroll position for cloned document"),this.context.windowBounds=this.context.windowBounds.add(s.scrollX-e.left,s.scrollY-e.top,0,0))),t=this.options.onclone,void 0===(n=this.clonedReferenceElement)?[2,Promise.reject("Error finding the "+this.referenceElement.nodeName+" in the cloned document")]:l.fonts&&l.fonts.ready?[4,l.fonts.ready]:[3,2];case 1:r.sent(),r.label=2;case 2:return/(AppleWebKit)/g.test(navigator.userAgent)?[4,po(l)]:[3,4];case 3:r.sent(),r.label=4;case 4:return"function"==typeof t?[2,Promise.resolve().then((function(){return t(l,n)})).then((function(){return o}))]:[2,o]}}))}))}));return l.open(),l.write(mo(document.doctype)+""),bo(this.referenceElement.ownerDocument,i,A),l.replaceChild(l.adoptNode(this.documentElement),l.documentElement),l.close(),c},t.prototype.createElementClone=function(t){if(Fr(t,2),Ha(t))return this.createCanvasClone(t);if(Pa(t))return this.createVideoClone(t);if(ja(t))return this.createStyleClone(t);var e=t.cloneNode(!1);return Oa(e)&&(Oa(t)&&t.currentSrc&&t.currentSrc!==t.src&&(e.src=t.currentSrc,e.srcset=""),"lazy"===e.loading&&(e.loading="eager")),qa(e)?this.createCustomElementClone(e):e},t.prototype.createCustomElementClone=function(t){var e=document.createElement("html2canvascustomelement");return go(t.style,e),e},t.prototype.createStyleClone=function(t){try{var e=t.sheet;if(e&&e.cssRules){var n=[].slice.call(e.cssRules,0).reduce((function(t,e){return e&&"string"==typeof e.cssText?t+e.cssText:t}),""),r=t.cloneNode(!1);return r.textContent=n,r}}catch(t){if(this.context.logger.error("Unable to access cssRules property",t),"SecurityError"!==t.name)throw t}return t.cloneNode(!1)},t.prototype.createCanvasClone=function(t){var e;if(this.options.inlineImages&&t.ownerDocument){var n=t.ownerDocument.createElement("img");try{return n.src=t.toDataURL(),n}catch(e){this.context.logger.info("Unable to inline canvas contents, canvas is tainted",t)}}var r=t.cloneNode(!1);try{r.width=t.width,r.height=t.height;var a=t.getContext("2d"),o=r.getContext("2d");if(o)if(!this.options.allowTaint&&a)o.putImageData(a.getImageData(0,0,t.width,t.height),0,0);else{var i=null!==(e=t.getContext("webgl2"))&&void 0!==e?e:t.getContext("webgl");if(i){var A=i.getContextAttributes();!1===(null==A?void 0:A.preserveDrawingBuffer)&&this.context.logger.warn("Unable to clone WebGL context as it has preserveDrawingBuffer=false",t)}o.drawImage(t,0,0)}return r}catch(e){this.context.logger.info("Unable to clone canvas as it is tainted",t)}return r},t.prototype.createVideoClone=function(t){var e=t.ownerDocument.createElement("canvas");e.width=t.offsetWidth,e.height=t.offsetHeight;var n=e.getContext("2d");try{return n&&(n.drawImage(t,0,0,e.width,e.height),this.options.allowTaint||n.getImageData(0,0,e.width,e.height)),e}catch(e){this.context.logger.info("Unable to clone video as it is tainted",t)}var r=t.ownerDocument.createElement("canvas");return r.width=t.offsetWidth,r.height=t.offsetHeight,r},t.prototype.appendChildNode=function(t,e,n){La(e)&&("SCRIPT"===e.tagName||e.hasAttribute(Ao)||"function"==typeof this.options.ignoreElements&&this.options.ignoreElements(e))||this.options.copyStyles&&La(e)&&ja(e)||t.appendChild(this.cloneNode(e,n))},t.prototype.cloneChildNodes=function(t,e,n){for(var r=this,a=t.shadowRoot?t.shadowRoot.firstChild:t.firstChild;a;a=a.nextSibling)if(La(a)&&Ga(a)&&"function"==typeof a.assignedNodes){var o=a.assignedNodes();o.length&&o.forEach((function(t){return r.appendChildNode(e,t,n)}))}else this.appendChildNode(e,a,n)},t.prototype.cloneNode=function(t,e){if(Ta(t))return document.createTextNode(t.data);if(!t.ownerDocument)return t.cloneNode(!1);var n=t.ownerDocument.defaultView;if(n&&La(t)&&(_a(t)||Sa(t))){var r=this.createElementClone(t);r.style.transitionProperty="none";var a=n.getComputedStyle(t),o=n.getComputedStyle(t,":before"),i=n.getComputedStyle(t,":after");this.referenceElement===t&&_a(r)&&(this.clonedReferenceElement=r),Da(r)&&Bo(r);var A=this.counters.parse(new Br(this.context,a)),s=this.resolvePseudoContent(t,r,o,Nr.BEFORE);qa(t)&&(e=!0),Pa(t)||this.cloneChildNodes(t,r,e),s&&r.insertBefore(s,r.firstChild);var l=this.resolvePseudoContent(t,r,i,Nr.AFTER);return l&&r.appendChild(l),this.counters.pop(A),(a&&(this.options.copyStyles||Sa(t))&&!Ma(t)||e)&&go(a,r),0===t.scrollTop&&0===t.scrollLeft||this.scrolledElements.push([r,t.scrollLeft,t.scrollTop]),(Ra(t)||Ka(t))&&(Ra(r)||Ka(r))&&(r.value=t.value),r}return t.cloneNode(!1)},t.prototype.resolvePseudoContent=function(t,e,n,r){var a=this;if(n){var o=n.content,i=e.ownerDocument;if(i&&o&&"none"!==o&&"-moz-alt-content"!==o&&"none"!==n.display){this.counters.parse(new Br(this.context,n));var A=new xr(this.context,n),s=i.createElement("html2canvaspseudoelement");go(n,s),A.content.forEach((function(e){if(0===e.type)s.appendChild(i.createTextNode(e.value));else if(22===e.type){var n=i.createElement("img");n.src=e.value,n.style.opacity="1",s.appendChild(n)}else if(18===e.type){if("attr"===e.name){var r=e.values.filter(qt);r.length&&s.appendChild(i.createTextNode(t.getAttribute(r[0].value)||""))}else if("counter"===e.name){var o=e.values.filter(Jt),l=o[0],c=o[1];if(l&&qt(l)){var d=a.counters.getCounterValue(l.value),u=c&&qt(c)?_n.parse(a.context,c.value):3;s.appendChild(i.createTextNode(io(d,u,!1)))}}else if("counters"===e.name){var p=e.values.filter(Jt),f=(l=p[0],p[1]);if(c=p[2],l&&qt(l)){var h=a.counters.getCounterValues(l.value),g=c&&qt(c)?_n.parse(a.context,c.value):3,m=f&&0===f.type?f.value:"",b=h.map((function(t){return io(t,g,!1)})).join(m);s.appendChild(i.createTextNode(b))}}}else if(20===e.type)switch(e.value){case"open-quote":s.appendChild(i.createTextNode(gr(A.quotes,a.quoteDepth++,!0)));break;case"close-quote":s.appendChild(i.createTextNode(gr(A.quotes,--a.quoteDepth,!1)));break;default:s.appendChild(i.createTextNode(e.value))}})),s.className=wo+" "+yo;var l=r===Nr.BEFORE?" "+wo:" "+yo;return Sa(e)?e.className.baseValue+=l:e.className+=l,s}}},t.destroy=function(t){return!!t.parentNode&&(t.parentNode.removeChild(t),!0)},t}();!function(t){t[t.BEFORE=0]="BEFORE",t[t.AFTER=1]="AFTER"}(Nr||(Nr={}));var lo,co=function(t,e){var n=t.createElement("iframe");return n.className="html2canvas-container",n.style.visibility="hidden",n.style.position="fixed",n.style.left="-10000px",n.style.top="0px",n.style.border="0",n.width=e.width.toString(),n.height=e.height.toString(),n.scrolling="no",n.setAttribute(Ao,"true"),t.body.appendChild(n),n},uo=function(t){return new Promise((function(e){t.complete?e():t.src?(t.onload=e,t.onerror=e):e()}))},po=function(t){return Promise.all([].slice.call(t.images,0).map(uo))},fo=function(t){return new Promise((function(e,n){var r=t.contentWindow;if(!r)return n("No window assigned for iframe");var a=r.document;r.onload=t.onload=function(){r.onload=t.onload=null;var n=setInterval((function(){a.body.childNodes.length>0&&"complete"===a.readyState&&(clearInterval(n),e(t))}),50)}}))},ho=["all","d","content"],go=function(t,e){for(var n=t.length-1;n>=0;n--){var r=t.item(n);-1===ho.indexOf(r)&&e.style.setProperty(r,t.getPropertyValue(r))}return e},mo=function(t){var e="";return t&&(e+=""),e},bo=function(t,e,n){t&&t.defaultView&&(e!==t.defaultView.pageXOffset||n!==t.defaultView.pageYOffset)&&t.defaultView.scrollTo(e,n)},vo=function(t){var e=t[0],n=t[1],r=t[2];e.scrollLeft=n,e.scrollTop=r},wo="___html2canvas___pseudoelement_before",yo="___html2canvas___pseudoelement_after",xo='{\n content: "" !important;\n display: none !important;\n}',Bo=function(t){Co(t,"."+wo+":before"+xo+"\n ."+yo+":after"+xo)},Co=function(t,e){var n=t.ownerDocument;if(n){var r=n.createElement("style");r.textContent=e,t.appendChild(r)}},Fo=function(){function t(){}return t.getOrigin=function(e){var n=t._link;return n?(n.href=e,n.href=n.href,n.protocol+n.hostname+n.port):"about:blank"},t.isSameOrigin=function(e){return t.getOrigin(e)===t._origin},t.setContext=function(e){t._link=e.document.createElement("a"),t._origin=t.getOrigin(e.location.href)},t._origin="about:blank",t}(),Uo=function(){function t(t,e){this.context=t,this._options=e,this._cache={}}return t.prototype.addImage=function(t){var e=Promise.resolve();return this.has(t)?e:Eo(t)||_o(t)?((this._cache[t]=this.loadImage(t)).catch((function(){})),e):e},t.prototype.match=function(t){return this._cache[t]},t.prototype.loadImage=function(t){return r(this,void 0,void 0,(function(){var e,n,r,o,i=this;return a(this,(function(a){switch(a.label){case 0:return e=Fo.isSameOrigin(t),n=!So(t)&&!0===this._options.useCORS&&Jr.SUPPORT_CORS_IMAGES&&!e,r=!So(t)&&!e&&!Eo(t)&&"string"==typeof this._options.proxy&&Jr.SUPPORT_CORS_XHR&&!n,e||!1!==this._options.allowTaint||So(t)||Eo(t)||r||n?(o=t,r?[4,this.proxy(o)]:[3,2]):[2];case 1:o=a.sent(),a.label=2;case 2:return this.context.logger.debug("Added image "+t.substring(0,256)),[4,new Promise((function(t,e){var r=new Image;r.onload=function(){return t(r)},r.onerror=e,(ko(o)||n)&&(r.crossOrigin="anonymous"),r.src=o,!0===r.complete&&setTimeout((function(){return t(r)}),500),i._options.imageTimeout>0&&setTimeout((function(){return e("Timed out ("+i._options.imageTimeout+"ms) loading image")}),i._options.imageTimeout)}))];case 3:return[2,a.sent()]}}))}))},t.prototype.has=function(t){return void 0!==this._cache[t]},t.prototype.keys=function(){return Promise.resolve(Object.keys(this._cache))},t.prototype.proxy=function(t){var e=this,n=this._options.proxy;if(!n)throw new Error("No proxy defined");var r=t.substring(0,256);return new Promise((function(a,o){var i=Jr.SUPPORT_RESPONSE_TYPE?"blob":"text",A=new XMLHttpRequest;A.onload=function(){if(200===A.status)if("text"===i)a(A.response);else{var t=new FileReader;t.addEventListener("load",(function(){return a(t.result)}),!1),t.addEventListener("error",(function(t){return o(t)}),!1),t.readAsDataURL(A.response)}else o("Failed to proxy resource "+r+" with status code "+A.status)},A.onerror=o;var s=n.indexOf("?")>-1?"&":"?";if(A.open("GET",""+n+s+"url="+encodeURIComponent(t)+"&responseType="+i),"text"!==i&&A instanceof XMLHttpRequest&&(A.responseType=i),e._options.imageTimeout){var l=e._options.imageTimeout;A.timeout=l,A.ontimeout=function(){return o("Timed out ("+l+"ms) proxying "+r)}}A.send()}))},t}(),Qo=/^data:image\/svg\+xml/i,To=/^data:image\/.*;base64,/i,Lo=/^data:image\/.*/i,_o=function(t){return Jr.SUPPORT_SVG_DRAWING||!Io(t)},So=function(t){return Lo.test(t)},ko=function(t){return To.test(t)},Eo=function(t){return"blob"===t.substr(0,4)},Io=function(t){return"svg"===t.substr(-3).toLowerCase()||Qo.test(t)},No=function(){function t(t,e){this.type=0,this.x=t,this.y=e}return t.prototype.add=function(e,n){return new t(this.x+e,this.y+n)},t}(),Do=function(t,e,n){return new No(t.x+(e.x-t.x)*n,t.y+(e.y-t.y)*n)},Ho=function(){function t(t,e,n,r){this.type=1,this.start=t,this.startControl=e,this.endControl=n,this.end=r}return t.prototype.subdivide=function(e,n){var r=Do(this.start,this.startControl,e),a=Do(this.startControl,this.endControl,e),o=Do(this.endControl,this.end,e),i=Do(r,a,e),A=Do(a,o,e),s=Do(i,A,e);return n?new t(this.start,r,i,s):new t(s,A,o,this.end)},t.prototype.add=function(e,n){return new t(this.start.add(e,n),this.startControl.add(e,n),this.endControl.add(e,n),this.end.add(e,n))},t.prototype.reverse=function(){return new t(this.end,this.endControl,this.startControl,this.start)},t}(),Po=function(t){return 1===t.type},Oo=function(t){var e=t.styles,n=t.bounds,r=ae(e.borderTopLeftRadius,n.width,n.height),a=r[0],o=r[1],i=ae(e.borderTopRightRadius,n.width,n.height),A=i[0],s=i[1],l=ae(e.borderBottomRightRadius,n.width,n.height),c=l[0],d=l[1],u=ae(e.borderBottomLeftRadius,n.width,n.height),p=u[0],f=u[1],h=[];h.push((a+A)/n.width),h.push((p+c)/n.width),h.push((o+f)/n.height),h.push((s+d)/n.height);var g=Math.max.apply(Math,h);g>1&&(a/=g,o/=g,A/=g,s/=g,c/=g,d/=g,p/=g,f/=g);var m=n.width-A,b=n.height-d,v=n.width-c,w=n.height-f,y=e.borderTopWidth,x=e.borderRightWidth,B=e.borderBottomWidth,C=e.borderLeftWidth,F=oe(e.paddingTop,t.bounds.width),U=oe(e.paddingRight,t.bounds.width),Q=oe(e.paddingBottom,t.bounds.width),T=oe(e.paddingLeft,t.bounds.width);this.topLeftBorderDoubleOuterBox=a>0||o>0?Mo(n.left+C/3,n.top+y/3,a-C/3,o-y/3,lo.TOP_LEFT):new No(n.left+C/3,n.top+y/3),this.topRightBorderDoubleOuterBox=a>0||o>0?Mo(n.left+m,n.top+y/3,A-x/3,s-y/3,lo.TOP_RIGHT):new No(n.left+n.width-x/3,n.top+y/3),this.bottomRightBorderDoubleOuterBox=c>0||d>0?Mo(n.left+v,n.top+b,c-x/3,d-B/3,lo.BOTTOM_RIGHT):new No(n.left+n.width-x/3,n.top+n.height-B/3),this.bottomLeftBorderDoubleOuterBox=p>0||f>0?Mo(n.left+C/3,n.top+w,p-C/3,f-B/3,lo.BOTTOM_LEFT):new No(n.left+C/3,n.top+n.height-B/3),this.topLeftBorderDoubleInnerBox=a>0||o>0?Mo(n.left+2*C/3,n.top+2*y/3,a-2*C/3,o-2*y/3,lo.TOP_LEFT):new No(n.left+2*C/3,n.top+2*y/3),this.topRightBorderDoubleInnerBox=a>0||o>0?Mo(n.left+m,n.top+2*y/3,A-2*x/3,s-2*y/3,lo.TOP_RIGHT):new No(n.left+n.width-2*x/3,n.top+2*y/3),this.bottomRightBorderDoubleInnerBox=c>0||d>0?Mo(n.left+v,n.top+b,c-2*x/3,d-2*B/3,lo.BOTTOM_RIGHT):new No(n.left+n.width-2*x/3,n.top+n.height-2*B/3),this.bottomLeftBorderDoubleInnerBox=p>0||f>0?Mo(n.left+2*C/3,n.top+w,p-2*C/3,f-2*B/3,lo.BOTTOM_LEFT):new No(n.left+2*C/3,n.top+n.height-2*B/3),this.topLeftBorderStroke=a>0||o>0?Mo(n.left+C/2,n.top+y/2,a-C/2,o-y/2,lo.TOP_LEFT):new No(n.left+C/2,n.top+y/2),this.topRightBorderStroke=a>0||o>0?Mo(n.left+m,n.top+y/2,A-x/2,s-y/2,lo.TOP_RIGHT):new No(n.left+n.width-x/2,n.top+y/2),this.bottomRightBorderStroke=c>0||d>0?Mo(n.left+v,n.top+b,c-x/2,d-B/2,lo.BOTTOM_RIGHT):new No(n.left+n.width-x/2,n.top+n.height-B/2),this.bottomLeftBorderStroke=p>0||f>0?Mo(n.left+C/2,n.top+w,p-C/2,f-B/2,lo.BOTTOM_LEFT):new No(n.left+C/2,n.top+n.height-B/2),this.topLeftBorderBox=a>0||o>0?Mo(n.left,n.top,a,o,lo.TOP_LEFT):new No(n.left,n.top),this.topRightBorderBox=A>0||s>0?Mo(n.left+m,n.top,A,s,lo.TOP_RIGHT):new No(n.left+n.width,n.top),this.bottomRightBorderBox=c>0||d>0?Mo(n.left+v,n.top+b,c,d,lo.BOTTOM_RIGHT):new No(n.left+n.width,n.top+n.height),this.bottomLeftBorderBox=p>0||f>0?Mo(n.left,n.top+w,p,f,lo.BOTTOM_LEFT):new No(n.left,n.top+n.height),this.topLeftPaddingBox=a>0||o>0?Mo(n.left+C,n.top+y,Math.max(0,a-C),Math.max(0,o-y),lo.TOP_LEFT):new No(n.left+C,n.top+y),this.topRightPaddingBox=A>0||s>0?Mo(n.left+Math.min(m,n.width-x),n.top+y,m>n.width+x?0:Math.max(0,A-x),Math.max(0,s-y),lo.TOP_RIGHT):new No(n.left+n.width-x,n.top+y),this.bottomRightPaddingBox=c>0||d>0?Mo(n.left+Math.min(v,n.width-C),n.top+Math.min(b,n.height-B),Math.max(0,c-x),Math.max(0,d-B),lo.BOTTOM_RIGHT):new No(n.left+n.width-x,n.top+n.height-B),this.bottomLeftPaddingBox=p>0||f>0?Mo(n.left+C,n.top+Math.min(w,n.height-B),Math.max(0,p-C),Math.max(0,f-B),lo.BOTTOM_LEFT):new No(n.left+C,n.top+n.height-B),this.topLeftContentBox=a>0||o>0?Mo(n.left+C+T,n.top+y+F,Math.max(0,a-(C+T)),Math.max(0,o-(y+F)),lo.TOP_LEFT):new No(n.left+C+T,n.top+y+F),this.topRightContentBox=A>0||s>0?Mo(n.left+Math.min(m,n.width+C+T),n.top+y+F,m>n.width+C+T?0:A-C+T,s-(y+F),lo.TOP_RIGHT):new No(n.left+n.width-(x+U),n.top+y+F),this.bottomRightContentBox=c>0||d>0?Mo(n.left+Math.min(v,n.width-(C+T)),n.top+Math.min(b,n.height+y+F),Math.max(0,c-(x+U)),d-(B+Q),lo.BOTTOM_RIGHT):new No(n.left+n.width-(x+U),n.top+n.height-(B+Q)),this.bottomLeftContentBox=p>0||f>0?Mo(n.left+C+T,n.top+w,Math.max(0,p-(C+T)),f-(B+Q),lo.BOTTOM_LEFT):new No(n.left+C+T,n.top+n.height-(B+Q))};!function(t){t[t.TOP_LEFT=0]="TOP_LEFT",t[t.TOP_RIGHT=1]="TOP_RIGHT",t[t.BOTTOM_RIGHT=2]="BOTTOM_RIGHT",t[t.BOTTOM_LEFT=3]="BOTTOM_LEFT"}(lo||(lo={}));var Mo=function(t,e,n,r,a){var o=(Math.sqrt(2)-1)/3*4,i=n*o,A=r*o,s=t+n,l=e+r;switch(a){case lo.TOP_LEFT:return new Ho(new No(t,l),new No(t,l-A),new No(s-i,e),new No(s,e));case lo.TOP_RIGHT:return new Ho(new No(t,e),new No(t+i,e),new No(s,l-A),new No(s,l));case lo.BOTTOM_RIGHT:return new Ho(new No(s,e),new No(s,e+A),new No(t+i,l),new No(t,l));case lo.BOTTOM_LEFT:default:return new Ho(new No(s,l),new No(s-i,l),new No(t,e+A),new No(t,e))}},jo=function(t){return[t.topLeftBorderBox,t.topRightBorderBox,t.bottomRightBorderBox,t.bottomLeftBorderBox]},Ro=function(t){return[t.topLeftPaddingBox,t.topRightPaddingBox,t.bottomRightPaddingBox,t.bottomLeftPaddingBox]},Ko=function(t,e,n){this.offsetX=t,this.offsetY=e,this.matrix=n,this.type=0,this.target=6},Go=function(t,e){this.path=t,this.target=e,this.type=1},qo=function(t){this.opacity=t,this.type=2,this.target=6},zo=function(t){return 1===t.type},Vo=function(t,e){return t.length===e.length&&t.some((function(t,n){return t===e[n]}))},Wo=function(t){this.element=t,this.inlineLevel=[],this.nonInlineLevel=[],this.negativeZIndex=[],this.zeroOrAutoZIndexOrTransformedOrOpacity=[],this.positiveZIndex=[],this.nonPositionedFloats=[],this.nonPositionedInlineLevel=[]},Jo=function(){function t(t,e){if(this.container=t,this.parent=e,this.effects=[],this.curves=new Oo(this.container),this.container.styles.opacity<1&&this.effects.push(new qo(this.container.styles.opacity)),null!==this.container.styles.transform){var n=this.container.bounds.left+this.container.styles.transformOrigin[0].number,r=this.container.bounds.top+this.container.styles.transformOrigin[1].number,a=this.container.styles.transform;this.effects.push(new Ko(n,r,a))}if(0!==this.container.styles.overflowX){var o=jo(this.curves),i=Ro(this.curves);Vo(o,i)?this.effects.push(new Go(o,6)):(this.effects.push(new Go(o,2)),this.effects.push(new Go(i,4)))}}return t.prototype.getEffects=function(t){for(var e=-1===[2,3].indexOf(this.container.styles.position),n=this.parent,r=this.effects.slice(0);n;){var a=n.effects.filter((function(t){return!zo(t)}));if(e||0!==n.container.styles.position||!n.parent){if(r.unshift.apply(r,a),e=-1===[2,3].indexOf(n.container.styles.position),0!==n.container.styles.overflowX){var o=jo(n.curves),i=Ro(n.curves);Vo(o,i)||r.unshift(new Go(i,6))}}else r.unshift.apply(r,a);n=n.parent}return r.filter((function(e){return cr(e.target,t)}))},t}(),Xo=function(t,e,n,r){t.container.elements.forEach((function(a){var o=cr(a.flags,4),i=cr(a.flags,2),A=new Jo(a,t);cr(a.styles.display,2048)&&r.push(A);var s=cr(a.flags,8)?[]:r;if(o||i){var l=o||a.styles.isPositioned()?n:e,c=new Wo(A);if(a.styles.isPositioned()||a.styles.opacity<1||a.styles.isTransformed()){var d=a.styles.zIndex.order;if(d<0){var u=0;l.negativeZIndex.some((function(t,e){return d>t.element.container.styles.zIndex.order?(u=e,!1):u>0})),l.negativeZIndex.splice(u,0,c)}else if(d>0){var p=0;l.positiveZIndex.some((function(t,e){return d>=t.element.container.styles.zIndex.order?(p=e+1,!1):p>0})),l.positiveZIndex.splice(p,0,c)}else l.zeroOrAutoZIndexOrTransformedOrOpacity.push(c)}else a.styles.isFloating()?l.nonPositionedFloats.push(c):l.nonPositionedInlineLevel.push(c);Xo(A,c,o?c:n,s)}else a.styles.isInlineLevel()?e.inlineLevel.push(A):e.nonInlineLevel.push(A),Xo(A,e,n,s);cr(a.flags,8)&&Yo(a,s)}))},Yo=function(t,e){for(var n=t instanceof da?t.start:1,r=t instanceof da&&t.reversed,a=0;a0&&t.intrinsicHeight>0){var r=ni(t),a=Ro(e);this.path(a),this.ctx.save(),this.ctx.clip(),this.ctx.drawImage(n,0,0,t.intrinsicWidth,t.intrinsicHeight,r.left,r.top,r.width,r.height),this.ctx.restore()}},n.prototype.renderNodeContent=function(t){return r(this,void 0,void 0,(function(){var e,r,o,A,s,l,c,d,u,p,f,h,g,m,b,v,w,y;return a(this,(function(a){switch(a.label){case 0:this.applyEffects(t.getEffects(4)),e=t.container,r=t.curves,o=e.styles,A=0,s=e.textNodes,a.label=1;case 1:return A0&&C>0&&(b=r.ctx.createPattern(h,"repeat"),r.renderRepeat(w,b,U,Q))):function(t){return 2===t.type}(n)&&(v=ri(t,e,[null,null,null]),w=v[0],y=v[1],x=v[2],B=v[3],C=v[4],F=0===n.position.length?[ne]:n.position,U=oe(F[0],B),Q=oe(F[F.length-1],C),T=function(t,e,n,r,a){var o=0,i=0;switch(t.size){case 0:0===t.shape?o=i=Math.min(Math.abs(e),Math.abs(e-r),Math.abs(n),Math.abs(n-a)):1===t.shape&&(o=Math.min(Math.abs(e),Math.abs(e-r)),i=Math.min(Math.abs(n),Math.abs(n-a)));break;case 2:if(0===t.shape)o=i=Math.min(Te(e,n),Te(e,n-a),Te(e-r,n),Te(e-r,n-a));else if(1===t.shape){var A=Math.min(Math.abs(n),Math.abs(n-a))/Math.min(Math.abs(e),Math.abs(e-r)),s=Le(r,a,e,n,!0),l=s[0],c=s[1];i=A*(o=Te(l-e,(c-n)/A))}break;case 1:0===t.shape?o=i=Math.max(Math.abs(e),Math.abs(e-r),Math.abs(n),Math.abs(n-a)):1===t.shape&&(o=Math.max(Math.abs(e),Math.abs(e-r)),i=Math.max(Math.abs(n),Math.abs(n-a)));break;case 3:if(0===t.shape)o=i=Math.max(Te(e,n),Te(e,n-a),Te(e-r,n),Te(e-r,n-a));else if(1===t.shape){A=Math.max(Math.abs(n),Math.abs(n-a))/Math.max(Math.abs(e),Math.abs(e-r));var d=Le(r,a,e,n,!1);l=d[0],c=d[1],i=A*(o=Te(l-e,(c-n)/A))}}return Array.isArray(t.size)&&(o=oe(t.size[0],r),i=2===t.size.length?oe(t.size[1],a):o),[o,i]}(n,U,Q,B,C),L=T[0],_=T[1],L>0&&_>0&&(S=r.ctx.createRadialGradient(y+U,x+Q,0,y+U,x+Q,L),Ue(n.stops,2*L).forEach((function(t){return S.addColorStop(t.stop,fe(t.color))})),r.path(w),r.ctx.fillStyle=S,L!==_?(k=t.bounds.left+.5*t.bounds.width,E=t.bounds.top+.5*t.bounds.height,N=1/(I=_/L),r.ctx.save(),r.ctx.translate(k,E),r.ctx.transform(1,0,0,I,0,0),r.ctx.translate(-k,-E),r.ctx.fillRect(y,N*(x-E)+E,B,C*N),r.ctx.restore()):r.ctx.fill())),a.label=6;case 6:return e--,[2]}}))},r=this,o=0,i=t.styles.backgroundImage.slice(0).reverse(),s.label=1;case 1:return o0?2!==l.style?[3,5]:[4,this.renderDashedDottedBorder(l.color,l.width,i,t.curves,2)]:[3,11]:[3,13];case 4:return a.sent(),[3,11];case 5:return 3!==l.style?[3,7]:[4,this.renderDashedDottedBorder(l.color,l.width,i,t.curves,3)];case 6:return a.sent(),[3,11];case 7:return 4!==l.style?[3,9]:[4,this.renderDoubleBorder(l.color,l.width,i,t.curves)];case 8:return a.sent(),[3,11];case 9:return[4,this.renderSolidBorder(l.color,i,t.curves)];case 10:a.sent(),a.label=11;case 11:i++,a.label=12;case 12:return A++,[3,3];case 13:return[2]}}))}))},n.prototype.renderDashedDottedBorder=function(t,e,n,o,i){return r(this,void 0,void 0,(function(){var r,A,s,l,c,d,u,p,f,h,g,m,b,v,w,y;return a(this,(function(a){return this.ctx.save(),r=function(t,e){switch(e){case 0:return Zo(t.topLeftBorderStroke,t.topRightBorderStroke);case 1:return Zo(t.topRightBorderStroke,t.bottomRightBorderStroke);case 2:return Zo(t.bottomRightBorderStroke,t.bottomLeftBorderStroke);default:return Zo(t.bottomLeftBorderStroke,t.topLeftBorderStroke)}}(o,n),A=$o(o,n),2===i&&(this.path(A),this.ctx.clip()),Po(A[0])?(s=A[0].start.x,l=A[0].start.y):(s=A[0].x,l=A[0].y),Po(A[1])?(c=A[1].end.x,d=A[1].end.y):(c=A[1].x,d=A[1].y),u=0===n||2===n?Math.abs(s-c):Math.abs(l-d),this.ctx.beginPath(),3===i?this.formatPath(r):this.formatPath(A.slice(0,2)),p=e<3?3*e:2*e,f=e<3?2*e:e,3===i&&(p=e,f=e),h=!0,u<=2*p?h=!1:u<=2*p+f?(p*=g=u/(2*p+f),f*=g):(m=Math.floor((u+f)/(p+f)),b=(u-m*p)/(m-1),f=(v=(u-(m+1)*p)/m)<=0||Math.abs(f-b){"use strict";t.exports=function(t){var e=document.createElement("style");return t.setAttributes(e,t.attributes),t.insert(e,t.options),e}},580:t=>{"use strict";var e=/["'&<>]/;t.exports=function(t){var n,r=""+t,a=e.exec(r);if(!a)return r;var o="",i=0,A=0;for(i=a.index;i{var r=n(281),a=0,o=Math.random(),i=r(1..toString);t.exports=function(t){return"Symbol("+(void 0===t?"":t)+")_"+i(++a+o,36)}},779:(t,e,n)=>{"use strict";n(7136);var r=n(3091),a=n(7485),o=n(54),i=n(2074),A=n(1602),s=n(7712),l=A("species"),c=RegExp.prototype;t.exports=function(t,e,n,d){var u=A(t),p=!i((function(){var e={};return e[u]=function(){return 7},7!=""[t](e)})),f=p&&!i((function(){var e=!1,n=/a/;return"split"===t&&((n={}).constructor={},n.constructor[l]=function(){return n},n.flags="",n[u]=/./[u]),n.exec=function(){return e=!0,null},n[u](""),!e}));if(!p||!f||n){var h=r(/./[u]),g=e(u,""[t],(function(t,e,n,a,i){var A=r(t),s=e.exec;return s===o||s===c.exec?p&&!i?{done:!0,value:h(e,n,a)}:{done:!0,value:A(n,e,a)}:{done:!1}}));a(String.prototype,t,g[0]),a(c,u,g[1])}d&&s(c[u],"sham",!0)}},874:(t,e,n)=>{var r=n(2368),a=n(5335),o=n(2328),i=n(6457),A=n(9751),s=n(1602),l=TypeError,c=s("toPrimitive");t.exports=function(t,e){if(!a(t)||o(t))return t;var n,s=i(t,c);if(s){if(void 0===e&&(e="default"),n=r(s,t,e),!a(n)||o(n))return n;throw l("Can't convert object to primitive value")}return void 0===e&&(e="number"),A(t,e)}},1036:(t,e,n)=>{var r=n(2074),a=n(200).RegExp;t.exports=r((function(){var t=a(".","s");return!(t.dotAll&&t.exec("\n")&&"s"===t.flags)}))},1113:t=>{"use strict";t.exports=function(t,e){if(e.styleSheet)e.styleSheet.cssText=t;else{for(;e.firstChild;)e.removeChild(e.firstChild);e.appendChild(document.createTextNode(t))}}},1144:t=>{"use strict";t.exports="data:image/svg+xml,%3csvg xmlns=%27http://www.w3.org/2000/svg%27 viewBox=%270 0 16 16%27 fill=%27%23fff%27%3e%3cpath d=%27M4.646 1.646a.5.5 0 0 1 .708 0l6 6a.5.5 0 0 1 0 .708l-6 6a.5.5 0 0 1-.708-.708L10.293 8 4.646 2.354a.5.5 0 0 1 0-.708z%27/%3e%3c/svg%3e"},1229:(t,e,n)=>{var r=n(8406),a=TypeError;t.exports=function(t){if(r(t))throw a("Can't call method on "+t);return t}},1479:t=>{"use strict";t.exports="data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIGhlaWdodD0iMTYiIHdpZHRoPSIxNiI+CiAgPHBhdGggZD0iTTE0IDEyLjNMMTIuMyAxNCA4IDkuNyAzLjcgMTQgMiAxMi4zIDYuMyA4IDIgMy43IDMuNyAyIDggNi4zIDEyLjMgMiAxNCAzLjcgOS43IDh6IiBzdHlsZT0iZmlsbC1vcGFjaXR5OjE7ZmlsbDojZmZmZmZmIi8+Cjwvc3ZnPgo="},1556:(e,n,r)=>{"use strict";r.d(n,{W:()=>l});var a=r(9498),o=r(9595),i=r(2933),A=r(6247),s=(r(6664),r(5458),r(4692));class l{constructor(t){this.id=t.id,this.user_id=t.user_id,this.id_nextcloud=t.id_nextcloud,this.date=null==t.date||0===t.date.length?"-":t.date,this.num=null==t.num||0===t.num.length?"-":t.num,this.id_defunt=null==t.id_defunt||0===t.id_defunt.length?"-":t.id_defunt,this.nom_defunt=null==t.nom_defunt||0===t.nom_defunt.length?"-":t.nom_defunt,this.cid=null==t.cid||0===t.cid.length?"-":t.cid,this.lid=null==t.lid||0===t.lid.length?"-":t.lid,this.tid=null==t.tid||0===t.tid.length?"-":t.tid,this.nom=null==t.nom||0===t.nom.length?"-":t.nom,this.prenom=null==t.prenom||0===t.prenom.length?"-":t.prenom,this.nomThanato=l.getDevisThanatoFullname(t),this.version=null==t.version||0===t.version.length?"-":t.version,this.lieu=null==t.lieu||0===t.lieu.length?"-":t.lieu,this.mentions=l.getDevisMentionFromApiResponse(t),this.baseUrl=(0,a.Jv)(`/apps/gestion/devis/${this.id}/show`),this.devisFullNumber=null!=t.devis_full_number&&0!=t.mentions.devis_full_number?t.devis_full_number:"-",this.devisProduits=l.getDevisProduitsString(t)}static getDevisMentionLabelFromMention(t){let e=t;switch(t){case A.kC:e="Facturé";break;case A.Ru:e="Annulé";break;case A.ab:e="Facturé";break;default:e=t}return e}static getDevisMentionFromApiResponse(t){let e="-";return null!=t.mentions&&t.mentions.length>0&&(e=t.mentions),e}static getDevisThanatoFullname(t){let e="",n="",r="";return null!=t.nom_thanato&&0!=t.nom_thanato.length&&(n=t.nom_thanato,r+=n),null!=t.prenom_thanato&&0!=t.prenom_thanato.length&&(e=t.prenom_thanato,n.length>0&&e.length>0&&(r+=" "),r+=e),0===r.length?"-":r}static getDevisMentionCssStyle(t){let e="display:inline; border-radius: 5px; padding: 8px;";return t===A.kC||t===A.ab?e+=" background-color:green !important; color: white":t===A.Ru?e+=" background-color:red !important; color: white":e+=" background-color:yellow !important",e}static getDevisProduitsString(t){let e="";if(null!=t.produits&&t.produits.length>0){let n=t.produits,r=n.length;for(let t=0;t',"
"+this.user_id+"
","
"+this.devisFullNumber+"
",'','
'+this.id_defunt+" ("+this.nom_defunt+")
",'
'+this.cid+" ("+this.prenom+" "+this.nom+")
",'
'+this.tid+" ("+this.nomThanato+")
",'
'+this.lieu+"
","
"+this.devisProduits+"
",'
'+l.getDevisMentionLabelFromMention(this.mentions)+"
",'
']}static newDevis(t){var e=new XMLHttpRequest;e.open("POST",i.pc+"/devis/insert",!0),e.onload=function(e){200==this.status?((0,i.It)(),l.loadDevisDT(t)):showError(this.response)},e.send()}static loadDevisDT(t){var e=new XMLHttpRequest;e.open("PROPFIND",i.pc+"/getDevisWithProduits",!0),e.setRequestHeader("Content-Type","application/json"),e.onload=function(e){200==this.status?(0,i.lG)(t,JSON.parse(this.response),l):showError(this.response)},e.send()}static getDevis(t){var e=new XMLHttpRequest;e.open("PROPFIND",i.pc+"/getDevis",!0),e.setRequestHeader("Content-Type","application/json"),e.onload=function(e){if(200==this.status){let e=JSON.parse(JSON.parse(this.response)).filter((t=>t.mentions!=A.kC&&t.mentions!=A.ab&&t.mentions!=A.Ru));e=JSON.stringify(JSON.stringify(e)),t(JSON.parse(e))}else showError(this.response)},e.send()}static getAllDevis(t,e=[]){var n=new XMLHttpRequest;let r=i.pc+"/getDevis";e.length>0&&(r=`${r}?${e.map((t=>`mentionFilters[]=${encodeURIComponent(t)}`)).join("&")}`),n.open("PROPFIND",r,!0),n.setRequestHeader("Content-Type","application/json"),n.onload=function(e){if(200==this.status){let e=JSON.parse(JSON.parse(this.response));e=JSON.stringify(JSON.stringify(e)),t(JSON.parse(e))}else showError(this.response)},n.send()}static getAllDevisDelphine(t,e){var n=new XMLHttpRequest;n.open("PROPFIND",i.pc+"/getDevisDelphine/"+t.target.dataset.id,!0),n.setRequestHeader("Content-Type","application/json"),n.onload=function(t){if(200==this.status){let t=JSON.parse(JSON.parse(this.response));t=JSON.stringify(JSON.stringify(t)),e(JSON.parse(t))}else showError(this.response)},n.send()}static loadDevisList_dnum(e){l.getDevis((n=>{var r=document.createElement("select");r.dataset.current=e.target.dataset.current,r.dataset.id=e.target.dataset.id,r.dataset.old=e.target.innerHTML;var a=document.createElement("option");a.value=0,a.text=t("gestion","Cancel"),r.appendChild(a),JSON.parse(n).forEach((t=>{var e=t.prenom&&t.nom?(t.prenom?t.prenom:"")+" "+(t.nom?t.nom:""):"-",n=t.nom_defunt?t.nom_defunt:"-",a=document.createElement("textarea");a.innerHTML=n+" ("+e+")";var o=document.createElement("option");o.value=t.id,o.text=a.value,r.appendChild(o)})),(0,i.pq)(r),e.target.innerHTML="",e.target.appendChild(r),s(r).select2(),s(r).on("select2:select",(function(t){var e,n=t.target;0!=n.value?((0,o.gs)(n.parentElement.dataset.table,n.parentElement.dataset.column,n.value,n.parentElement.dataset.id),location.reload(),(e=n.parentElement).innerHTML=n.options[n.selectedIndex].text,e.dataset.current=n.value):(e=n.parentElement).innerHTML=n.dataset.old}))}))}static loadAllDevisList_dnum(e,n=[]){l.getAllDevis((n=>{var r=document.createElement("select");r.dataset.current=e.target.dataset.current,r.dataset.id=e.target.dataset.id,r.dataset.old=e.target.innerHTML;var a=document.createElement("option");a.value=0,a.text=t("gestion","Cancel"),r.appendChild(a),JSON.parse(n).forEach((t=>{var e=t.prenom&&t.nom?(t.prenom?t.prenom:"")+" "+(t.nom?t.nom:""):"-",n=t.nom_defunt?t.nom_defunt:"-",a=document.createElement("textarea");a.innerHTML=n+" ("+e+")";var o=document.createElement("option");o.value=t.id,o.text=a.value,r.appendChild(o)})),(0,i.pq)(r),e.target.innerHTML="",e.target.appendChild(r),s(r).select2(),s(r).on("select2:select",(function(t){var e,n=t.target;0!=n.value?((0,o.gs)(n.parentElement.dataset.table,n.parentElement.dataset.column,n.value,n.parentElement.dataset.id),location.reload(),(e=n.parentElement).innerHTML=n.options[n.selectedIndex].text,e.dataset.current=n.value):(e=n.parentElement).innerHTML=n.dataset.old}))}),n)}static loadDelphineDevisList_dnum(e){l.getAllDevisDelphine(e,(n=>{var r=document.createElement("select");r.dataset.current=e.target.dataset.current,r.dataset.id=e.target.dataset.id,r.dataset.old=e.target.innerHTML;var a=document.createElement("option");a.value=0,a.text=t("gestion","Cancel"),r.appendChild(a),JSON.parse(n).forEach((t=>{var e=t.prenom&&t.nom?(t.prenom?t.prenom:"")+" "+(t.nom?t.nom:""):"-",n=t.nom_defunt?t.nom_defunt:"-",a=document.createElement("textarea");a.innerHTML=n+" ("+e+")";var o=document.createElement("option");o.value=t.id,o.text=a.value,r.appendChild(o)})),(0,i.pq)(r),e.target.innerHTML="",e.target.appendChild(r),s(r).select2(),s(r).on("select2:select",(function(t){var e=t.target,n=e.parentElement;0!=e.value?((0,o.gs)(n.dataset.table,n.dataset.column,e.value,n.dataset.id),location.reload(),n.innerHTML=e.options[e.selectedIndex].text,n.dataset.current=e.value):n.innerHTML=e.dataset.old}))}))}}},1601:t=>{"use strict";t.exports=function(t){return t[1]}},1602:(t,e,n)=>{var r=n(200),a=n(2),o=n(6490),i=n(665),A=n(2072),s=n(5225),l=r.Symbol,c=a("wks"),d=s?l.for||l:l&&l.withoutSetter||i;t.exports=function(t){return o(c,t)||(c[t]=A&&o(l,t)?l[t]:d("Symbol."+t)),c[t]}},1605:(t,e,n)=>{var r=n(200),a=n(7632).f,o=n(7712),i=n(7485),A=n(9430),s=n(4361),l=n(4977);t.exports=function(t,e){var n,c,d,u,p,f=t.target,h=t.global,g=t.stat;if(n=h?r:g?r[f]||A(f,{}):(r[f]||{}).prototype)for(c in e){if(u=e[c],d=t.dontCallGetSet?(p=a(n,c))&&p.value:n[c],!l(h?c:f+(g?".":"#")+c,t.forced)&&void 0!==d){if(typeof u==typeof d)continue;s(u,d)}(t.sham||d&&d.sham)&&o(u,"sham",!0),i(n,c,u,t)}}},1641:(t,e,n)=>{var r=n(6347),a=n(290);t.exports=Object.keys||function(t){return r(t,a)}},1688:(t,e,n)=>{"use strict";var r=n(5077),a=n(281),o=n(2368),i=n(2074),A=n(1641),s=n(8916),l=n(9304),c=n(2612),d=n(8664),u=Object.assign,p=Object.defineProperty,f=a([].concat);t.exports=!u||i((function(){if(r&&1!==u({b:1},u(p({},"a",{enumerable:!0,get:function(){p(this,"b",{value:3,enumerable:!1})}}),{b:2})).b)return!0;var t={},e={},n=Symbol(),a="abcdefghijklmnopqrst";return t[n]=7,a.split("").forEach((function(t){e[t]=t})),7!=u({},t)[n]||A(u({},e)).join("")!=a}))?function(t,e){for(var n=c(t),a=arguments.length,i=1,u=s.f,p=l.f;a>i;)for(var h,g=d(arguments[i++]),m=u?f(A(g),u(g)):A(g),b=m.length,v=0;b>v;)h=m[v++],r&&!o(p,g,h)||(n[h]=g[h]);return n}:u},1941:(e,n,r)=>{"use strict";r.d(n,{Fg:()=>gn,WA:()=>hn,sj:()=>fn});var a=r(2284),o=Uint8Array,i=Uint16Array,A=Uint32Array,s=new o([0,0,0,0,0,0,0,0,1,1,1,1,2,2,2,2,3,3,3,3,4,4,4,4,5,5,5,5,0,0,0,0]),l=new o([0,0,0,0,1,1,2,2,3,3,4,4,5,5,6,6,7,7,8,8,9,9,10,10,11,11,12,12,13,13,0,0]),c=new o([16,17,18,0,8,7,9,6,10,5,11,4,12,3,13,2,14,1,15]),d=function(t,e){for(var n=new i(31),r=0;r<31;++r)n[r]=e+=1<>>1|(21845&v)<<1;w=(61680&(w=(52428&w)>>>2|(13107&w)<<2))>>>4|(3855&w)<<4,b[v]=((65280&w)>>>8|(255&w)<<8)>>>1}var y=function(t,e,n){for(var r=t.length,a=0,o=new i(e);a>>l]=c}else for(A=new i(r),a=0;a>>15-t[a];return A},x=new o(288);for(v=0;v<144;++v)x[v]=8;for(v=144;v<256;++v)x[v]=9;for(v=256;v<280;++v)x[v]=7;for(v=280;v<288;++v)x[v]=8;var B=new o(32);for(v=0;v<32;++v)B[v]=5;var C=y(x,9,0),F=y(x,9,1),U=y(B,5,0),Q=y(B,5,1),T=function(t){for(var e=t[0],n=1;ne&&(e=t[n]);return e},L=function(t,e,n){var r=e/8|0;return(t[r]|t[r+1]<<8)>>>(7&e)&n},_=function(t,e){var n=e/8|0;return(t[n]|t[n+1]<<8|t[n+2]<<16)>>>(7&e)},S=function(t){return(t/8|0)+(7&t&&1)},k=function(t,e,n){(null==e||e<0)&&(e=0),(null==n||n>t.length)&&(n=t.length);var r=new(t instanceof i?i:t instanceof A?A:o)(n-e);return r.set(t.subarray(e,n)),r},E=function(t,e,n){n<<=7&e;var r=e/8|0;t[r]|=n,t[r+1]|=n>>>8},I=function(t,e,n){n<<=7&e;var r=e/8|0;t[r]|=n,t[r+1]|=n>>>8,t[r+2]|=n>>>16},N=function(t,e){for(var n=[],r=0;rf&&(f=A[r].s);var h=new i(f+1),g=D(n[u-1],h,0);if(g>e){r=0;var m=0,b=g-e,v=1<e))break;m+=v-(1<>>=b;m>0;){var y=A[r].s;h[y]=0&&m;--r){var x=A[r].s;h[x]==e&&(--h[x],++m)}g=e}return[new o(h),g]},D=function(t,e,n){return-1==t.s?Math.max(D(t.l,e,n+1),D(t.r,e,n+1)):e[t.s]=n},H=function(t){for(var e=t.length;e&&!t[--e];);for(var n=new i(++e),r=0,a=t[0],o=1,A=function(t){n[r++]=t},s=1;s<=e;++s)if(t[s]==a&&s!=e)++o;else{if(!a&&o>2){for(;o>138;o-=138)A(32754);o>2&&(A(o>10?o-11<<5|28690:o-3<<5|12305),o=0)}else if(o>3){for(A(a),--o;o>6;o-=6)A(8304);o>2&&(A(o-3<<5|8208),o=0)}for(;o--;)A(a);o=1,a=t[s]}return[n.subarray(0,r),e]},P=function(t,e){for(var n=0,r=0;r>>8,t[a+2]=255^t[a],t[a+3]=255^t[a+1];for(var o=0;o4&&!j[c[K-1]];--K);var G,q,z,V,W=p+5<<3,J=P(a,x)+P(o,B)+A,X=P(a,g)+P(o,v)+A+14+3*K+P(k,j)+(2*k[16]+3*k[17]+7*k[18]);if(W<=J&&W<=X)return O(e,f,t.subarray(u,u+p));if(E(e,f,1+(X15&&(E(e,f,tt[D]>>>5&127),f+=tt[D]>>>12)}}}else G=C,q=x,z=U,V=B;for(D=0;D255){et=r[D]>>>18&31,I(e,f,G[et+257]),f+=q[et+257],et>7&&(E(e,f,r[D]>>>23&31),f+=s[et]);var nt=31&r[D];I(e,f,z[nt]),f+=V[nt],nt>3&&(I(e,f,r[D]>>>5&8191),f+=l[nt])}else I(e,f,G[r[D]]),f+=q[r[D]];return I(e,f,G[256]),f+q[256]},j=new A([65540,131080,131088,131104,262176,1048704,1048832,2114560,2117632]),R=new o(0),K=function(t,e,n,r,a){return function(t,e,n,r,a,c){var d=t.length,u=new o(r+d+5*(1+Math.floor(d/7e3))+a),p=u.subarray(r,u.length-a),h=0;if(!e||d<8)for(var g=0;g<=d;g+=65535){var b=g+65535;b>>13,y=8191&v,x=(1<7e3||N>24576)&&q>423){h=M(t,p,0,T,L,_,I,N,H,g-H,h),N=E=I=0,H=g;for(var z=0;z<286;++z)L[z]=0;for(z=0;z<30;++z)_[z]=0}var V=2,W=0,J=y,X=K-G&32767;if(q>2&&P==Q(g-X))for(var Y=Math.min(w,q)-1,$=Math.min(32767,g),Z=Math.min(258,q);X<=$&&--J&&K!=G;){if(t[g+V]==t[g+V-X]){for(var tt=0;ttV){if(V=tt,W=X,tt>Y)break;var et=Math.min(X,tt-2),nt=0;for(z=0;znt&&(nt=at,G=rt)}}}X+=(K=G)-(G=B[K])+32768&32767}if(W){T[N++]=268435456|f[V]<<18|m[W];var ot=31&f[V],it=31&m[W];I+=s[ot]+l[it],++L[257+ot],++_[it],D=g+V,++E}else T[N++]=t[g],++L[t[g]]}}h=M(t,p,c,T,L,_,I,N,H,g-H,h),c||(h=O(p,h,R))}return k(u,0,r+S(h)+a)}(t,null==e.level?6:e.level,null==e.mem?Math.ceil(1.5*Math.max(8,Math.min(13,Math.log(t.length)))):12+e.mem,n,r,!a)};function G(t,e){void 0===e&&(e={});var n=function(){var t=1,e=0;return{p:function(n){for(var r=t,a=e,o=n.length,i=0;i!=o;){for(var A=Math.min(i+5552,o);i>>8<<16|(255&e)<<8|e>>>8)+2*((255&t)<<23)}}}();n.p(t);var r=K(t,e,2,4);return function(t,e){var n=e.level,r=0==n?0:n<6?1:9==n?3:2;t[0]=120,t[1]=r<<6|(r?32-2*r:1)}(r,e),function(t,e,n){for(;n;++e)t[e]=n,n>>>=8}(r,r.length-4,n.d()),r}function q(t,e){return function(t,e,n){var r=t.length,a=!e||n,i=!n||n.i;n||(n={}),e||(e=new o(3*r));var A=function(t){var n=e.length;if(t>n){var r=new o(Math.max(2*n,t));r.set(e),e=r}},d=n.f||0,u=n.p||0,f=n.b||0,h=n.l,m=n.d,b=n.m,v=n.n,w=8*r;do{if(!h){n.f=d=L(t,u,1);var x=L(t,u+1,3);if(u+=3,!x){var B=t[(j=S(u)+4)-4]|t[j-3]<<8,C=j+B;if(C>r){if(i)throw"unexpected EOF";break}a&&A(f+B),e.set(t.subarray(j,C),f),n.b=f+=B,n.p=u=8*C;continue}if(1==x)h=F,m=Q,b=9,v=5;else{if(2!=x)throw"invalid block type";var U=L(t,u,31)+257,E=L(t,u+10,15)+4,I=U+L(t,u+5,31)+1;u+=14;for(var N=new o(I),D=new o(19),H=0;Hw)break;var M=y(D,P,1);for(H=0;H>>4)<16)N[H++]=j;else{var K=0,G=0;for(16==j?(G=3+L(t,u,3),u+=2,K=N[H-1]):17==j?(G=3+L(t,u,7),u+=3):18==j&&(G=11+L(t,u,127),u+=7);G--;)N[H++]=K}}var q=N.subarray(0,U),z=N.subarray(U);b=T(q),v=T(z),h=y(q,b,1),m=y(z,v,1)}if(u>w)throw"unexpected EOF"}a&&A(f+131072);for(var V=(1<>>4;if((u+=15&K)>w)throw"unexpected EOF";if(!K)throw"invalid length/literal";if(X<256)e[f++]=X;else{if(256==X){h=null;break}var Y=X-254;if(X>264){var $=s[H=X-257];Y=L(t,u,(1<<$)-1)+p[H],u+=$}var Z=m[_(t,u)&W],tt=Z>>>4;if(!Z)throw"invalid distance";if(u+=15&Z,z=g[tt],tt>3&&($=l[tt],z+=_(t,u)&(1<<$)-1,u+=$),u>w)throw"unexpected EOF";a&&A(f+131072);for(var et=f+Y;f>>4>7||(t[0]<<8|t[1])%31)throw"invalid zlib data";if(32&t[1])throw"invalid zlib data: preset dictionaries not supported"}(t),t.subarray(2,-4)),e)}var z=function(){return"undefined"!=typeof window?window:void 0!==r.g?r.g:"undefined"!=typeof self?self:this}();function V(){z.console&&"function"==typeof z.console.log&&z.console.log.apply(z.console,arguments)}var W={log:V,warn:function(t){z.console&&("function"==typeof z.console.warn?z.console.warn.apply(z.console,arguments):V.call(null,arguments))},error:function(t){z.console&&("function"==typeof z.console.error?z.console.error.apply(z.console,arguments):V(t))}};function J(t,e,n){var r=new XMLHttpRequest;r.open("GET",t),r.responseType="blob",r.onload=function(){tt(r.response,e,n)},r.onerror=function(){W.error("could not download file")},r.send()}function X(t){var e=new XMLHttpRequest;e.open("HEAD",t,!1);try{e.send()}catch(t){}return e.status>=200&&e.status<=299}function Y(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 $,Z,tt=z.saveAs||("object"!==("undefined"==typeof window?"undefined":(0,a.A)(window))||window!==z?function(){}:"undefined"!=typeof HTMLAnchorElement&&"download"in HTMLAnchorElement.prototype?function(t,e,n){var r=z.URL||z.webkitURL,a=document.createElement("a");e=e||t.name||"download",a.download=e,a.rel="noopener","string"==typeof t?(a.href=t,a.origin!==location.origin?X(a.href)?J(t,e,n):Y(a,a.target="_blank"):Y(a)):(a.href=r.createObjectURL(t),setTimeout((function(){r.revokeObjectURL(a.href)}),4e4),setTimeout((function(){Y(a)}),0))}:"msSaveOrOpenBlob"in navigator?function(t,e,n){if(e=e||t.name||"download","string"==typeof t)if(X(t))J(t,e,n);else{var r=document.createElement("a");r.href=t,r.target="_blank",setTimeout((function(){Y(r)}))}else navigator.msSaveOrOpenBlob(function(t,e){return void 0===e?e={autoBom:!1}:"object"!==(0,a.A)(e)&&(W.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,n),e)}:function(t,e,n,r){if((r=r||open("","_blank"))&&(r.document.title=r.document.body.innerText="downloading..."),"string"==typeof t)return J(t,e,n);var o="application/octet-stream"===t.type,i=/constructor/i.test(z.HTMLElement)||z.safari,A=/CriOS\/[\d]+/.test(navigator.userAgent);if((A||o&&i)&&"object"===("undefined"==typeof FileReader?"undefined":(0,a.A)(FileReader))){var s=new FileReader;s.onloadend=function(){var t=s.result;t=A?t:t.replace(/^data:[^;]*;/,"data:attachment/file;"),r?r.location.href=t:location=t,r=null},s.readAsDataURL(t)}else{var l=z.URL||z.webkitURL,c=l.createObjectURL(t);r?r.location=c:location.href=c,r=null,setTimeout((function(){l.revokeObjectURL(c)}),4e4)}});function et(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 nt(t,e){var n=t[0],r=t[1],a=t[2],o=t[3];n=at(n,r,a,o,e[0],7,-680876936),o=at(o,n,r,a,e[1],12,-389564586),a=at(a,o,n,r,e[2],17,606105819),r=at(r,a,o,n,e[3],22,-1044525330),n=at(n,r,a,o,e[4],7,-176418897),o=at(o,n,r,a,e[5],12,1200080426),a=at(a,o,n,r,e[6],17,-1473231341),r=at(r,a,o,n,e[7],22,-45705983),n=at(n,r,a,o,e[8],7,1770035416),o=at(o,n,r,a,e[9],12,-1958414417),a=at(a,o,n,r,e[10],17,-42063),r=at(r,a,o,n,e[11],22,-1990404162),n=at(n,r,a,o,e[12],7,1804603682),o=at(o,n,r,a,e[13],12,-40341101),a=at(a,o,n,r,e[14],17,-1502002290),n=ot(n,r=at(r,a,o,n,e[15],22,1236535329),a,o,e[1],5,-165796510),o=ot(o,n,r,a,e[6],9,-1069501632),a=ot(a,o,n,r,e[11],14,643717713),r=ot(r,a,o,n,e[0],20,-373897302),n=ot(n,r,a,o,e[5],5,-701558691),o=ot(o,n,r,a,e[10],9,38016083),a=ot(a,o,n,r,e[15],14,-660478335),r=ot(r,a,o,n,e[4],20,-405537848),n=ot(n,r,a,o,e[9],5,568446438),o=ot(o,n,r,a,e[14],9,-1019803690),a=ot(a,o,n,r,e[3],14,-187363961),r=ot(r,a,o,n,e[8],20,1163531501),n=ot(n,r,a,o,e[13],5,-1444681467),o=ot(o,n,r,a,e[2],9,-51403784),a=ot(a,o,n,r,e[7],14,1735328473),n=it(n,r=ot(r,a,o,n,e[12],20,-1926607734),a,o,e[5],4,-378558),o=it(o,n,r,a,e[8],11,-2022574463),a=it(a,o,n,r,e[11],16,1839030562),r=it(r,a,o,n,e[14],23,-35309556),n=it(n,r,a,o,e[1],4,-1530992060),o=it(o,n,r,a,e[4],11,1272893353),a=it(a,o,n,r,e[7],16,-155497632),r=it(r,a,o,n,e[10],23,-1094730640),n=it(n,r,a,o,e[13],4,681279174),o=it(o,n,r,a,e[0],11,-358537222),a=it(a,o,n,r,e[3],16,-722521979),r=it(r,a,o,n,e[6],23,76029189),n=it(n,r,a,o,e[9],4,-640364487),o=it(o,n,r,a,e[12],11,-421815835),a=it(a,o,n,r,e[15],16,530742520),n=At(n,r=it(r,a,o,n,e[2],23,-995338651),a,o,e[0],6,-198630844),o=At(o,n,r,a,e[7],10,1126891415),a=At(a,o,n,r,e[14],15,-1416354905),r=At(r,a,o,n,e[5],21,-57434055),n=At(n,r,a,o,e[12],6,1700485571),o=At(o,n,r,a,e[3],10,-1894986606),a=At(a,o,n,r,e[10],15,-1051523),r=At(r,a,o,n,e[1],21,-2054922799),n=At(n,r,a,o,e[8],6,1873313359),o=At(o,n,r,a,e[15],10,-30611744),a=At(a,o,n,r,e[6],15,-1560198380),r=At(r,a,o,n,e[13],21,1309151649),n=At(n,r,a,o,e[4],6,-145523070),o=At(o,n,r,a,e[11],10,-1120210379),a=At(a,o,n,r,e[2],15,718787259),r=At(r,a,o,n,e[9],21,-343485551),t[0]=ht(n,t[0]),t[1]=ht(r,t[1]),t[2]=ht(a,t[2]),t[3]=ht(o,t[3])}function rt(t,e,n,r,a,o){return e=ht(ht(e,t),ht(r,o)),ht(e<>>32-a,n)}function at(t,e,n,r,a,o,i){return rt(e&n|~e&r,t,e,a,o,i)}function ot(t,e,n,r,a,o,i){return rt(e&r|n&~r,t,e,a,o,i)}function it(t,e,n,r,a,o,i){return rt(e^n^r,t,e,a,o,i)}function At(t,e,n,r,a,o,i){return rt(n^(e|~r),t,e,a,o,i)}function st(t){var e,n=t.length,r=[1732584193,-271733879,-1732584194,271733878];for(e=64;e<=t.length;e+=64)nt(r,lt(t.substring(e-64,e)));t=t.substring(e-64);var a=[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0];for(e=0;e>2]|=t.charCodeAt(e)<<(e%4<<3);if(a[e>>2]|=128<<(e%4<<3),e>55)for(nt(r,a),e=0;e<16;e++)a[e]=0;return a[14]=8*n,nt(r,a),r}function lt(t){var e,n=[];for(e=0;e<64;e+=4)n[e>>2]=t.charCodeAt(e)+(t.charCodeAt(e+1)<<8)+(t.charCodeAt(e+2)<<16)+(t.charCodeAt(e+3)<<24);return n}$=z.atob.bind(z),Z=z.btoa.bind(z);var ct="0123456789abcdef".split("");function dt(t){for(var e="",n=0;n<4;n++)e+=ct[t>>8*n+4&15]+ct[t>>8*n&15];return e}function ut(t){return String.fromCharCode(255&t,(65280&t)>>8,(16711680&t)>>16,(4278190080&t)>>24)}function pt(t){return st(t).map(ut).join("")}var ft="5d41402abc4b2a76b9719d911017c592"!=function(t){for(var e=0;e>16)+(e>>16)+(n>>16)<<16|65535&n}return t+e&4294967295}function gt(t,e){var n,r,a,o;if(t!==n){for(var i=(a=t,o=1+(256/t.length|0),new Array(o+1).join(a)),A=[],s=0;s<256;s++)A[s]=s;var l=0;for(s=0;s<256;s++){var c=A[s];l=(l+c+i.charCodeAt(s))%256,A[s]=A[l],A[l]=c}n=t,r=A}else A=r;var d=e.length,u=0,p=0,f="";for(s=0;s€/\f©þdSiz";var o=(e+this.padding).substr(0,32),i=(n+this.padding).substr(0,32);this.O=this.processOwnerPassword(o,i),this.P=-(1+(255^a)),this.encryptionKey=pt(o+this.O+this.lsbFirstWord(this.P)+this.hexToBytes(r)).substr(0,5),this.U=gt(this.encryptionKey,this.padding)}function vt(t){if(/[^\u0000-\u00ff]/.test(t))throw new Error("Invalid PDF Name Object: "+t+", Only accept ASCII characters.");for(var e="",n=t.length,r=0;r126?"#"+("0"+a.toString(16)).slice(-2):t[r]}return e}function wt(t){if("object"!==(0,a.A)(t))throw new Error("Invalid Context passed to initialize PubSub (jsPDF-module)");var e={};this.subscribe=function(t,n,r){if(r=r||!1,"string"!=typeof t||"function"!=typeof n||"boolean"!=typeof r)throw new Error("Invalid arguments passed to PubSub.subscribe (jsPDF-module)");e.hasOwnProperty(t)||(e[t]={});var a=Math.random().toString(35);return e[t][a]=[n,!!r],a},this.unsubscribe=function(t){for(var n in e)if(e[n][t])return delete e[n][t],0===Object.keys(e[n]).length&&delete e[n],!0;return!1},this.publish=function(n){if(e.hasOwnProperty(n)){var r=Array.prototype.slice.call(arguments,1),a=[];for(var o in e[n]){var i=e[n][o];try{i[0].apply(t,r)}catch(n){z.console&&W.error("jsPDF PubSub Error",n.message,n)}i[1]&&a.push(o)}a.length&&a.forEach(this.unsubscribe)}},this.getTopics=function(){return e}}function yt(t){if(!(this instanceof yt))return new yt(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 xt(t,e){this.gState=t,this.matrix=e,this.id="",this.objectNumber=-1}function Bt(t,e,n,r,a){if(!(this instanceof Bt))return new Bt(t,e,n,r,a);this.type="axial"===t?2:3,this.coords=e,this.colors=n,xt.call(this,r,a)}function Ct(t,e,n,r,a){if(!(this instanceof Ct))return new Ct(t,e,n,r,a);this.boundingBox=t,this.xStep=e,this.yStep=n,this.stream="",this.cloneIndex=0,xt.call(this,r,a)}function Ft(t){var e,n="string"==typeof arguments[0]?arguments[0]:"p",r=arguments[1],o=arguments[2],i=arguments[3],A=[],s=1,l=16,c="S",d=null;"object"===(0,a.A)(t=t||{})&&(n=t.orientation,r=t.unit||r,o=t.format||o,i=t.compress||t.compressPdf||i,null!==(d=t.encryption||null)&&(d.userPassword=d.userPassword||"",d.ownerPassword=d.ownerPassword||"",d.userPermissions=d.userPermissions||[]),s="number"==typeof t.userUnit?Math.abs(t.userUnit):1,void 0!==t.precision&&(e=t.precision),void 0!==t.floatPrecision&&(l=t.floatPrecision),c=t.defaultPathOperation||"S"),A=t.filters||(!0===i?["FlateEncode"]:A),r=r||"mm",n=(""+(n||"P")).toLowerCase();var u=t.putOnlyUsedFonts||!1,p={},f={internal:{},__private__:{}};f.__private__.PubSub=wt;var h="1.3",g=f.__private__.getPdfVersion=function(){return h};f.__private__.setPdfVersion=function(t){h=t};var m={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.__private__.getPageFormats=function(){return m};var b=f.__private__.getPageFormat=function(t){return m[t]};o=o||"a4";var v="compat",w="advanced",y=v;function x(){this.saveGraphicsState(),rt(new Gt(xt,0,0,-xt,0,yn()*xt).toString()+" cm"),this.setFontSize(this.getFontSize()/xt),c="n",y=w}function B(){this.restoreGraphicsState(),c="S",y=v}var C=f.__private__.combineFontStyleAndFontWeight=function(t,e){if("bold"==t&&"normal"==e||"bold"==t&&400==e||"normal"==t&&"italic"==e||"bold"==t&&"italic"==e)throw new Error("Invalid Combination of fontweight and fontstyle");return e&&(t=400==e||"normal"===e?"italic"===t?"italic":"normal":700!=e&&"bold"!==e||"normal"!==t?(700==e?"bold":e)+""+t:"bold"),t};f.advancedAPI=function(t){var e=y===v;return e&&x.call(this),"function"!=typeof t||(t(this),e&&B.call(this)),this},f.compatAPI=function(t){var e=y===w;return e&&B.call(this),"function"!=typeof t||(t(this),e&&x.call(this)),this},f.isAdvancedAPI=function(){return y===w};var F,U=function(t){if(y!==w)throw new Error(t+" is only available in 'advanced' API mode. You need to call advancedAPI() first.")},Q=f.roundToPrecision=f.__private__.roundToPrecision=function(t,n){var r=e||n;if(isNaN(t)||isNaN(r))throw new Error("Invalid argument passed to jsPDF.roundToPrecision");return t.toFixed(r).replace(/0+$/,"")};F=f.hpf=f.__private__.hpf="number"==typeof l?function(t){if(isNaN(t))throw new Error("Invalid argument passed to jsPDF.hpf");return Q(t,l)}:"smart"===l?function(t){if(isNaN(t))throw new Error("Invalid argument passed to jsPDF.hpf");return Q(t,t>-1&&t<1?16:5)}:function(t){if(isNaN(t))throw new Error("Invalid argument passed to jsPDF.hpf");return Q(t,16)};var T=f.f2=f.__private__.f2=function(t){if(isNaN(t))throw new Error("Invalid argument passed to jsPDF.f2");return Q(t,2)},L=f.__private__.f3=function(t){if(isNaN(t))throw new Error("Invalid argument passed to jsPDF.f3");return Q(t,3)},_=f.scale=f.__private__.scale=function(t){if(isNaN(t))throw new Error("Invalid argument passed to jsPDF.scale");return y===v?t*xt:y===w?t:void 0},S=function(t){return _(function(t){return y===v?yn()-t:y===w?t:void 0}(t))};f.__private__.setPrecision=f.setPrecision=function(t){"number"==typeof parseInt(t,10)&&(e=parseInt(t,10))};var k,E="00000000000000000000000000000000",I=f.__private__.getFileId=function(){return E},N=f.__private__.setFileId=function(t){return E=void 0!==t&&/^[a-fA-F0-9]{32}$/.test(t)?t.toUpperCase():E.split("").map((function(){return"ABCDEF0123456789".charAt(Math.floor(16*Math.random()))})).join(""),null!==d&&(_e=new bt(d.userPermissions,d.userPassword,d.ownerPassword,E)),E};f.setFileId=function(t){return N(t),this},f.getFileId=function(){return I()};var D=f.__private__.convertDateToPDFDate=function(t){var e=t.getTimezoneOffset(),n=e<0?"+":"-",r=Math.floor(Math.abs(e/60)),a=Math.abs(e%60),o=[n,j(r),"'",j(a),"'"].join("");return["D:",t.getFullYear(),j(t.getMonth()+1),j(t.getDate()),j(t.getHours()),j(t.getMinutes()),j(t.getSeconds()),o].join("")},H=f.__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),a=parseInt(t.substr(10,2),10),o=parseInt(t.substr(12,2),10),i=parseInt(t.substr(14,2),10);return new Date(e,n,r,a,o,i,0)},P=f.__private__.setCreationDate=function(t){var e;if(void 0===t&&(t=new Date),t instanceof Date)e=D(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 k=e},O=f.__private__.getCreationDate=function(t){var e=k;return"jsDate"===t&&(e=H(k)),e};f.setCreationDate=function(t){return P(t),this},f.getCreationDate=function(t){return O(t)};var M,j=f.__private__.padd2=function(t){return("0"+parseInt(t)).slice(-2)},R=f.__private__.padd2Hex=function(t){return("00"+(t=t.toString())).substr(t.length)},K=0,G=[],q=[],V=0,J=[],X=[],Y=!1,$=q;f.__private__.setCustomOutputDestination=function(t){Y=!0,$=t};var nt=function(t){Y||($=t)};f.__private__.resetCustomOutputDestination=function(){Y=!1,$=q};var rt=f.__private__.out=function(t){return t=t.toString(),V+=t.length+1,$.push(t),$},at=f.__private__.write=function(t){return rt(1===arguments.length?t.toString():Array.prototype.join.call(arguments," "))},ot=f.__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},it=[["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]];f.__private__.getStandardFonts=function(){return it};var At=t.fontSize||16;f.__private__.setFontSize=f.setFontSize=function(t){return At=y===w?t/xt:t,this};var st,lt=f.__private__.getFontSize=f.getFontSize=function(){return y===v?At:At*xt},ct=t.R2L||!1;f.__private__.setR2L=f.setR2L=function(t){return ct=t,this},f.__private__.getR2L=f.getR2L=function(){return ct};var dt,ut=f.__private__.setZoomMode=function(t){if(/^(?:\d+\.\d*|\d*\.\d+|\d+)%$/.test(t))st=t;else if(isNaN(t)){if(-1===[void 0,null,"fullwidth","fullheight","fullpage","original"].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.');st=t}else st=parseInt(t,10)};f.__private__.getZoomMode=function(){return st};var pt,ft=f.__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.');dt=t};f.__private__.getPageMode=function(){return dt};var ht=f.__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.');pt=t};f.__private__.getLayoutMode=function(){return pt},f.__private__.setDisplayMode=f.setDisplayMode=function(t,e,n){return ut(t),ht(e),ft(n),this};var gt={title:"",subject:"",author:"",keywords:"",creator:""};f.__private__.getDocumentProperty=function(t){if(-1===Object.keys(gt).indexOf(t))throw new Error("Invalid argument passed to jsPDF.getDocumentProperty");return gt[t]},f.__private__.getDocumentProperties=function(){return gt},f.__private__.setDocumentProperties=f.setProperties=f.setDocumentProperties=function(t){for(var e in gt)gt.hasOwnProperty(e)&&t[e]&&(gt[e]=t[e]);return this},f.__private__.setDocumentProperty=function(t,e){if(-1===Object.keys(gt).indexOf(t))throw new Error("Invalid arguments passed to jsPDF.setDocumentProperty");return gt[t]=e};var mt,xt,Ut,Qt,Tt,Lt={},_t={},St=[],kt={},Et={},It={},Nt={},Dt=null,Ht=0,Pt=[],Ot=new wt(f),Mt=t.hotfixes||[],jt={},Rt={},Kt=[],Gt=function t(e,n,r,a,o,i){if(!(this instanceof t))return new t(e,n,r,a,o,i);isNaN(e)&&(e=1),isNaN(n)&&(n=0),isNaN(r)&&(r=0),isNaN(a)&&(a=1),isNaN(o)&&(o=0),isNaN(i)&&(i=0),this._matrix=[e,n,r,a,o,i]};Object.defineProperty(Gt.prototype,"sx",{get:function(){return this._matrix[0]},set:function(t){this._matrix[0]=t}}),Object.defineProperty(Gt.prototype,"shy",{get:function(){return this._matrix[1]},set:function(t){this._matrix[1]=t}}),Object.defineProperty(Gt.prototype,"shx",{get:function(){return this._matrix[2]},set:function(t){this._matrix[2]=t}}),Object.defineProperty(Gt.prototype,"sy",{get:function(){return this._matrix[3]},set:function(t){this._matrix[3]=t}}),Object.defineProperty(Gt.prototype,"tx",{get:function(){return this._matrix[4]},set:function(t){this._matrix[4]=t}}),Object.defineProperty(Gt.prototype,"ty",{get:function(){return this._matrix[5]},set:function(t){this._matrix[5]=t}}),Object.defineProperty(Gt.prototype,"a",{get:function(){return this._matrix[0]},set:function(t){this._matrix[0]=t}}),Object.defineProperty(Gt.prototype,"b",{get:function(){return this._matrix[1]},set:function(t){this._matrix[1]=t}}),Object.defineProperty(Gt.prototype,"c",{get:function(){return this._matrix[2]},set:function(t){this._matrix[2]=t}}),Object.defineProperty(Gt.prototype,"d",{get:function(){return this._matrix[3]},set:function(t){this._matrix[3]=t}}),Object.defineProperty(Gt.prototype,"e",{get:function(){return this._matrix[4]},set:function(t){this._matrix[4]=t}}),Object.defineProperty(Gt.prototype,"f",{get:function(){return this._matrix[5]},set:function(t){this._matrix[5]=t}}),Object.defineProperty(Gt.prototype,"rotation",{get:function(){return Math.atan2(this.shx,this.sx)}}),Object.defineProperty(Gt.prototype,"scaleX",{get:function(){return this.decompose().scale.sx}}),Object.defineProperty(Gt.prototype,"scaleY",{get:function(){return this.decompose().scale.sy}}),Object.defineProperty(Gt.prototype,"isIdentity",{get:function(){return 1===this.sx&&0===this.shy&&0===this.shx&&1===this.sy&&0===this.tx&&0===this.ty}}),Gt.prototype.join=function(t){return[this.sx,this.shy,this.shx,this.sy,this.tx,this.ty].map(F).join(t)},Gt.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,a=t.shx*this.shy+t.sy*this.sy,o=t.tx*this.sx+t.ty*this.shx+this.tx,i=t.tx*this.shy+t.ty*this.sy+this.ty;return new Gt(e,n,r,a,o,i)},Gt.prototype.decompose=function(){var t=this.sx,e=this.shy,n=this.shx,r=this.sy,a=this.tx,o=this.ty,i=Math.sqrt(t*t+e*e),A=(t/=i)*n+(e/=i)*r;n-=t*A,r-=e*A;var s=Math.sqrt(n*n+r*r);return A/=s,t*(r/=s)>16&255,r=l>>8&255,o=255&l}if(void 0===r||void 0===i&&n===r&&r===o)e="string"==typeof n?n+" "+A[0]:2===t.precision?T(n/255)+" "+A[0]:L(n/255)+" "+A[0];else if(void 0===i||"object"===(0,a.A)(i)){if(i&&!isNaN(i.a)&&0===i.a)return["1.","1.","1.",A[1]].join(" ");e="string"==typeof n?[n,r,o,A[1]].join(" "):2===t.precision?[T(n/255),T(r/255),T(o/255),A[1]].join(" "):[L(n/255),L(r/255),L(o/255),A[1]].join(" ")}else e="string"==typeof n?[n,r,o,i,A[2]].join(" "):2===t.precision?[T(n),T(r),T(o),T(i),A[2]].join(" "):[L(n),L(r),L(o),L(i),A[2]].join(" ");return e},ne=f.__private__.getFilters=function(){return A},re=f.__private__.putStream=function(t){var e=(t=t||{}).data||"",n=t.filters||ne(),r=t.alreadyAppliedFilters||[],a=t.addLength1||!1,o=e.length,i=t.objectId,A=function(t){return t};if(null!==d&&void 0===i)throw new Error("ObjectId must be passed to putStream for file encryption");null!==d&&(A=_e.encryptor(i,0));var s={};!0===n&&(n=["FlateEncode"]);var l=t.additionalKeyValues||[],c=(s=void 0!==Ft.API.processDataByFilters?Ft.API.processDataByFilters(e,n):{data:e,reverseChain:[]}).reverseChain+(Array.isArray(r)?r.join(" "):r.toString());if(0!==s.data.length&&(l.push({key:"Length",value:s.data.length}),!0===a&&l.push({key:"Length1",value:o})),0!=c.length)if(c.split("/").length-1==1)l.push({key:"Filter",value:c});else{l.push({key:"Filter",value:"["+c+"]"});for(var u=0;u>"),0!==s.data.length&&(rt("stream"),rt(A(s.data)),rt("endstream"))},ae=f.__private__.putPage=function(t){var e=t.number,n=t.data,r=t.objId,a=t.contentsObjId;Xt(r,!0),rt("<>"),rt("endobj");var o=n.join("\n");return y===w&&(o+="\nQ"),Xt(a,!0),re({data:o,filters:ne(),objectId:a}),rt("endobj"),r},oe=f.__private__.putPages=function(){var t,e,n=[];for(t=1;t<=Ht;t++)Pt[t].objId=Jt(),Pt[t].contentsObjId=Jt();for(t=1;t<=Ht;t++)n.push(ae({number:t,data:X[t],objId:Pt[t].objId,contentsObjId:Pt[t].contentsObjId,mediaBox:Pt[t].mediaBox,cropBox:Pt[t].cropBox,bleedBox:Pt[t].bleedBox,trimBox:Pt[t].trimBox,artBox:Pt[t].artBox,userUnit:Pt[t].userUnit,rootDictionaryObjId:$t,resourceDictionaryObjId:Zt}));Xt($t,!0),rt("<>"),rt("endobj"),Ot.publish("postPutPages")},ie=function(t){Ot.publish("putFont",{font:t,out:rt,newObject:Wt,putStream:re}),!0!==t.isAlreadyPutted&&(t.objectNumber=Wt(),rt("<<"),rt("/Type /Font"),rt("/BaseFont /"+vt(t.postScriptName)),rt("/Subtype /Type1"),"string"==typeof t.encoding&&rt("/Encoding /"+t.encoding),rt("/FirstChar 32"),rt("/LastChar 255"),rt(">>"),rt("endobj"))},Ae=function(t){t.objectNumber=Wt();var e=[];e.push({key:"Type",value:"/XObject"}),e.push({key:"Subtype",value:"/Form"}),e.push({key:"BBox",value:"["+[F(t.x),F(t.y),F(t.x+t.width),F(t.y+t.height)].join(" ")+"]"}),e.push({key:"Matrix",value:"["+t.matrix.toString()+"]"});var n=t.pages[1].join("\n");re({data:n,additionalKeyValues:e,objectId:t.objectNumber}),rt("endobj")},se=function(t,e){e||(e=21);var n=Wt(),r=function(t,e){var n,r=[],a=1/(e-1);for(n=0;n<1;n+=a)r.push(n);if(r.push(1),0!=t[0].offset){var o={offset:0,color:t[0].color};t.unshift(o)}if(1!=t[t.length-1].offset){var i={offset:1,color:t[t.length-1].color};t.push(i)}for(var A="",s=0,l=0;lt[s+1].offset;)s++;var c=t[s].offset,d=(n-c)/(t[s+1].offset-c),u=t[s].color,p=t[s+1].color;A+=R(Math.round((1-d)*u[0]+d*p[0]).toString(16))+R(Math.round((1-d)*u[1]+d*p[1]).toString(16))+R(Math.round((1-d)*u[2]+d*p[2]).toString(16))}return A.trim()}(t.colors,e),a=[];a.push({key:"FunctionType",value:"0"}),a.push({key:"Domain",value:"[0.0 1.0]"}),a.push({key:"Size",value:"["+e+"]"}),a.push({key:"BitsPerSample",value:"8"}),a.push({key:"Range",value:"[0.0 1.0 0.0 1.0 0.0 1.0]"}),a.push({key:"Decode",value:"[0.0 1.0 0.0 1.0 0.0 1.0]"}),re({data:r,additionalKeyValues:a,alreadyAppliedFilters:["/ASCIIHexDecode"],objectId:n}),rt("endobj"),t.objectNumber=Wt(),rt("<< /ShadingType "+t.type),rt("/ColorSpace /DeviceRGB");var o="/Coords ["+F(parseFloat(t.coords[0]))+" "+F(parseFloat(t.coords[1]))+" ";2===t.type?o+=F(parseFloat(t.coords[2]))+" "+F(parseFloat(t.coords[3])):o+=F(parseFloat(t.coords[2]))+" "+F(parseFloat(t.coords[3]))+" "+F(parseFloat(t.coords[4]))+" "+F(parseFloat(t.coords[5])),rt(o+="]"),t.matrix&&rt("/Matrix ["+t.matrix.toString()+"]"),rt("/Function "+n+" 0 R"),rt("/Extend [true true]"),rt(">>"),rt("endobj")},le=function(t,e){var n=Jt(),r=Wt();e.push({resourcesOid:n,objectOid:r}),t.objectNumber=r;var a=[];a.push({key:"Type",value:"/Pattern"}),a.push({key:"PatternType",value:"1"}),a.push({key:"PaintType",value:"1"}),a.push({key:"TilingType",value:"1"}),a.push({key:"BBox",value:"["+t.boundingBox.map(F).join(" ")+"]"}),a.push({key:"XStep",value:F(t.xStep)}),a.push({key:"YStep",value:F(t.yStep)}),a.push({key:"Resources",value:n+" 0 R"}),t.matrix&&a.push({key:"Matrix",value:"["+t.matrix.toString()+"]"}),re({data:t.stream,additionalKeyValues:a,objectId:t.objectNumber}),rt("endobj")},ce=function(t){for(var e in t.objectNumber=Wt(),rt("<<"),t)switch(e){case"opacity":rt("/ca "+T(t[e]));break;case"stroke-opacity":rt("/CA "+T(t[e]))}rt(">>"),rt("endobj")},de=function(t){Xt(t.resourcesOid,!0),rt("<<"),rt("/ProcSet [/PDF /Text /ImageB /ImageC /ImageI]"),function(){for(var t in rt("/Font <<"),Lt)Lt.hasOwnProperty(t)&&(!1===u||!0===u&&p.hasOwnProperty(t))&&rt("/"+t+" "+Lt[t].objectNumber+" 0 R");rt(">>")}(),function(){if(Object.keys(kt).length>0){for(var t in rt("/Shading <<"),kt)kt.hasOwnProperty(t)&&kt[t]instanceof Bt&&kt[t].objectNumber>=0&&rt("/"+t+" "+kt[t].objectNumber+" 0 R");Ot.publish("putShadingPatternDict"),rt(">>")}}(),function(t){if(Object.keys(kt).length>0){for(var e in rt("/Pattern <<"),kt)kt.hasOwnProperty(e)&&kt[e]instanceof f.TilingPattern&&kt[e].objectNumber>=0&&kt[e].objectNumber>")}}(t.objectOid),function(){if(Object.keys(It).length>0){var t;for(t in rt("/ExtGState <<"),It)It.hasOwnProperty(t)&&It[t].objectNumber>=0&&rt("/"+t+" "+It[t].objectNumber+" 0 R");Ot.publish("putGStateDict"),rt(">>")}}(),function(){for(var t in rt("/XObject <<"),jt)jt.hasOwnProperty(t)&&jt[t].objectNumber>=0&&rt("/"+t+" "+jt[t].objectNumber+" 0 R");Ot.publish("putXobjectDict"),rt(">>")}(),rt(">>"),rt("endobj")},ue=function(t){_t[t.fontName]=_t[t.fontName]||{},_t[t.fontName][t.fontStyle]=t.id},pe=function(t,e,n,r,a){var o={id:"F"+(Object.keys(Lt).length+1).toString(10),postScriptName:t,fontName:e,fontStyle:n,encoding:r,isStandardFont:a||!1,metadata:{}};return Ot.publish("addFont",{font:o,instance:this}),Lt[o.id]=o,ue(o),o.id},fe=f.__private__.pdfEscape=f.pdfEscape=function(t,e){return function(t,e){var n,r,a,o,i,A,s,l,c;if(a=(e=e||{}).sourceEncoding||"Unicode",i=e.outputEncoding,(e.autoencode||i)&&Lt[mt].metadata&&Lt[mt].metadata[a]&&Lt[mt].metadata[a].encoding&&(o=Lt[mt].metadata[a].encoding,!i&&Lt[mt].encoding&&(i=Lt[mt].encoding),!i&&o.codePages&&(i=o.codePages[0]),"string"==typeof i&&(i=o[i]),i)){for(s=!1,A=[],n=0,r=t.length;n>8&&(s=!0);t=A.join("")}for(n=t.length;void 0===s&&0!==n;)t.charCodeAt(n-1)>>8&&(s=!0),n--;if(!s)return t;for(A=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");A.push(c),A.push(l-(c<<8))}return String.fromCharCode.apply(void 0,A)}(t,e).replace(/\\/g,"\\\\").replace(/\(/g,"\\(").replace(/\)/g,"\\)")},he=f.__private__.beginPage=function(t){X[++Ht]=[],Pt[Ht]={objId:0,contentsObjId:0,userUnit:Number(s),artBox:null,bleedBox:null,cropBox:null,trimBox:null,mediaBox:{bottomLeftX:0,bottomLeftY:0,topRightX:Number(t[0]),topRightY:Number(t[1])}},be(Ht),nt(X[M])},ge=function(t,e){var r,a,i;switch(n=e||n,"string"==typeof t&&(r=b(t.toLowerCase()),Array.isArray(r)&&(a=r[0],i=r[1])),Array.isArray(t)&&(a=t[0]*xt,i=t[1]*xt),isNaN(a)&&(a=o[0],i=o[1]),(a>14400||i>14400)&&(W.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),i=Math.min(14400,i)),o=[a,i],n.substr(0,1)){case"l":i>a&&(o=[i,a]);break;case"p":a>i&&(o=[i,a])}he(o),Xe(We),rt(an),0!==dn&&rt(dn+" J"),0!==un&&rt(un+" j"),Ot.publish("addPage",{pageNumber:Ht})},me=function(t){t>0&&t<=Ht&&(X.splice(t,1),Pt.splice(t,1),Ht--,M>Ht&&(M=Ht),this.setPage(M))},be=function(t){t>0&&t<=Ht&&(M=t)},ve=f.__private__.getNumberOfPages=f.getNumberOfPages=function(){return X.length-1},we=function(t,e,n){var r,a=void 0;return n=n||{},t=void 0!==t?t:Lt[mt].fontName,e=void 0!==e?e:Lt[mt].fontStyle,r=t.toLowerCase(),void 0!==_t[r]&&void 0!==_t[r][e]?a=_t[r][e]:void 0!==_t[t]&&void 0!==_t[t][e]?a=_t[t][e]:!1===n.disableWarning&&W.warn("Unable to look up font label for font '"+t+"', '"+e+"'. Refer to getFontList() for available fonts."),a||n.noFallback||null==(a=_t.times[e])&&(a=_t.times.normal),a},ye=f.__private__.putInfo=function(){var t=Wt(),e=function(t){return t};for(var n in null!==d&&(e=_e.encryptor(t,0)),rt("<<"),rt("/Producer ("+fe(e("jsPDF "+Ft.version))+")"),gt)gt.hasOwnProperty(n)&>[n]&&rt("/"+n.substr(0,1).toUpperCase()+n.substr(1)+" ("+fe(e(gt[n]))+")");rt("/CreationDate ("+fe(e(k))+")"),rt(">>"),rt("endobj")},xe=f.__private__.putCatalog=function(t){var e=(t=t||{}).rootDictionaryObjId||$t;switch(Wt(),rt("<<"),rt("/Type /Catalog"),rt("/Pages "+e+" 0 R"),st||(st="fullwidth"),st){case"fullwidth":rt("/OpenAction [3 0 R /FitH null]");break;case"fullheight":rt("/OpenAction [3 0 R /FitV null]");break;case"fullpage":rt("/OpenAction [3 0 R /Fit]");break;case"original":rt("/OpenAction [3 0 R /XYZ null null 1]");break;default:var n=""+st;"%"===n.substr(n.length-1)&&(st=parseInt(st)/100),"number"==typeof st&&rt("/OpenAction [3 0 R /XYZ null null "+T(st)+"]")}switch(pt||(pt="continuous"),pt){case"continuous":rt("/PageLayout /OneColumn");break;case"single":rt("/PageLayout /SinglePage");break;case"two":case"twoleft":rt("/PageLayout /TwoColumnLeft");break;case"tworight":rt("/PageLayout /TwoColumnRight")}dt&&rt("/PageMode /"+dt),Ot.publish("putCatalog"),rt(">>"),rt("endobj")},Be=f.__private__.putTrailer=function(){rt("trailer"),rt("<<"),rt("/Size "+(K+1)),rt("/Root "+K+" 0 R"),rt("/Info "+(K-1)+" 0 R"),null!==d&&rt("/Encrypt "+_e.oid+" 0 R"),rt("/ID [ <"+E+"> <"+E+"> ]"),rt(">>")},Ce=f.__private__.putHeader=function(){rt("%PDF-"+h),rt("%ºß¬à")},Fe=f.__private__.putXRef=function(){var t="0000000000";rt("xref"),rt("0 "+(K+1)),rt("0000000000 65535 f ");for(var e=1;e<=K;e++)"function"==typeof G[e]?rt((t+G[e]()).slice(-10)+" 00000 n "):void 0!==G[e]?rt((t+G[e]).slice(-10)+" 00000 n "):rt("0000000000 00000 n ")},Ue=f.__private__.buildDocument=function(){K=0,V=0,q=[],G=[],J=[],$t=Jt(),Zt=Jt(),nt(q),Ot.publish("buildDocument"),Ce(),oe(),function(){Ot.publish("putAdditionalObjects");for(var t=0;t"),rt("/O <"+_e.toHexString(_e.O)+">"),rt("/P "+_e.P),rt(">>"),rt("endobj")),ye(),xe();var t=V;return Fe(),Be(),rt("startxref"),rt(""+t),rt("%%EOF"),nt(X[M]),q.join("\n")},Qe=f.__private__.getBlob=function(t){return new Blob([ot(t)],{type:"application/pdf"})},Te=f.output=f.__private__.output=function(t){return t.foo=function(){try{return t.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(!z.console)throw new Error(n);z.console.error(n,t),z.alert&&alert(n)}},t.foo.bar=t,t.foo}((function(t,e){switch("string"==typeof(e=e||{})?e={filename:e}:e.filename=e.filename||"generated.pdf",t){case void 0:return Ue();case"save":f.save(e.filename);break;case"arraybuffer":return ot(Ue());case"blob":return Qe(Ue());case"bloburi":case"bloburl":if(void 0!==z.URL&&"function"==typeof z.URL.createObjectURL)return z.URL&&z.URL.createObjectURL(Qe(Ue()))||void 0;W.warn("bloburl is not supported by your system, because URL.createObjectURL is not supported by your browser.");break;case"datauristring":case"dataurlstring":var n="",r=Ue();try{n=Z(r)}catch(t){n=Z(unescape(encodeURIComponent(r)))}return"data:application/pdf;filename="+e.filename+";base64,"+n;case"pdfobjectnewwindow":if("[object Window]"===Object.prototype.toString.call(z)){var a="https://cdnjs.cloudflare.com/ajax/libs/pdfobject/2.1.1/pdfobject.min.js",o=' integrity="sha512-4ze/a9/4jqu+tX9dfOqJYSvyYd5M6qum/3HpCLr+/Jqf0whc37VUbkpNGHR7/8pSnCFw47T1fmIpwBV7UySh3g==" crossorigin="anonymous"';e.pdfObjectUrl&&(a=e.pdfObjectUrl,o="");var i='