/*!
 * html2canvas 1.4.0 <https://html2canvas.hertzen.com>
 * Copyright (c) 2022 Niklas von Hertzen <https://hertzen.com>
 * Released under MIT License
 */
!function(A,e){"object"==typeof exports&&"undefined"!=typeof module?module.exports=e():"function"==typeof define&&define.amd?define(e):(A="undefined"!=typeof globalThis?globalThis:A||self).html2canvas=e()}(this,function(){"use strict";
/*! *****************************************************************************
    Copyright (c) Microsoft Corporation.

    Permission to use, copy, modify, and/or distribute this software for any
    purpose with or without fee is hereby granted.

    THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH
    REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
    AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT,
    INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM
    LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR
    OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
    PERFORMANCE OF THIS SOFTWARE.
    ***************************************************************************** */var B=function(A,e){return(B=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(A,e){A.__proto__=e}||function(A,e){for(var t in e)Object.prototype.hasOwnProperty.call(e,t)&&(A[t]=e[t])})(A,e)};function A(A,e){if("function"!=typeof e&&null!==e)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");function t(){this.constructor=A}B(A,e),A.prototype=null===e?Object.create(e):(t.prototype=e.prototype,new t)}var h=function(){return(h=Object.assign||function(A){for(var e,t=1,B=arguments.length;t<B;t++)for(var r in e=arguments[t])Object.prototype.hasOwnProperty.call(e,r)&&(A[r]=e[r]);return A}).apply(this,arguments)};function a(A,s,o,i){return new(o=o||Promise)(function(t,e){function B(A){try{n(i.next(A))}catch(A){e(A)}}function r(A){try{n(i.throw(A))}catch(A){e(A)}}function n(A){var e;A.done?t(A.value):((e=A.value)instanceof o?e:new o(function(A){A(e)})).then(B,r)}n((i=i.apply(A,s||[])).next())})}function H(t,B){var r,n,s,o={label:0,sent:function(){if(1&s[0])throw s[1];return s[1]},trys:[],ops:[]},A={next:e(0),throw:e(1),return:e(2)};return"function"==typeof Symbol&&(A[Symbol.iterator]=function(){return this}),A;function e(e){return function(A){return function(e){if(r)throw new TypeError("Generator is already executing.");for(;o;)try{if(r=1,n&&(s=2&e[0]?n.return:e[0]?n.throw||((s=n.return)&&s.call(n),0):n.next)&&!(s=s.call(n,e[1])).done)return s;switch(n=0,(e=s?[2&e[0],s.value]:e)[0]){case 0:case 1:s=e;break;case 4:return o.label++,{value:e[1],done:!1};case 5:o.label++,n=e[1],e=[0];continue;case 7:e=o.ops.pop(),o.trys.pop();continue;default:if(!(s=0<(s=o.trys).length&&s[s.length-1])&&(6===e[0]||2===e[0])){o=0;continue}if(3===e[0]&&(!s||e[1]>s[0]&&e[1]<s[3])){o.label=e[1];break}if(6===e[0]&&o.label<s[1]){o.label=s[1],s=e;break}if(s&&o.label<s[2]){o.label=s[2],o.ops.push(e);break}s[2]&&o.ops.pop(),o.trys.pop();continue}e=B.call(t,o)}catch(A){e=[6,A],n=0}finally{r=s=0}if(5&e[0])throw e[1];return{value:e[0]?e[1]:void 0,done:!0}}([e,A])}}}function t(A,e,t){if(t||2===arguments.length)for(var B,r=0,n=e.length;r<n;r++)!B&&r in e||((B=B||Array.prototype.slice.call(e,0,r))[r]=e[r]);return A.concat(B||e)}var d=(r.prototype.add=function(A,e,t,B){return new r(this.left+A,this.top+e,this.width+t,this.height+B)},r.fromClientRect=function(A,e){return new r(e.left+A.windowBounds.left,e.top+A.windowBounds.top,e.width,e.height)},r.fromDOMRectList=function(A,e){e=Array.from(e).find(function(A){return 0!==A.width});return e?new r(e.x+A.windowBounds.left,e.y+A.windowBounds.top,e.width,e.height):r.EMPTY},r.EMPTY=new r(0,0,0,0),r);function r(A,e,t,B){this.left=A,this.top=e,this.width=t,this.height=B}for(var f=function(A,e){return d.fromClientRect(A,e.getBoundingClientRect())},Q=function(A){for(var e=[],t=0,B=A.length;t<B;){var r,n=A.charCodeAt(t++);55296<=n&&n<=56319&&t<B?56320==(64512&(r=A.charCodeAt(t++)))?e.push(((1023&n)<<10)+(1023&r)+65536):(e.push(n),t--):e.push(n)}return e},g=function(){for(var A=[],e=0;e<arguments.length;e++)A[e]=arguments[e];if(String.fromCodePoint)return String.fromCodePoint.apply(String,A);var t=A.length;if(!t)return"";for(var B=[],r=-1,n="";++r<t;){var s=A[r];s<=65535?B.push(s):(s-=65536,B.push(55296+(s>>10),s%1024+56320)),(r+1===t||16384<B.length)&&(n+=String.fromCharCode.apply(String,B),B.length=0)}return n},e="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",c="undefined"==typeof Uint8Array?[]:new Uint8Array(256),n=0;n<e.length;n++)c[e.charCodeAt(n)]=n;function s(A,e,t){return A.slice?A.slice(e,t):new Uint16Array(Array.prototype.slice.call(A,e,t))}var o=(i.prototype.get=function(A){var e;if(0<=A){if(A<55296||56319<A&&A<=65535)return e=this.index[A>>5],this.data[e=(e<<2)+(31&A)];if(A<=65535)return e=this.index[2048+(A-55296>>5)],this.data[e=(e<<2)+(31&A)];if(A<this.highStart)return e=this.index[e=2080+(A>>11)],e=this.index[e+=A>>5&63],this.data[e=(e<<2)+(31&A)];if(A<=1114111)return this.data[this.highValueIndex]}return this.errorValue},i);function i(A,e,t,B,r,n){this.initialValue=A,this.errorValue=e,this.highStart=t,this.highValueIndex=B,this.index=r,this.data=n}function w(A,e,t,B){var r=B[t];if(Array.isArray(A)?-1!==A.indexOf(r):A===r)for(var n=t;n<=B.length;){if((o=B[++n])===e)return 1;if(o!==I)break}if(r===I)for(n=t;0<n;){var s=B[--n];if(Array.isArray(A)?-1!==A.indexOf(s):A===s)for(var o,i=t;i<=B.length;){if((o=B[++i])===e)return 1;if(o!==I)break}if(s!==I)break}}function U(A,e){for(var t=A;0<=t;){var B=e[t];if(B!==I)return B;t--}return 0}function l(t,A){var e=(r=function(A,B){void 0===B&&(B="strict");var r=[],n=[],s=[];return A.forEach(function(A,e){var t=j.get(A);if(50<t?(s.push(!0),t-=50):s.push(!1),-1!==["normal","auto","loose"].indexOf(B)&&-1!==[8208,8211,12316,12448].indexOf(A))return n.push(e),r.push(16);if(4!==t&&11!==t)return n.push(e),31===t?r.push("strict"===B?v:X):t===Z||29===t?r.push(V):43===t?131072<=A&&A<=196605||196608<=A&&A<=262141?r.push(X):r.push(V):void r.push(t);if(0===e)return n.push(e),r.push(V);t=r[e-1];return-1===tA.indexOf(t)?(n.push(n[e-1]),r.push(t)):(n.push(e),r.push(V))}),[n,r,s]}(t,(A=A||{lineBreak:"normal",wordBreak:"normal"}).lineBreak))[0],B=r[1],r=r[2];return[e,B="break-all"===A.wordBreak||"break-word"===A.wordBreak?B.map(function(A){return-1!==[S,V,Z].indexOf(A)?X:A}):B,"keep-all"===A.wordBreak?r.map(function(A,e){return A&&19968<=t[e]&&t[e]<=40959}):void 0]}var C,u,F,p,E,I=10,y=13,K=15,m=17,L=18,b=19,D=20,v=21,x=22,M=24,S=25,T=26,G=27,O=28,V=30,k=32,R=33,N=34,P=35,X=37,J=38,Y=39,W=40,Z=42,_=[9001,65288],q="×",j=(F=function(A){var e,t,B,r,n=.75*A.length,s=A.length,o=0;"="===A[A.length-1]&&(n--,"="===A[A.length-2]&&n--);for(var n=new("undefined"!=typeof ArrayBuffer&&"undefined"!=typeof Uint8Array&&void 0!==Uint8Array.prototype.slice?ArrayBuffer:Array)(n),i=Array.isArray(n)?n:new Uint8Array(n),Q=0;Q<s;Q+=4)e=c[A.charCodeAt(Q)],t=c[A.charCodeAt(Q+1)],B=c[A.charCodeAt(Q+2)],r=c[A.charCodeAt(Q+3)],i[o++]=e<<2|t>>4,i[o++]=(15&t)<<4|B>>2,i[o++]=(3&B)<<6|63&r;return n}(C=" "),p=Array.isArray(F)?function(A){for(var e=A.length,t=[],B=0;B<e;B+=4)t.push(A[B+3]<<24|A[B+2]<<16|A[B+1]<<8|A[B]);return t}(F):new Uint32Array(F),E=Array.isArray(F)?function(A){for(var e=A.length,t=[],B=0;B<e;B+=2)t.push(A[B+1]<<8|A[B]);return t}(F):new Uint16Array(F),C=s(E,12,p[4]/2),u=2===p[5]?s(E,(24+p[4])/2):(F=p,E=Math.ceil((24+p[4])/4),F.slice?F.slice(E,u):new Uint32Array(Array.prototype.slice.call(F,E,u))),new o(p[0],p[1],p[2],p[3],C,u)),z=[V,36],$=[1,2,3,5],AA=[I,8],eA=[G,T],tA=$.concat(AA),BA=[J,Y,W,N,P],rA=[K,y],nA=(sA.prototype.slice=function(){return g.apply(void 0,this.codePoints.slice(this.start,this.end))},sA);function sA(A,e,t,B){this.codePoints=A,this.required="!"===e,this.start=t,this.end=B}function oA(A,e){var t=Q(A),B=(e=l(t,e))[0],r=e[1],n=e[2],s=t.length,o=0,i=0;return{next:function(){if(s<=i)return{done:!0,value:null};for(var A=q;i<s&&(A=function(A,e,t,B,r){if(0===t[B])return q;var n=B-1;if(Array.isArray(r)&&!0===r[n])return q;var s=n-1,o=1+n,i=e[n],B=0<=s?e[s]:0,r=e[o];if(2===i&&3===r)return q;if(-1!==$.indexOf(i))return"!";if(-1!==$.indexOf(r))return q;if(-1!==AA.indexOf(r))return q;if(8===U(n,e))return"÷";if(11===j.get(A[n]))return q;if((i===k||i===R)&&11===j.get(A[o]))return q;if(7===i||7===r)return q;if(9===i)return q;if(-1===[I,y,K].indexOf(i)&&9===r)return q;if(-1!==[m,L,b,M,O].indexOf(r))return q;if(U(n,e)===x)return q;if(w(23,x,n,e))return q;if(w([m,L],v,n,e))return q;if(w(12,12,n,e))return q;if(i===I)return"÷";if(23===i||23===r)return q;if(16===r||16===i)return"÷";if(-1!==[y,K,v].indexOf(r)||14===i)return q;if(36===B&&-1!==rA.indexOf(i))return q;if(i===O&&36===r)return q;if(r===D)return q;if(-1!==z.indexOf(r)&&i===S||-1!==z.indexOf(i)&&r===S)return q;if(i===G&&-1!==[X,k,R].indexOf(r)||-1!==[X,k,R].indexOf(i)&&r===T)return q;if(-1!==z.indexOf(i)&&-1!==eA.indexOf(r)||-1!==eA.indexOf(i)&&-1!==z.indexOf(r))return q;if(-1!==[G,T].indexOf(i)&&(r===S||-1!==[x,K].indexOf(r)&&e[1+o]===S)||-1!==[x,K].indexOf(i)&&r===S||i===S&&-1!==[S,O,M].indexOf(r))return q;if(-1!==[S,O,M,m,L].indexOf(r))for(var Q=n;0<=Q;){if((c=e[Q])===S)return q;if(-1===[O,M].indexOf(c))break;Q--}if(-1!==[G,T].indexOf(r))for(var c,Q=-1!==[m,L].indexOf(i)?s:n;0<=Q;){if((c=e[Q])===S)return q;if(-1===[O,M].indexOf(c))break;Q--}if(J===i&&-1!==[J,Y,N,P].indexOf(r)||-1!==[Y,N].indexOf(i)&&-1!==[Y,W].indexOf(r)||-1!==[W,P].indexOf(i)&&r===W)return q;if(-1!==BA.indexOf(i)&&-1!==[D,T].indexOf(r)||-1!==BA.indexOf(r)&&i===G)return q;if(-1!==z.indexOf(i)&&-1!==z.indexOf(r))return q;if(i===M&&-1!==z.indexOf(r))return q;if(-1!==z.concat(S).indexOf(i)&&r===x&&-1===_.indexOf(A[o])||-1!==z.concat(S).indexOf(r)&&i===L)return q;if(41===i&&41===r){for(var a=t[n],g=1;0<a&&41===e[--a];)g++;if(g%2!=0)return q}return i===k&&r===R?q:"÷"}(t,r,B,++i,n))===q;);if(A===q&&i!==s)return{done:!0,value:null};var e=new nA(t,A,o,i);return o=i,{value:e,done:!1}}}}function iA(A){return 48<=A&&A<=57}function QA(A){return iA(A)||65<=A&&A<=70||97<=A&&A<=102}function cA(A){return 10===A||9===A||32===A}function aA(A){return 97<=(t=e=A)&&t<=122||65<=(e=e)&&e<=90||128<=A||95===A;var e,t}function gA(A){return aA(A)||iA(A)||45===A}function wA(A,e){return 92===A&&10!==e}function UA(A,e,t){return 45===A?aA(e)||wA(e,t):!!aA(A)||92===A&&10!==e}function lA(A,e,t){return 43===A||45===A?!!iA(e)||46===e&&iA(t):iA(46===A?e:A)}var CA={type:2},uA={type:3},FA={type:4},hA={type:13},dA={type:8},fA={type:21},HA={type:9},pA={type:10},EA={type:11},IA={type:12},yA={type:14},KA={type:23},mA={type:1},LA={type:25},bA={type:24},DA={type:26},vA={type:27},xA={type:28},MA={type:29},SA={type:31},TA={type:32},GA=(OA.prototype.write=function(A){this._value=this._value.concat(Q(A))},OA.prototype.read=function(){for(var A=[],e=this.consumeToken();e!==TA;)A.push(e),e=this.consumeToken();return A},OA.prototype.consumeToken=function(){var A=this.consumeCodePoint();switch(A){case 34:return this.consumeStringToken(34);case 35:var e=this.peekCodePoint(0),t=this.peekCodePoint(1),B=this.peekCodePoint(2);if(gA(e)||wA(t,B)){var r=UA(e,t,B)?2:1;return{type:5,value:this.consumeName(),flags:r}}break;case 36:if(61===this.peekCodePoint(0))return this.consumeCodePoint(),hA;break;case 39:return this.consumeStringToken(39);case 40:return CA;case 41:return uA;case 42:if(61===this.peekCodePoint(0))return this.consumeCodePoint(),yA;break;case 43:if(lA(A,this.peekCodePoint(0),this.peekCodePoint(1)))return this.reconsumeCodePoint(A),this.consumeNumericToken();break;case 44:return FA;case 45:var B=A,r=this.peekCodePoint(0),n=this.peekCodePoint(1);if(lA(B,r,n))return this.reconsumeCodePoint(A),this.consumeNumericToken();if(UA(B,r,n))return this.reconsumeCodePoint(A),this.consumeIdentLikeToken();if(45===r&&62===n)return this.consumeCodePoint(),this.consumeCodePoint(),bA;break;case 46:if(lA(A,this.peekCodePoint(0),this.peekCodePoint(1)))return this.reconsumeCodePoint(A),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(-1===s)return this.consumeToken()}break;case 58:return DA;case 59:return vA;case 60:if(33===this.peekCodePoint(0)&&45===this.peekCodePoint(1)&&45===this.peekCodePoint(2))return this.consumeCodePoint(),this.consumeCodePoint(),LA;break;case 64:var n=this.peekCodePoint(0),o=this.peekCodePoint(1),i=this.peekCodePoint(2);if(UA(n,o,i))return{type:7,value:this.consumeName()};break;case 91:return xA;case 92:if(wA(A,this.peekCodePoint(0)))return this.reconsumeCodePoint(A),this.consumeIdentLikeToken();break;case 93:return MA;case 61:if(61===this.peekCodePoint(0))return this.consumeCodePoint(),dA;break;case 123:return EA;case 125:return IA;case 117:case 85:o=this.peekCodePoint(0),i=this.peekCodePoint(1);return 43!==o||!QA(i)&&63!==i||(this.consumeCodePoint(),this.consumeUnicodeRangeToken()),this.reconsumeCodePoint(A),this.consumeIdentLikeToken();case 124:if(61===this.peekCodePoint(0))return this.consumeCodePoint(),HA;if(124===this.peekCodePoint(0))return this.consumeCodePoint(),fA;break;case 126:if(61===this.peekCodePoint(0))return this.consumeCodePoint(),pA;break;case-1:return TA}return cA(A)?(this.consumeWhiteSpace(),SA):iA(A)?(this.reconsumeCodePoint(A),this.consumeNumericToken()):aA(A)?(this.reconsumeCodePoint(A),this.consumeIdentLikeToken()):{type:6,value:g(A)}},OA.prototype.consumeCodePoint=function(){var A=this._value.shift();return void 0===A?-1:A},OA.prototype.reconsumeCodePoint=function(A){this._value.unshift(A)},OA.prototype.peekCodePoint=function(A){return A>=this._value.length?-1:this._value[A]},OA.prototype.consumeUnicodeRangeToken=function(){for(var A=[],e=this.consumeCodePoint();QA(e)&&A.length<6;)A.push(e),e=this.consumeCodePoint();for(var t=!1;63===e&&A.length<6;)A.push(e),e=this.consumeCodePoint(),t=!0;if(t)return{type:30,start:parseInt(g.apply(void 0,A.map(function(A){return 63===A?48:A})),16),end:parseInt(g.apply(void 0,A.map(function(A){return 63===A?70:A})),16)};var B=parseInt(g.apply(void 0,A),16);if(45===this.peekCodePoint(0)&&QA(this.peekCodePoint(1))){this.consumeCodePoint();for(var e=this.consumeCodePoint(),r=[];QA(e)&&r.length<6;)r.push(e),e=this.consumeCodePoint();return{type:30,start:B,end:parseInt(g.apply(void 0,r),16)}}return{type:30,start:B,end:B}},OA.prototype.consumeIdentLikeToken=function(){var A=this.consumeName();return"url"===A.toLowerCase()&&40===this.peekCodePoint(0)?(this.consumeCodePoint(),this.consumeUrlToken()):40===this.peekCodePoint(0)?(this.consumeCodePoint(),{type:19,value:A}):{type:20,value:A}},OA.prototype.consumeUrlToken=function(){var A=[];if(this.consumeWhiteSpace(),-1===this.peekCodePoint(0))return{type:22,value:""};var e,t=this.peekCodePoint(0);if(39===t||34===t){t=this.consumeStringToken(this.consumeCodePoint());return 0===t.type&&(this.consumeWhiteSpace(),-1===this.peekCodePoint(0)||41===this.peekCodePoint(0))?(this.consumeCodePoint(),{type:22,value:t.value}):(this.consumeBadUrlRemnants(),KA)}for(;;){var B=this.consumeCodePoint();if(-1===B||41===B)return{type:22,value:g.apply(void 0,A)};if(cA(B))return this.consumeWhiteSpace(),-1===this.peekCodePoint(0)||41===this.peekCodePoint(0)?(this.consumeCodePoint(),{type:22,value:g.apply(void 0,A)}):(this.consumeBadUrlRemnants(),KA);if(34===B||39===B||40===B||(0<=(e=B)&&e<=8||11===e||14<=e&&e<=31||127===e))return this.consumeBadUrlRemnants(),KA;if(92===B){if(!wA(B,this.peekCodePoint(0)))return this.consumeBadUrlRemnants(),KA;A.push(this.consumeEscapedCodePoint())}else A.push(B)}},OA.prototype.consumeWhiteSpace=function(){for(;cA(this.peekCodePoint(0));)this.consumeCodePoint()},OA.prototype.consumeBadUrlRemnants=function(){for(;;){var A=this.consumeCodePoint();if(41===A||-1===A)return;wA(A,this.peekCodePoint(0))&&this.consumeEscapedCodePoint()}},OA.prototype.consumeStringSlice=function(A){for(var e="";0<A;){var t=Math.min(5e4,A);e+=g.apply(void 0,this._value.splice(0,t)),A-=t}return this._value.shift(),e},OA.prototype.consumeStringToken=function(A){for(var e="",t=0;;){var B,r=this._value[t];if(-1===r||void 0===r||r===A)return{type:0,value:e+=this.consumeStringSlice(t)};if(10===r)return this._value.splice(0,t),mA;92!==r||-1!==(B=this._value[t+1])&&void 0!==B&&(10===B?(e+=this.consumeStringSlice(t),t=-1,this._value.shift()):wA(r,B)&&(e+=this.consumeStringSlice(t),e+=g(this.consumeEscapedCodePoint()),t=-1)),t++}},OA.prototype.consumeNumber=function(){var A=[],e=4;for(43!==(t=this.peekCodePoint(0))&&45!==t||A.push(this.consumeCodePoint());iA(this.peekCodePoint(0));)A.push(this.consumeCodePoint());var t=this.peekCodePoint(0),B=this.peekCodePoint(1);if(46===t&&iA(B))for(A.push(this.consumeCodePoint(),this.consumeCodePoint()),e=8;iA(this.peekCodePoint(0));)A.push(this.consumeCodePoint());t=this.peekCodePoint(0);var B=this.peekCodePoint(1),r=this.peekCodePoint(2);if((69===t||101===t)&&((43===B||45===B)&&iA(r)||iA(B)))for(A.push(this.consumeCodePoint(),this.consumeCodePoint()),e=8;iA(this.peekCodePoint(0));)A.push(this.consumeCodePoint());return[function(A){var e=0,t=1;43!==A[e]&&45!==A[e]||(45===A[e]&&(t=-1),e++);for(var B=[];iA(A[e]);)B.push(A[e++]);var r=B.length?parseInt(g.apply(void 0,B),10):0;46===A[e]&&e++;for(var n=[];iA(A[e]);)n.push(A[e++]);var s=n.length,o=s?parseInt(g.apply(void 0,n),10):0;69!==A[e]&&101!==A[e]||e++;var i=1;43!==A[e]&&45!==A[e]||(45===A[e]&&(i=-1),e++);for(var Q=[];iA(A[e]);)Q.push(A[e++]);var c=Q.length?parseInt(g.apply(void 0,Q),10):0;return t*(r+o*Math.pow(10,-s))*Math.pow(10,i*c)}(A),e]},OA.prototype.consumeNumericToken=function(){var A=this.consumeNumber(),e=A[0],t=A[1],B=this.peekCodePoint(0),r=this.peekCodePoint(1),A=this.peekCodePoint(2);return UA(B,r,A)?{type:15,number:e,flags:t,unit:this.consumeName()}:37===B?(this.consumeCodePoint(),{type:16,number:e,flags:t}):{type:17,number:e,flags:t}},OA.prototype.consumeEscapedCodePoint=function(){var A,e=this.consumeCodePoint();if(QA(e)){for(var t=g(e);QA(this.peekCodePoint(0))&&t.length<6;)t+=g(this.consumeCodePoint());cA(this.peekCodePoint(0))&&this.consumeCodePoint();var B=parseInt(t,16);return 0===B||55296<=(A=B)&&A<=57343||1114111<B?65533:B}return-1===e?65533:e},OA.prototype.consumeName=function(){for(var A="";;){var e=this.consumeCodePoint();if(gA(e))A+=g(e);else{if(!wA(e,this.peekCodePoint(0)))return this.reconsumeCodePoint(e),A;A+=g(this.consumeEscapedCodePoint())}}},OA);function OA(){this._value=[]}var VA=(kA.create=function(A){var e=new GA;return e.write(A),new kA(e.read())},kA.parseValue=function(A){return kA.create(A).parseComponentValue()},kA.parseValues=function(A){return kA.create(A).parseComponentValues()},kA.prototype.parseComponentValue=function(){for(var A=this.consumeToken();31===A.type;)A=this.consumeToken();if(32===A.type)throw new SyntaxError("Error parsing CSS component value, unexpected EOF");this.reconsumeToken(A);for(var e=this.consumeComponentValue();31===(A=this.consumeToken()).type;);if(32===A.type)return e;throw new SyntaxError("Error parsing CSS component value, multiple values found when expecting only one")},kA.prototype.parseComponentValues=function(){for(var A=[];;){var e=this.consumeComponentValue();if(32===e.type)return A;A.push(e),A.push()}},kA.prototype.consumeComponentValue=function(){var A=this.consumeToken();switch(A.type){case 11:case 28:case 2:return this.consumeSimpleBlock(A.type);case 19:return this.consumeFunction(A)}return A},kA.prototype.consumeSimpleBlock=function(A){for(var e={type:A,values:[]},t=this.consumeToken();;){if(32===t.type||re(t,A))return e;this.reconsumeToken(t),e.values.push(this.consumeComponentValue()),t=this.consumeToken()}},kA.prototype.consumeFunction=function(A){for(var e={name:A.value,values:[],type:18};;){var t=this.consumeToken();if(32===t.type||3===t.type)return e;this.reconsumeToken(t),e.values.push(this.consumeComponentValue())}},kA.prototype.consumeToken=function(){var A=this._tokens.shift();return void 0===A?TA:A},kA.prototype.reconsumeToken=function(A){this._tokens.unshift(A)},kA);function kA(A){this._tokens=A}function RA(A){return 15===A.type}function NA(A){return 17===A.type}function PA(A){return 20===A.type}function XA(A){return 0===A.type}function JA(A,e){return PA(A)&&A.value===e}function YA(A){return 31!==A.type}function WA(A){return 31!==A.type&&4!==A.type}function ZA(A){var e=[],t=[];return A.forEach(function(A){if(4===A.type){if(0===t.length)throw new Error("Error parsing function args, zero tokens for arg");return e.push(t),void(t=[])}31!==A.type&&t.push(A)}),t.length&&e.push(t),e}function _A(A){return 17===A.type||15===A.type}function qA(A){return 16===A.type||_A(A)}function jA(A){return 1<A.length?[A[0],A[1]]:[A[0]]}function zA(A,e,t){var B=A[0],A=A[1];return[ie(B,e),ie(void 0!==A?A:B,t)]}function $A(A){return 15===A.type&&("deg"===A.unit||"grad"===A.unit||"rad"===A.unit||"turn"===A.unit)}function Ae(A){switch(A.filter(PA).map(function(A){return A.value}).join(" ")){case"to bottom right":case"to right bottom":case"left top":case"top left":return[ne,ne];case"to top":case"bottom":return ce(0);case"to bottom left":case"to left bottom":case"right top":case"top right":return[ne,oe];case"to right":case"left":return ce(90);case"to top left":case"to left top":case"right bottom":case"bottom right":return[oe,oe];case"to bottom":case"top":return ce(180);case"to top right":case"to right top":case"left bottom":case"bottom left":return[oe,ne];case"to left":case"right":return ce(270)}return 0}function ee(A){return 0==(255&A)}function te(A){var e=255&A,t=255&A>>8,B=255&A>>16,A=255&A>>24;return e<255?"rgba("+A+","+B+","+t+","+e/255+")":"rgb("+A+","+B+","+t+")"}function Be(A,e){if(17===A.type)return A.number;if(16!==A.type)return 0;var t=3===e?1:255;return 3===e?A.number/100*t:Math.round(A.number/100*t)}var re=function(A,e){return 11===e&&12===A.type||(28===e&&29===A.type||2===e&&3===A.type)},ne={type:17,number:0,flags:4},se={type:16,number:50,flags:4},oe={type:16,number:100,flags:4},ie=function(A,e){if(16===A.type)return A.number/100*e;if(RA(A))switch(A.unit){case"rem":case"em":return 16*A.number;default:return A.number}return A.number},Qe=function(A,e){if(15===e.type)switch(e.unit){case"deg":return Math.PI*e.number/180;case"grad":return Math.PI/200*e.number;case"rad":return e.number;case"turn":return 2*Math.PI*e.number}throw new Error("Unsupported angle type")},ce=function(A){return Math.PI*A/180},ae=function(A,e){if(18===e.type){var t=He[e.name];if(void 0===t)throw new Error('Attempting to parse an unsupported color function "'+e.name+'"');return t(A,e.values)}if(5===e.type){if(3===e.value.length){var B=e.value.substring(0,1),r=e.value.substring(1,2),n=e.value.substring(2,3);return ge(parseInt(B+B,16),parseInt(r+r,16),parseInt(n+n,16),1)}if(4===e.value.length){var B=e.value.substring(0,1),r=e.value.substring(1,2),n=e.value.substring(2,3),s=e.value.substring(3,4);return ge(parseInt(B+B,16),parseInt(r+r,16),parseInt(n+n,16),parseInt(s+s,16)/255)}if(6===e.value.length){B=e.value.substring(0,2),r=e.value.substring(2,4),n=e.value.substring(4,6);return ge(parseInt(B,16),parseInt(r,16),parseInt(n,16),1)}if(8===e.value.length){B=e.value.substring(0,2),r=e.value.substring(2,4),n=e.value.substring(4,6),s=e.value.substring(6,8);return ge(parseInt(B,16),parseInt(r,16),parseInt(n,16),parseInt(s,16)/255)}}if(20===e.type){e=pe[e.value.toUpperCase()];if(void 0!==e)return e}return pe.TRANSPARENT},ge=function(A,e,t,B){return(A<<24|e<<16|t<<8|Math.round(255*B)<<0)>>>0},we=function(A,e){e=e.filter(WA);if(3===e.length){var t=e.map(Be),B=t[0],r=t[1],t=t[2];return ge(B,r,t,1)}if(4!==e.length)return 0;e=e.map(Be),B=e[0],r=e[1],t=e[2],e=e[3];return ge(B,r,t,e)};function Ue(A,e,t){return t<0&&(t+=1),1<=t&&--t,t<1/6?(e-A)*t*6+A:t<.5?e:t<2/3?6*(e-A)*(2/3-t)+A:A}function le(A,e){return ae(A,VA.create(e).parseComponentValue())}function Ce(A,e){return A=ae(A,e[0]),(e=e[1])&&qA(e)?{color:A,stop:e}:{color:A,stop:null}}function ue(A,t){var e=A[0],B=A[A.length-1];null===e.stop&&(e.stop=ne),null===B.stop&&(B.stop=oe);for(var r=[],n=0,s=0;s<A.length;s++){var o=A[s].stop;null!==o?(n<(o=ie(o,t))?r.push(o):r.push(n),n=o):r.push(null)}for(var i=null,s=0;s<r.length;s++){var Q=r[s];if(null===Q)null===i&&(i=s);else if(null!==i){for(var c=s-i,a=(Q-r[i-1])/(1+c),g=1;g<=c;g++)r[i+g-1]=a*g;i=null}}return A.map(function(A,e){return{color:A.color,stop:Math.max(Math.min(1,r[e]/t),0)}})}function Fe(A,e,t){var B="number"==typeof A?A:(s=e/2,B=(n=t)/2,s=ie((r=A)[0],e)-s,n=B-ie(r[1],n),(Math.atan2(n,s)+2*Math.PI)%(2*Math.PI)),r=Math.abs(e*Math.sin(B))+Math.abs(t*Math.cos(B)),n=e/2,s=t/2,e=r/2,t=Math.sin(B-Math.PI/2)*e,e=Math.cos(B-Math.PI/2)*e;return[r,n-e,n+e,s-t,s+t]}function he(A,e){return Math.sqrt(A*A+e*e)}function de(A,e,r,n,s){return[[0,0],[0,e],[A,0],[A,e]].reduce(function(A,e){var t=e[0],B=e[1],B=he(r-t,n-B);return(s?B<A.optimumDistance:B>A.optimumDistance)?{optimumCorner:e,optimumDistance:B}:A},{optimumDistance:s?1/0:-1/0,optimumCorner:null}).optimumCorner}var fe=function(A,e){var t=e.filter(WA),B=t[0],r=t[1],n=t[2],e=t[3],t=(17===B.type?ce(B.number):Qe(A,B))/(2*Math.PI),A=qA(r)?r.number/100:0,B=qA(n)?n.number/100:0,r=void 0!==e&&qA(e)?ie(e,1):1;if(0==A)return ge(255*B,255*B,255*B,1);n=B<=.5?B*(1+A):B+A-B*A,e=2*B-n,A=Ue(e,n,t+1/3),B=Ue(e,n,t),t=Ue(e,n,t-1/3);return ge(255*A,255*B,255*t,r)},He={hsl:fe,hsla:fe,rgb:we,rgba:we},pe={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},Ee={name:"background-clip",initialValue:"border-box",prefix:!1,type:1,parse:function(A,e){return e.map(function(A){if(PA(A))switch(A.value){case"padding-box":return 1;case"content-box":return 2}return 0})}},Ie={name:"background-color",initialValue:"transparent",prefix:!1,type:3,format:"color"},fe=function(t,A){var B=ce(180),r=[];return ZA(A).forEach(function(A,e){if(0===e){e=A[0];if(20===e.type&&-1!==["top","left","right","bottom"].indexOf(e.value))return void(B=Ae(A));if($A(e))return void(B=(Qe(t,e)+ce(270))%ce(360))}A=Ce(t,A);r.push(A)}),{angle:B,stops:r,type:1}},ye="closest-side",Ke="farthest-side",me="closest-corner",Le="farthest-corner",be="ellipse",De="contain",we=function(B,A){var r=0,n=3,s=[],o=[];return ZA(A).forEach(function(A,e){var t=!0;0===e?t=A.reduce(function(A,e){if(PA(e))switch(e.value){case"center":return o.push(se),!1;case"top":case"left":return o.push(ne),!1;case"right":case"bottom":return o.push(oe),!1}else if(qA(e)||_A(e))return o.push(e),!1;return A},t):1===e&&(t=A.reduce(function(A,e){if(PA(e))switch(e.value){case"circle":return r=0,!1;case be:return!(r=1);case De:case ye:return n=0,!1;case Ke:return!(n=1);case me:return!(n=2);case"cover":case Le:return!(n=3)}else if(_A(e)||qA(e))return(n=!Array.isArray(n)?[]:n).push(e),!1;return A},t)),t&&(A=Ce(B,A),s.push(A))}),{size:n,shape:r,stops:s,position:o,type:2}},ve=function(A,e){if(22===e.type){var t={url:e.value,type:0};return A.cache.addImage(e.value),t}if(18!==e.type)throw new Error("Unsupported image type "+e.type);t=Me[e.name];if(void 0===t)throw new Error('Attempting to parse an unsupported image function "'+e.name+'"');return t(A,e.values)};var xe,Me={"linear-gradient":function(t,A){var B=ce(180),r=[];return ZA(A).forEach(function(A,e){if(0===e){e=A[0];if(20===e.type&&"to"===e.value)return void(B=Ae(A));if($A(e))return void(B=Qe(t,e))}A=Ce(t,A);r.push(A)}),{angle:B,stops:r,type:1}},"-moz-linear-gradient":fe,"-ms-linear-gradient":fe,"-o-linear-gradient":fe,"-webkit-linear-gradient":fe,"radial-gradient":function(r,A){var n=0,s=3,o=[],i=[];return ZA(A).forEach(function(A,e){var t,B=!0;0===e&&(t=!1,B=A.reduce(function(A,e){if(t)if(PA(e))switch(e.value){case"center":return i.push(se),A;case"top":case"left":return i.push(ne),A;case"right":case"bottom":return i.push(oe),A}else(qA(e)||_A(e))&&i.push(e);else if(PA(e))switch(e.value){case"circle":return n=0,!1;case be:return!(n=1);case"at":return!(t=!0);case ye:return s=0,!1;case"cover":case Ke:return!(s=1);case De:case me:return!(s=2);case Le:return!(s=3)}else if(_A(e)||qA(e))return(s=!Array.isArray(s)?[]:s).push(e),!1;return A},B)),B&&(A=Ce(r,A),o.push(A))}),{size:s,shape:n,stops:o,position:i,type:2}},"-moz-radial-gradient":we,"-ms-radial-gradient":we,"-o-radial-gradient":we,"-webkit-radial-gradient":we,"-webkit-gradient":function(B,A){var e=ce(180),r=[],n=1;return ZA(A).forEach(function(A,e){var t,A=A[0];if(0===e){if(PA(A)&&"linear"===A.value)return void(n=1);if(PA(A)&&"radial"===A.value)return void(n=2)}18===A.type&&("from"===A.name?(t=ae(B,A.values[0]),r.push({stop:ne,color:t})):"to"===A.name?(t=ae(B,A.values[0]),r.push({stop:oe,color:t})):"color-stop"!==A.name||2===(A=A.values.filter(WA)).length&&(t=ae(B,A[1]),A=A[0],NA(A)&&r.push({stop:{type:16,number:100*A.number,flags:A.flags},color:t})))}),1===n?{angle:(e+ce(180))%ce(360),stops:r,type:n}:{size:3,shape:0,stops:r,position:[],type:n}}},Se={name:"background-image",initialValue:"none",type:1,prefix:!1,parse:function(e,A){if(0===A.length)return[];var t=A[0];return 20===t.type&&"none"===t.value?[]:A.filter(function(A){return WA(A)&&!(20===(A=A).type&&"none"===A.value||18===A.type&&!Me[A.name])}).map(function(A){return ve(e,A)})}},Te={name:"background-origin",initialValue:"border-box",prefix:!1,type:1,parse:function(A,e){return e.map(function(A){if(PA(A))switch(A.value){case"padding-box":return 1;case"content-box":return 2}return 0})}},Ge={name:"background-position",initialValue:"0% 0%",type:1,prefix:!1,parse:function(A,e){return ZA(e).map(function(A){return A.filter(qA)}).map(jA)}},Oe={name:"background-repeat",initialValue:"repeat",prefix:!1,type:1,parse:function(A,e){return ZA(e).map(function(A){return A.filter(PA).map(function(A){return A.value}).join(" ")}).map(Ve)}},Ve=function(A){switch(A){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}};(we=xe=xe||{}).AUTO="auto",we.CONTAIN="contain";function ke(A,e){return PA(A)&&"normal"===A.value?1.2*e:17===A.type?e*A.number:qA(A)?ie(A,e):e}var Re,Ne,Pe={name:"background-size",initialValue:"0",prefix:!(we.COVER="cover"),type:1,parse:function(A,e){return ZA(e).map(function(A){return A.filter(Xe)})}},Xe=function(A){return PA(A)||qA(A)},we=function(A){return{name:"border-"+A+"-color",initialValue:"transparent",prefix:!1,type:3,format:"color"}},Je=we("top"),Ye=we("right"),We=we("bottom"),Ze=we("left"),we=function(A){return{name:"border-radius-"+A,initialValue:"0 0",prefix:!1,type:1,parse:function(A,e){return jA(e.filter(qA))}}},_e=we("top-left"),qe=we("top-right"),je=we("bottom-right"),ze=we("bottom-left"),we=function(A){return{name:"border-"+A+"-style",initialValue:"solid",prefix:!1,type:2,parse:function(A,e){switch(e){case"none":return 0;case"dashed":return 2;case"dotted":return 3;case"double":return 4}return 1}}},$e=we("top"),At=we("right"),et=we("bottom"),tt=we("left"),we=function(A){return{name:"border-"+A+"-width",initialValue:"0",type:0,prefix:!1,parse:function(A,e){return RA(e)?e.number:0}}},Bt=we("top"),rt=we("right"),nt=we("bottom"),st=we("left"),ot={name:"color",initialValue:"transparent",prefix:!1,type:3,format:"color"},it={name:"direction",initialValue:"ltr",prefix:!1,type:2,parse:function(A,e){return"rtl"!==e?0:1}},Qt={name:"display",initialValue:"inline-block",prefix:!1,type:1,parse:function(A,e){return e.filter(PA).reduce(function(A,e){return A|ct(e.value)},0)}},ct=function(A){switch(A){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},at={name:"float",initialValue:"none",prefix:!1,type:2,parse:function(A,e){switch(e){case"left":return 1;case"right":return 2;case"inline-start":return 3;case"inline-end":return 4}return 0}},gt={name:"letter-spacing",initialValue:"0",prefix:!1,type:0,parse:function(A,e){return!(20===e.type&&"normal"===e.value||17!==e.type&&15!==e.type)?e.number:0}},wt={name:"line-break",initialValue:(we=Re=Re||{}).NORMAL="normal",prefix:!(we.STRICT="strict"),type:2,parse:function(A,e){return"strict"!==e?Re.NORMAL:Re.STRICT}},Ut={name:"line-height",initialValue:"normal",prefix:!1,type:4},lt={name:"list-style-image",initialValue:"none",type:0,prefix:!1,parse:function(A,e){return 20===e.type&&"none"===e.value?null:ve(A,e)}},Ct={name:"list-style-position",initialValue:"outside",prefix:!1,type:2,parse:function(A,e){return"inside"!==e?1:0}},ut={name:"list-style-type",initialValue:"none",prefix:!1,type:2,parse:function(A,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}}},we=function(A){return{name:"margin-"+A,initialValue:"0",prefix:!1,type:4}},Ft=we("top"),ht=we("right"),dt=we("bottom"),ft=we("left"),Ht={name:"overflow",initialValue:"visible",prefix:!1,type:1,parse:function(A,e){return e.filter(PA).map(function(A){switch(A.value){case"hidden":return 1;case"scroll":return 2;case"clip":return 3;case"auto":return 4;default:return 0}})}},pt={name:"overflow-wrap",initialValue:"normal",prefix:!1,type:2,parse:function(A,e){return"break-word"!==e?"normal":"break-word"}},we=function(A){return{name:"padding-"+A,initialValue:"0",prefix:!1,type:3,format:"length-percentage"}},Et=we("top"),It=we("right"),yt=we("bottom"),Kt=we("left"),mt={name:"text-align",initialValue:"left",prefix:!1,type:2,parse:function(A,e){switch(e){case"right":return 2;case"center":case"justify":return 1;default:return 0}}},Lt={name:"position",initialValue:"static",prefix:!1,type:2,parse:function(A,e){switch(e){case"relative":return 1;case"absolute":return 2;case"fixed":return 3;case"sticky":return 4}return 0}},bt={name:"text-shadow",initialValue:"none",type:1,prefix:!1,parse:function(n,A){return 1===A.length&&JA(A[0],"none")?[]:ZA(A).map(function(A){for(var e={color:pe.TRANSPARENT,offsetX:ne,offsetY:ne,blur:ne},t=0,B=0;B<A.length;B++){var r=A[B];_A(r)?(0===t?e.offsetX=r:1===t?e.offsetY=r:e.blur=r,t++):e.color=ae(n,r)}return e})}},Dt={name:"text-transform",initialValue:"none",prefix:!1,type:2,parse:function(A,e){switch(e){case"uppercase":return 2;case"lowercase":return 1;case"capitalize":return 3}return 0}},vt={name:"transform",initialValue:"none",prefix:!0,type:0,parse:function(A,e){if(20===e.type&&"none"===e.value)return null;if(18!==e.type)return null;var t=xt[e.name];if(void 0===t)throw new Error('Attempting to parse an unsupported transform function "'+e.name+'"');return t(e.values)}},xt={matrix:function(A){A=A.filter(function(A){return 17===A.type}).map(function(A){return A.number});return 6===A.length?A:null},matrix3d:function(A){var e=A.filter(function(A){return 17===A.type}).map(function(A){return A.number}),t=e[0],B=e[1];e[2],e[3];var r=e[4],n=e[5];e[6],e[7],e[8],e[9],e[10],e[11];var s=e[12],A=e[13];return e[14],e[15],16===e.length?[t,B,r,n,s,A]:null}},we={type:16,number:50,flags:4},Mt=[we,we],St={name:"transform-origin",initialValue:"50% 50%",prefix:!0,type:1,parse:function(A,e){e=e.filter(qA);return 2!==e.length?Mt:[e[0],e[1]]}},Tt={name:"visible",initialValue:"none",prefix:!1,type:2,parse:function(A,e){switch(e){case"hidden":return 1;case"collapse":return 2;default:return 0}}};(we=Ne=Ne||{}).NORMAL="normal",we.BREAK_ALL="break-all";function Gt(A,e){return 0!=(A&e)}function Ot(A,e,t){return(A=A&&A[Math.min(e,A.length-1)])?t?A.open:A.close:""}var Vt={name:"word-break",initialValue:"normal",prefix:!(we.KEEP_ALL="keep-all"),type:2,parse:function(A,e){switch(e){case"break-all":return Ne.BREAK_ALL;case"keep-all":return Ne.KEEP_ALL;default:return Ne.NORMAL}}},kt={name:"z-index",initialValue:"auto",prefix:!1,type:0,parse:function(A,e){if(20===e.type)return{auto:!0,order:0};if(NA(e))return{auto:!1,order:e.number};throw new Error("Invalid z-index number parsed")}},Rt=function(A,e){if(15===e.type)switch(e.unit.toLowerCase()){case"s":return 1e3*e.number;case"ms":return e.number}throw new Error("Unsupported time type")},Nt={name:"opacity",initialValue:"1",type:0,prefix:!1,parse:function(A,e){return NA(e)?e.number:1}},Pt={name:"text-decoration-color",initialValue:"transparent",prefix:!1,type:3,format:"color"},Xt={name:"text-decoration-line",initialValue:"none",prefix:!1,type:1,parse:function(A,e){return e.filter(PA).map(function(A){switch(A.value){case"underline":return 1;case"overline":return 2;case"line-through":return 3;case"none":return 4}return 0}).filter(function(A){return 0!==A})}},Jt={name:"font-family",initialValue:"",prefix:!1,type:1,parse:function(A,e){var t=[],B=[];return e.forEach(function(A){switch(A.type){case 20:case 0:t.push(A.value);break;case 17:t.push(A.number.toString());break;case 4:B.push(t.join(" ")),t.length=0}}),t.length&&B.push(t.join(" ")),B.map(function(A){return-1===A.indexOf(" ")?A:"'"+A+"'"})}},Yt={name:"font-size",initialValue:"0",prefix:!1,type:3,format:"length"},Wt={name:"font-weight",initialValue:"normal",type:0,prefix:!1,parse:function(A,e){return NA(e)?e.number:!PA(e)||"bold"!==e.value?400:700}},Zt={name:"font-variant",initialValue:"none",type:1,prefix:!1,parse:function(A,e){return e.filter(PA).map(function(A){return A.value})}},_t={name:"font-style",initialValue:"normal",prefix:!1,type:2,parse:function(A,e){switch(e){case"oblique":return"oblique";case"italic":return"italic";default:return"normal"}}},qt={name:"content",initialValue:"none",type:1,prefix:!1,parse:function(A,e){if(0===e.length)return[];var t=e[0];return 20===t.type&&"none"===t.value?[]:e}},jt={name:"counter-increment",initialValue:"none",prefix:!0,type:1,parse:function(A,e){if(0===e.length)return null;var t=e[0];if(20===t.type&&"none"===t.value)return null;for(var B=[],r=e.filter(YA),n=0;n<r.length;n++){var s=r[n],o=r[n+1];20===s.type&&(o=o&&NA(o)?o.number:1,B.push({counter:s.value,increment:o}))}return B}},zt={name:"counter-reset",initialValue:"none",prefix:!0,type:1,parse:function(A,e){if(0===e.length)return[];for(var t=[],B=e.filter(YA),r=0;r<B.length;r++){var n=B[r],s=B[r+1];PA(n)&&"none"!==n.value&&(s=s&&NA(s)?s.number:0,t.push({counter:n.value,reset:s}))}return t}},$t={name:"duration",initialValue:"0s",prefix:!1,type:1,parse:function(e,A){return A.filter(RA).map(function(A){return Rt(e,A)})}},AB={name:"quotes",initialValue:"none",prefix:!0,type:1,parse:function(A,e){if(0===e.length)return null;var t=e[0];if(20===t.type&&"none"===t.value)return null;var B=[],r=e.filter(XA);if(r.length%2!=0)return null;for(var n=0;n<r.length;n+=2){var s=r[n].value,o=r[n+1].value;B.push({open:s,close:o})}return B}},eB={name:"box-shadow",initialValue:"none",type:1,prefix:!1,parse:function(n,A){return 1===A.length&&JA(A[0],"none")?[]:ZA(A).map(function(A){for(var e={color:255,offsetX:ne,offsetY:ne,blur:ne,spread:ne,inset:!1},t=0,B=0;B<A.length;B++){var r=A[B];JA(r,"inset")?e.inset=!0:_A(r)?(0===t?e.offsetX=r:1===t?e.offsetY=r:2===t?e.blur=r:e.spread=r,t++):e.color=ae(n,r)}return e})}},tB={name:"paint-order",initialValue:"normal",prefix:!1,type:1,parse:function(A,e){var t=[];return e.filter(PA).forEach(function(A){switch(A.value){case"stroke":t.push(1);break;case"fill":t.push(0);break;case"markers":t.push(2)}}),[0,1,2].forEach(function(A){-1===t.indexOf(A)&&t.push(A)}),t}},BB={name:"-webkit-text-stroke-color",initialValue:"currentcolor",prefix:!1,type:3,format:"color"},rB={name:"-webkit-text-stroke-width",initialValue:"0",type:0,prefix:!1,parse:function(A,e){return RA(e)?e.number:0}},nB=(sB.prototype.isVisible=function(){return 0<this.display&&0<this.opacity&&0===this.visibility},sB.prototype.isTransparent=function(){return ee(this.backgroundColor)},sB.prototype.isTransformed=function(){return null!==this.transform},sB.prototype.isPositioned=function(){return 0!==this.position},sB.prototype.isPositionedWithZIndex=function(){return this.isPositioned()&&!this.zIndex.auto},sB.prototype.isFloating=function(){return 0!==this.float},sB.prototype.isInlineLevel=function(){return Gt(this.display,4)||Gt(this.display,33554432)||Gt(this.display,268435456)||Gt(this.display,536870912)||Gt(this.display,67108864)||Gt(this.display,134217728)},sB);function sB(A,e){this.animationDuration=QB(A,$t,e.animationDuration),this.backgroundClip=QB(A,Ee,e.backgroundClip),this.backgroundColor=QB(A,Ie,e.backgroundColor),this.backgroundImage=QB(A,Se,e.backgroundImage),this.backgroundOrigin=QB(A,Te,e.backgroundOrigin),this.backgroundPosition=QB(A,Ge,e.backgroundPosition),this.backgroundRepeat=QB(A,Oe,e.backgroundRepeat),this.backgroundSize=QB(A,Pe,e.backgroundSize),this.borderTopColor=QB(A,Je,e.borderTopColor),this.borderRightColor=QB(A,Ye,e.borderRightColor),this.borderBottomColor=QB(A,We,e.borderBottomColor),this.borderLeftColor=QB(A,Ze,e.borderLeftColor),this.borderTopLeftRadius=QB(A,_e,e.borderTopLeftRadius),this.borderTopRightRadius=QB(A,qe,e.borderTopRightRadius),this.borderBottomRightRadius=QB(A,je,e.borderBottomRightRadius),this.borderBottomLeftRadius=QB(A,ze,e.borderBottomLeftRadius),this.borderTopStyle=QB(A,$e,e.borderTopStyle),this.borderRightStyle=QB(A,At,e.borderRightStyle),this.borderBottomStyle=QB(A,et,e.borderBottomStyle),this.borderLeftStyle=QB(A,tt,e.borderLeftStyle),this.borderTopWidth=QB(A,Bt,e.borderTopWidth),this.borderRightWidth=QB(A,rt,e.borderRightWidth),this.borderBottomWidth=QB(A,nt,e.borderBottomWidth),this.borderLeftWidth=QB(A,st,e.borderLeftWidth),this.boxShadow=QB(A,eB,e.boxShadow),this.color=QB(A,ot,e.color),this.direction=QB(A,it,e.direction),this.display=QB(A,Qt,e.display),this.float=QB(A,at,e.cssFloat),this.fontFamily=QB(A,Jt,e.fontFamily),this.fontSize=QB(A,Yt,e.fontSize),this.fontStyle=QB(A,_t,e.fontStyle),this.fontVariant=QB(A,Zt,e.fontVariant),this.fontWeight=QB(A,Wt,e.fontWeight),this.letterSpacing=QB(A,gt,e.letterSpacing),this.lineBreak=QB(A,wt,e.lineBreak),this.lineHeight=QB(A,Ut,e.lineHeight),this.listStyleImage=QB(A,lt,e.listStyleImage),this.listStylePosition=QB(A,Ct,e.listStylePosition),this.listStyleType=QB(A,ut,e.listStyleType),this.marginTop=QB(A,Ft,e.marginTop),this.marginRight=QB(A,ht,e.marginRight),this.marginBottom=QB(A,dt,e.marginBottom),this.marginLeft=QB(A,ft,e.marginLeft),this.opacity=QB(A,Nt,e.opacity);var t=QB(A,Ht,e.overflow);this.overflowX=t[0],this.overflowY=t[1<t.length?1:0],this.overflowWrap=QB(A,pt,e.overflowWrap),this.paddingTop=QB(A,Et,e.paddingTop),this.paddingRight=QB(A,It,e.paddingRight),this.paddingBottom=QB(A,yt,e.paddingBottom),this.paddingLeft=QB(A,Kt,e.paddingLeft),this.paintOrder=QB(A,tB,e.paintOrder),this.position=QB(A,Lt,e.position),this.textAlign=QB(A,mt,e.textAlign),this.textDecorationColor=QB(A,Pt,null!==(t=e.textDecorationColor)&&void 0!==t?t:e.color),this.textDecorationLine=QB(A,Xt,null!==(t=e.textDecorationLine)&&void 0!==t?t:e.textDecoration),this.textShadow=QB(A,bt,e.textShadow),this.textTransform=QB(A,Dt,e.textTransform),this.transform=QB(A,vt,e.transform),this.transformOrigin=QB(A,St,e.transformOrigin),this.visibility=QB(A,Tt,e.visibility),this.webkitTextStrokeColor=QB(A,BB,e.webkitTextStrokeColor),this.webkitTextStrokeWidth=QB(A,rB,e.webkitTextStrokeWidth),this.wordBreak=QB(A,Vt,e.wordBreak),this.zIndex=QB(A,kt,e.zIndex)}for(var oB=function(A,e){this.content=QB(A,qt,e.content),this.quotes=QB(A,AB,e.quotes)},iB=function(A,e){this.counterIncrement=QB(A,jt,e.counterIncrement),this.counterReset=QB(A,zt,e.counterReset)},QB=function(A,e,t){var B=new GA,t=null!=t?t.toString():e.initialValue;B.write(t);var r=new VA(B.read());switch(e.type){case 2:var n=r.parseComponentValue();return e.parse(A,PA(n)?n.value:e.initialValue);case 0:return e.parse(A,r.parseComponentValue());case 1:return e.parse(A,r.parseComponentValues());case 4:return r.parseComponentValue();case 3:switch(e.format){case"angle":return Qe(A,r.parseComponentValue());case"color":return ae(A,r.parseComponentValue());case"image":return ve(A,r.parseComponentValue());case"length":var s=r.parseComponentValue();return _A(s)?s:ne;case"length-percentage":s=r.parseComponentValue();return qA(s)?s:ne;case"time":return Rt(A,r.parseComponentValue())}}},cB=function(A,e){A=function(A){switch(A.getAttribute("data-html2canvas-debug")){case"all":return 1;case"clone":return 2;case"parse":return 3;case"render":return 4;default:return 0}}(A);return 1===A||e===A},aB=function(A,e){this.context=A,this.textNodes=[],this.elements=[],this.flags=0,cB(e,3),this.styles=new nB(A,window.getComputedStyle(e,null)),Vr(e)&&(this.styles.animationDuration.some(function(A){return 0<A})&&(e.style.animationDuration="0s"),null!==this.styles.transform&&(e.style.transform="none")),this.bounds=f(this.context,e),cB(e,4)&&(this.flags|=16)},gB="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",wB="undefined"==typeof Uint8Array?[]:new Uint8Array(256),UB=0;UB<gB.length;UB++)wB[gB.charCodeAt(UB)]=UB;function lB(A,e,t){return A.slice?A.slice(e,t):new Uint16Array(Array.prototype.slice.call(A,e,t))}var CB=(uB.prototype.get=function(A){var e;if(0<=A){if(A<55296||56319<A&&A<=65535)return e=this.index[A>>5],this.data[e=(e<<2)+(31&A)];if(A<=65535)return e=this.index[2048+(A-55296>>5)],this.data[e=(e<<2)+(31&A)];if(A<this.highStart)return e=this.index[e=2080+(A>>11)],e=this.index[e+=A>>5&63],this.data[e=(e<<2)+(31&A)];if(A<=1114111)return this.data[this.highValueIndex]}return this.errorValue},uB);function uB(A,e,t,B,r,n){this.initialValue=A,this.errorValue=e,this.highStart=t,this.highValueIndex=B,this.index=r,this.data=n}for(var FB="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",hB="undefined"==typeof Uint8Array?[]:new Uint8Array(256),dB=0;dB<FB.length;dB++)hB[FB.charCodeAt(dB)]=dB;function fB(A){return MB.get(A)}function HB(A){var t=function(A){for(var e=[],t=0,B=A.length;t<B;){var r,n=A.charCodeAt(t++);55296<=n&&n<=56319&&t<B?56320==(64512&(r=A.charCodeAt(t++)))?e.push(((1023&n)<<10)+(1023&r)+65536):(e.push(n),t--):e.push(n)}return e}(A),B=t.length,r=0,n=0,s=t.map(fB);return{next:function(){if(B<=r)return{done:!0,value:null};for(var A=SB;r<B&&(A=function(A,e){var t=e-2,B=A[t],r=A[e-1],e=A[e];if(2===r&&3===e)return SB;if(2===r||3===r||4===r)return"÷";if(2===e||3===e||4===e)return"÷";if(r===bB&&-1!==[bB,DB,vB,xB].indexOf(e))return SB;if(!(r!==vB&&r!==DB||e!==DB&&10!==e))return SB;if((r===xB||10===r)&&10===e)return SB;if(13===e||5===e)return SB;if(7===e)return SB;if(1===r)return SB;if(13===r&&14===e){for(;5===B;)B=A[--t];if(14===B)return SB}if(15===r&&15===e){for(var n=0;15===B;)n++,B=A[--t];if(n%2==0)return SB}return"÷"}(s,++r))===SB;);if(A===SB&&r!==B)return{done:!0,value:null};var e=function(){for(var A=[],e=0;e<arguments.length;e++)A[e]=arguments[e];if(String.fromCodePoint)return String.fromCodePoint.apply(String,A);var t=A.length;if(!t)return"";for(var B=[],r=-1,n="";++r<t;){var s=A[r];s<=65535?B.push(s):(s-=65536,B.push(55296+(s>>10),s%1024+56320)),(r+1===t||16384<B.length)&&(n+=String.fromCharCode.apply(String,B),B.length=0)}return n}.apply(null,t.slice(n,r));return n=r,{value:e,done:!1}}}}function pB(A){return 0===A[0]&&255===A[1]&&0===A[2]&&255===A[3]}var EB,IB,yB,KB,mB,LB,bB=8,DB=9,vB=11,xB=12,MB=(yB=function(A){var e,t,B,r,n=.75*A.length,s=A.length,o=0;"="===A[A.length-1]&&(n--,"="===A[A.length-2]&&n--);for(var n=new("undefined"!=typeof ArrayBuffer&&"undefined"!=typeof Uint8Array&&void 0!==Uint8Array.prototype.slice?ArrayBuffer:Array)(n),i=Array.isArray(n)?n:new Uint8Array(n),Q=0;Q<s;Q+=4)e=wB[A.charCodeAt(Q)],t=wB[A.charCodeAt(Q+1)],B=wB[A.charCodeAt(Q+2)],r=wB[A.charCodeAt(Q+3)],i[o++]=e<<2|t>>4,i[o++]=(15&t)<<4|B>>2,i[o++]=(3&B)<<6|63&r;return n}(EB=" "),KB=Array.isArray(yB)?function(A){for(var e=A.length,t=[],B=0;B<e;B+=4)t.push(A[B+3]<<24|A[B+2]<<16|A[B+1]<<8|A[B]);return t}(yB):new Uint32Array(yB),mB=Array.isArray(yB)?function(A){for(var e=A.length,t=[],B=0;B<e;B+=2)t.push(A[B+1]<<8|A[B]);return t}(yB):new Uint16Array(yB),EB=lB(mB,12,KB[4]/2),IB=2===KB[5]?lB(mB,(24+KB[4])/2):(yB=KB,mB=Math.ceil((24+KB[4])/4),yB.slice?yB.slice(mB,IB):new Uint32Array(Array.prototype.slice.call(yB,mB,IB))),new CB(KB[0],KB[1],KB[2],KB[3],EB,IB)),SB="×",TB=function(A,e,t,B,r){var n="http://www.w3.org/2000/svg",s=document.createElementNS(n,"svg"),n=document.createElementNS(n,"foreignObject");return s.setAttributeNS(null,"width",A.toString()),s.setAttributeNS(null,"height",e.toString()),n.setAttributeNS(null,"width","100%"),n.setAttributeNS(null,"height","100%"),n.setAttributeNS(null,"x",t.toString()),n.setAttributeNS(null,"y",B.toString()),n.setAttributeNS(null,"externalResourcesRequired","true"),s.appendChild(n),n.appendChild(r),s},GB=function(B){return new Promise(function(A,e){var t=new Image;t.onload=function(){return A(t)},t.onerror=e,t.src="data:image/svg+xml;charset=utf-8,"+encodeURIComponent((new XMLSerializer).serializeToString(B))})},OB={get SUPPORT_RANGE_BOUNDS(){var A=function(A){if(A.createRange){var e=A.createRange();if(e.getBoundingClientRect){var t=A.createElement("boundtest");t.style.height="123px",t.style.display="block",A.body.appendChild(t),e.selectNode(t);e=e.getBoundingClientRect(),e=Math.round(e.height);if(A.body.removeChild(t),123===e)return!0}}return!1}(document);return Object.defineProperty(OB,"SUPPORT_RANGE_BOUNDS",{value:A}),A},get SUPPORT_WORD_BREAKING(){var A=OB.SUPPORT_RANGE_BOUNDS&&function(A){var e=A.createElement("boundtest");e.style.width="50px",e.style.display="block",e.style.fontSize="12px",e.style.letterSpacing="0px",e.style.wordSpacing="0px",A.body.appendChild(e);var B=A.createRange();e.innerHTML="function"==typeof"".repeat?"&#128104;".repeat(10):"";var r=e.firstChild,t=Q(r.data).map(function(A){return g(A)}),n=0,s={},t=t.every(function(A,e){B.setStart(r,n),B.setEnd(r,n+A.length);var t=B.getBoundingClientRect();n+=A.length;A=t.x>s.x||t.y>s.y;return s=t,0===e||A});return A.body.removeChild(e),t}(document);return Object.defineProperty(OB,"SUPPORT_WORD_BREAKING",{value:A}),A},get SUPPORT_SVG_DRAWING(){var A=function(A){var e=new Image,t=A.createElement("canvas"),A=t.getContext("2d");if(!A)return!1;e.src="data:image/svg+xml,<svg xmlns='http://www.w3.org/2000/svg'></svg>";try{A.drawImage(e,0,0),t.toDataURL()}catch(A){return!1}return!0}(document);return Object.defineProperty(OB,"SUPPORT_SVG_DRAWING",{value:A}),A},get SUPPORT_FOREIGNOBJECT_DRAWING(){var A="function"==typeof Array.from&&"function"==typeof window.fetch?function(t){var A=t.createElement("canvas"),B=100;A.width=B,A.height=B;var r=A.getContext("2d");if(!r)return Promise.reject(!1);r.fillStyle="rgb(0, 255, 0)",r.fillRect(0,0,B,B);var e=new Image,n=A.toDataURL();e.src=n;e=TB(B,B,0,0,e);return r.fillStyle="red",r.fillRect(0,0,B,B),GB(e).then(function(A){r.drawImage(A,0,0);var e=r.getImageData(0,0,B,B).data;r.fillStyle="red",r.fillRect(0,0,B,B);A=t.createElement("div");return A.style.backgroundImage="url("+n+")",A.style.height="100px",pB(e)?GB(TB(B,B,0,0,A)):Promise.reject(!1)}).then(function(A){return r.drawImage(A,0,0),pB(r.getImageData(0,0,B,B).data)}).catch(function(){return!1})}(document):Promise.resolve(!1);return Object.defineProperty(OB,"SUPPORT_FOREIGNOBJECT_DRAWING",{value:A}),A},get SUPPORT_CORS_IMAGES(){var A=void 0!==(new Image).crossOrigin;return Object.defineProperty(OB,"SUPPORT_CORS_IMAGES",{value:A}),A},get SUPPORT_RESPONSE_TYPE(){var A="string"==typeof(new XMLHttpRequest).responseType;return Object.defineProperty(OB,"SUPPORT_RESPONSE_TYPE",{value:A}),A},get SUPPORT_CORS_XHR(){var A="withCredentials"in new XMLHttpRequest;return Object.defineProperty(OB,"SUPPORT_CORS_XHR",{value:A}),A},get SUPPORT_NATIVE_TEXT_SEGMENTATION(){var A=!("undefined"==typeof Intl||!Intl.Segmenter);return Object.defineProperty(OB,"SUPPORT_NATIVE_TEXT_SEGMENTATION",{value:A}),A}},VB=function(A,e){this.text=A,this.bounds=e},kB=function(A,e){var t=e.ownerDocument;if(t){var B=t.createElement("html2canvaswrapper");B.appendChild(e.cloneNode(!0));t=e.parentNode;if(t){t.replaceChild(B,e);A=f(A,B);return B.firstChild&&t.replaceChild(B.firstChild,B),A}}return d.EMPTY},RB=function(A,e,t){var B=A.ownerDocument;if(!B)throw new Error("Node has no owner document");B=B.createRange();return B.setStart(A,e),B.setEnd(A,e+t),B},NB=function(A){if(OB.SUPPORT_NATIVE_TEXT_SEGMENTATION){var e=new Intl.Segmenter(void 0,{granularity:"grapheme"});return Array.from(e.segment(A)).map(function(A){return A.segment})}return function(A){for(var e,t=HB(A),B=[];!(e=t.next()).done;)e.value&&B.push(e.value.slice());return B}(A)},PB=function(A,e){return 0!==e.letterSpacing?NB(A):function(A,e){if(OB.SUPPORT_NATIVE_TEXT_SEGMENTATION){var t=new Intl.Segmenter(void 0,{granularity:"word"});return Array.from(t.segment(A)).map(function(A){return A.segment})}return JB(A,e)}(A,e)},XB=[32,160,4961,65792,65793,4153,4241],JB=function(A,e){for(var t,B=oA(A,{lineBreak:e.lineBreak,wordBreak:"break-word"===e.overflowWrap?"break-word":e.wordBreak}),r=[];!(t=B.next()).done;)!function(){var A,e;t.value&&(A=t.value.slice(),A=Q(A),e="",A.forEach(function(A){-1===XB.indexOf(A)?e+=g(A):(e.length&&r.push(e),r.push(g(A)),e="")}),e.length&&r.push(e))}();return r},YB=function(A,e,t){var r,n,s,o,i;this.text=WB(e.data,t.textTransform),this.textBounds=(r=A,A=this.text,s=e,A=PB(A,n=t),o=[],i=0,A.forEach(function(A){var e,t,B;n.textDecorationLine.length||0<A.trim().length?OB.SUPPORT_RANGE_BOUNDS?1<(B=RB(s,i,A.length).getClientRects()).length?(e=NB(A),t=0,e.forEach(function(A){o.push(new VB(A,d.fromDOMRectList(r,RB(s,t+i,A.length).getClientRects()))),t+=A.length})):o.push(new VB(A,d.fromDOMRectList(r,B))):(B=s.splitText(A.length),o.push(new VB(A,kB(r,s))),s=B):OB.SUPPORT_RANGE_BOUNDS||(s=s.splitText(A.length)),i+=A.length}),o)},WB=function(A,e){switch(e){case 1:return A.toLowerCase();case 3:return A.replace(ZB,_B);case 2:return A.toUpperCase();default:return A}},ZB=/(^|\s|:|-|\(|\))([a-z])/g,_B=function(A,e,t){return 0<A.length?e+t.toUpperCase():A},qB=(A(jB,LB=aB),jB);function jB(A,e){A=LB.call(this,A,e)||this;return A.src=e.currentSrc||e.src,A.intrinsicWidth=e.naturalWidth,A.intrinsicHeight=e.naturalHeight,A.context.cache.addImage(A.src),A}var zB,$B=(A(Ar,zB=aB),Ar);function Ar(A,e){A=zB.call(this,A,e)||this;return A.canvas=e,A.intrinsicWidth=e.width,A.intrinsicHeight=e.height,A}var er,tr=(A(Br,er=aB),Br);function Br(A,e){var t=er.call(this,A,e)||this,B=new XMLSerializer,A=f(A,e);return e.setAttribute("width",A.width+"px"),e.setAttribute("height",A.height+"px"),t.svg="data:image/svg+xml,"+encodeURIComponent(B.serializeToString(e)),t.intrinsicWidth=e.width.baseVal.value,t.intrinsicHeight=e.height.baseVal.value,t.context.cache.addImage(t.svg),t}var rr,nr=(A(sr,rr=aB),sr);function sr(A,e){A=rr.call(this,A,e)||this;return A.value=e.value,A}var or,ir=(A(Qr,or=aB),Qr);function Qr(A,e){A=or.call(this,A,e)||this;return A.start=e.start,A.reversed="boolean"==typeof e.reversed&&!0===e.reversed,A}var cr,ar=[{type:15,flags:0,unit:"px",number:3}],gr=[{type:16,flags:0,number:50}],wr="checkbox",Ur="radio",lr="password",Cr=707406591,ur=(A(Fr,cr=aB),Fr);function Fr(A,e){var t=cr.call(this,A,e)||this;switch(t.type=e.type.toLowerCase(),t.checked=e.checked,t.value=0===(e=(A=e).type===lr?new Array(A.value.length+1).join("•"):A.value).length?A.placeholder||"":e,t.type!==wr&&t.type!==Ur||(t.styles.backgroundColor=3739148031,t.styles.borderTopColor=t.styles.borderRightColor=t.styles.borderBottomColor=t.styles.borderLeftColor=2779096575,t.styles.borderTopWidth=t.styles.borderRightWidth=t.styles.borderBottomWidth=t.styles.borderLeftWidth=1,t.styles.borderTopStyle=t.styles.borderRightStyle=t.styles.borderBottomStyle=t.styles.borderLeftStyle=1,t.styles.backgroundClip=[0],t.styles.backgroundOrigin=[0],t.bounds=(e=t.bounds).width>e.height?new d(e.left+(e.width-e.height)/2,e.top,e.height,e.height):e.width<e.height?new d(e.left,e.top+(e.height-e.width)/2,e.width,e.width):e),t.type){case wr:t.styles.borderTopRightRadius=t.styles.borderTopLeftRadius=t.styles.borderBottomRightRadius=t.styles.borderBottomLeftRadius=ar;break;case Ur:t.styles.borderTopRightRadius=t.styles.borderTopLeftRadius=t.styles.borderBottomRightRadius=t.styles.borderBottomLeftRadius=gr}return t}var hr,dr=(A(fr,hr=aB),fr);function fr(A,e){A=hr.call(this,A,e)||this,e=e.options[e.selectedIndex||0];return A.value=e&&e.text||"",A}var Hr,pr=(A(Er,Hr=aB),Er);function Er(A,e){A=Hr.call(this,A,e)||this;return A.value=e.value,A}var Ir,yr=(A(Kr,Ir=aB),Kr);function Kr(A,e){var t,B,r=Ir.call(this,A,e)||this;r.src=e.src,r.width=parseInt(e.width,10)||0,r.height=parseInt(e.height,10)||0,r.backgroundColor=r.styles.backgroundColor;try{e.contentWindow&&e.contentWindow.document&&e.contentWindow.document.documentElement&&(r.tree=Mr(A,e.contentWindow.document.documentElement),t=e.contentWindow.document.documentElement?le(A,getComputedStyle(e.contentWindow.document.documentElement).backgroundColor):pe.TRANSPARENT,B=e.contentWindow.document.body?le(A,getComputedStyle(e.contentWindow.document.body).backgroundColor):pe.TRANSPARENT,r.backgroundColor=ee(t)?ee(B)?r.styles.backgroundColor:B:t)}catch(A){}return r}function mr(A){return"VIDEO"===A.tagName}function Lr(A){return"STYLE"===A.tagName}function br(A){return 0<A.tagName.indexOf("-")}var Dr=["OL","UL","MENU"],vr=function(e,A,t,B){for(var r=A.firstChild;r;r=s){var n,s=r.nextSibling;Gr(r)&&0<r.data.trim().length?t.textNodes.push(new YB(e,r,t.styles)):Or(r)&&(jr(r)&&r.assignedNodes?r.assignedNodes().forEach(function(A){return vr(e,A,t,B)}):(n=xr(e,r)).styles.isVisible()&&(Sr(r,n,B)?n.flags|=4:Tr(n.styles)&&(n.flags|=2),-1!==Dr.indexOf(r.tagName)&&(n.flags|=8),t.elements.push(n),r.slot,r.shadowRoot?vr(e,r.shadowRoot,n,B):_r(r)||Xr(r)||qr(r)||vr(e,r,n,B)))}},xr=function(A,e){return new(Wr(e)?qB:Yr(e)?$B:Xr(e)?tr:Rr(e)?nr:Nr(e)?ir:Pr(e)?ur:qr(e)?dr:_r(e)?pr:Zr(e)?yr:aB)(A,e)},Mr=function(A,e){var t=xr(A,e);return t.flags|=4,vr(A,e,t,t),t},Sr=function(A,e,t){return e.styles.isPositionedWithZIndex()||e.styles.opacity<1||e.styles.isTransformed()||Jr(A)&&t.styles.isTransparent()},Tr=function(A){return A.isPositioned()||A.isFloating()},Gr=function(A){return A.nodeType===Node.TEXT_NODE},Or=function(A){return A.nodeType===Node.ELEMENT_NODE},Vr=function(A){return Or(A)&&void 0!==A.style&&!kr(A)},kr=function(A){return"object"==typeof A.className},Rr=function(A){return"LI"===A.tagName},Nr=function(A){return"OL"===A.tagName},Pr=function(A){return"INPUT"===A.tagName},Xr=function(A){return"svg"===A.tagName},Jr=function(A){return"BODY"===A.tagName},Yr=function(A){return"CANVAS"===A.tagName},Wr=function(A){return"IMG"===A.tagName},Zr=function(A){return"IFRAME"===A.tagName},_r=function(A){return"TEXTAREA"===A.tagName},qr=function(A){return"SELECT"===A.tagName},jr=function(A){return"SLOT"===A.tagName},zr=($r.prototype.getCounterValue=function(A){A=this.counters[A];return A&&A.length?A[A.length-1]:1},$r.prototype.getCounterValues=function(A){A=this.counters[A];return A||[]},$r.prototype.pop=function(A){var e=this;A.forEach(function(A){return e.counters[A].pop()})},$r.prototype.parse=function(A){var t=this,e=A.counterIncrement,A=A.counterReset,B=!0;null!==e&&e.forEach(function(A){var e=t.counters[A.counter];e&&0!==A.increment&&(B=!1,e.length||e.push(1),e[Math.max(0,e.length-1)]+=A.increment)});var r=[];return B&&A.forEach(function(A){var e=t.counters[A.counter];r.push(A.counter),(e=e||(t.counters[A.counter]=[])).push(A.reset)}),r},$r);function $r(){this.counters={}}function An(B,A,e,r,t,n){return B<A||e<B?gn(B,t,0<n.length):r.integers.reduce(function(A,e,t){for(;e<=B;)B-=e,A+=r.values[t];return A},"")+n}function en(A,e,t,B){for(var r="";t||A--,r=B(A)+r,e<=(A/=e)*e;);return r}function tn(A,e,t,B,r){var n=t-e+1;return(A<0?"-":"")+(en(Math.abs(A),n,B,function(A){return g(Math.floor(A%n)+e)})+r)}function Bn(A,e,t){void 0===t&&(t=". ");var B=e.length;return en(Math.abs(A),B,!1,function(A){return e[Math.floor(A%B)]})+t}function rn(A,e,t,B,r,n){if(A<-9999||9999<A)return gn(A,4,0<r.length);var s=Math.abs(A),o=r;if(0===s)return e[0]+o;for(var i=0;0<s&&i<=4;i++){var Q=s%10;0==Q&&Gt(n,1)&&""!==o?o=e[Q]+o:1<Q||1==Q&&0===i||1==Q&&1===i&&Gt(n,2)||1==Q&&1===i&&Gt(n,4)&&100<A||1==Q&&1<i&&Gt(n,8)?o=e[Q]+(0<i?t[i-1]:"")+o:1==Q&&0<i&&(o=t[i-1]+o),s=Math.floor(s/10)}return(A<0?B:"")+o}var nn,sn={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"]},on={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:["Ք","Փ","Ւ","Ց","Ր","Տ","Վ","Ս","Ռ","Ջ","Պ","Չ","Ո","Շ","Ն","Յ","Մ","Ճ","Ղ","Ձ","Հ","Կ","Ծ","Խ","Լ","Ի","Ժ","Թ","Ը","Է","Զ","Ե","Դ","Գ","Բ","Ա"]},Qn={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:["י׳","ט׳","ח׳","ז׳","ו׳","ה׳","ד׳","ג׳","ב׳","א׳","ת","ש","ר","ק","צ","פ","ע","ס","נ","מ","ל","כ","יט","יח","יז","טז","טו","י","ט","ח","ז","ו","ה","ד","ג","ב","א"]},cn={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:["ჵ","ჰ","ჯ","ჴ","ხ","ჭ","წ","ძ","ც","ჩ","შ","ყ","ღ","ქ","ფ","ჳ","ტ","ს","რ","ჟ","პ","ო","ჲ","ნ","მ","ლ","კ","ი","თ","ჱ","ზ","ვ","ე","დ","გ","ბ","ა"]},an="마이너스",gn=function(A,e,t){var B=t?". ":"",r=t?"、":"",n=t?", ":"",s=t?" ":"";switch(e){case 0:return"•"+s;case 1:return"◦"+s;case 2:return"◾"+s;case 5:var o=tn(A,48,57,!0,B);return o.length<4?"0"+o:o;case 4:return Bn(A,"〇一二三四五六七八九",r);case 6:return An(A,1,3999,sn,3,B).toLowerCase();case 7:return An(A,1,3999,sn,3,B);case 8:return tn(A,945,969,!1,B);case 9:return tn(A,97,122,!1,B);case 10:return tn(A,65,90,!1,B);case 11:return tn(A,1632,1641,!0,B);case 12:case 49:return An(A,1,9999,on,3,B);case 35:return An(A,1,9999,on,3,B).toLowerCase();case 13:return tn(A,2534,2543,!0,B);case 14:case 30:return tn(A,6112,6121,!0,B);case 15:return Bn(A,"子丑寅卯辰巳午未申酉戌亥",r);case 16:return Bn(A,"甲乙丙丁戊己庚辛壬癸",r);case 17:case 48:return rn(A,"零一二三四五六七八九","十百千萬","負",r,14);case 47:return rn(A,"零壹貳參肆伍陸柒捌玖","拾佰仟萬","負",r,15);case 42:return rn(A,"零一二三四五六七八九","十百千萬","负",r,14);case 41:return rn(A,"零壹贰叁肆伍陆柒捌玖","拾佰仟萬","负",r,15);case 26:return rn(A,"〇一二三四五六七八九","十百千万","マイナス",r,0);case 25:return rn(A,"零壱弐参四伍六七八九","拾百千万","マイナス",r,7);case 31:return rn(A,"영일이삼사오육칠팔구","십백천만",an,n,7);case 33:return rn(A,"零一二三四五六七八九","十百千萬",an,n,0);case 32:return rn(A,"零壹貳參四五六七八九","拾百千",an,n,7);case 18:return tn(A,2406,2415,!0,B);case 20:return An(A,1,19999,cn,3,B);case 21:return tn(A,2790,2799,!0,B);case 22:return tn(A,2662,2671,!0,B);case 22:return An(A,1,10999,Qn,3,B);case 23:return Bn(A,"あいうえおかきくけこさしすせそたちつてとなにぬねのはひふへほまみむめもやゆよらりるれろわゐゑをん");case 24:return Bn(A,"いろはにほへとちりぬるをわかよたれそつねならむうゐのおくやまけふこえてあさきゆめみしゑひもせす");case 27:return tn(A,3302,3311,!0,B);case 28:return Bn(A,"アイウエオカキクケコサシスセソタチツテトナニヌネノハヒフヘホマミムメモヤユヨラリルレロワヰヱヲン",r);case 29:return Bn(A,"イロハニホヘトチリヌルヲワカヨタレソツネナラムウヰノオクヤマケフコエテアサキユメミシヱヒモセス",r);case 34:return tn(A,3792,3801,!0,B);case 37:return tn(A,6160,6169,!0,B);case 38:return tn(A,4160,4169,!0,B);case 39:return tn(A,2918,2927,!0,B);case 40:return tn(A,1776,1785,!0,B);case 43:return tn(A,3046,3055,!0,B);case 44:return tn(A,3174,3183,!0,B);case 45:return tn(A,3664,3673,!0,B);case 46:return tn(A,3872,3881,!0,B);default:return tn(A,48,57,!0,B)}},wn="data-html2canvas-ignore",Un=(ln.prototype.toIFrame=function(A,B){var e=this,r=un(A,B);if(!r.contentWindow)return Promise.reject("Unable to find iframe window");var t=A.defaultView.pageXOffset,n=A.defaultView.pageYOffset,s=r.contentWindow,o=s.document,A=hn(r).then(function(){return a(e,void 0,void 0,function(){var e,t;return H(this,function(A){switch(A.label){case 0:return this.scrolledElements.forEach(En),s&&(s.scrollTo(B.left,B.top),!/(iPad|iPhone|iPod)/g.test(navigator.userAgent)||s.scrollY===B.top&&s.scrollX===B.left||(this.context.logger.warn("Unable to restore scroll position for cloned document"),this.context.windowBounds=this.context.windowBounds.add(s.scrollX-B.left,s.scrollY-B.top,0,0))),e=this.options.onclone,void 0===(t=this.clonedReferenceElement)?[2,Promise.reject("Error finding the "+this.referenceElement.nodeName+" in the cloned document")]:o.fonts&&o.fonts.ready?[4,o.fonts.ready]:[3,2];case 1:A.sent(),A.label=2;case 2:return/(AppleWebKit)/g.test(navigator.userAgent)?[4,Fn(o)]:[3,4];case 3:A.sent(),A.label=4;case 4:return"function"==typeof e?[2,Promise.resolve().then(function(){return e(o,t)}).then(function(){return r})]:[2,r]}})})});return o.open(),o.write(Hn(document.doctype)+"<html></html>"),pn(this.referenceElement.ownerDocument,t,n),o.replaceChild(o.adoptNode(this.documentElement),o.documentElement),o.close(),A},ln.prototype.createElementClone=function(A){if(cB(A,2),Yr(A))return this.createCanvasClone(A);if(mr(A))return this.createVideoClone(A);if(Lr(A))return this.createStyleClone(A);var e=A.cloneNode(!1);return Wr(e)&&(Wr(A)&&A.currentSrc&&A.currentSrc!==A.src&&(e.src=A.currentSrc,e.srcset=""),"lazy"===e.loading&&(e.loading="eager")),br(e)?this.createCustomElementClone(e):e},ln.prototype.createCustomElementClone=function(A){var e=document.createElement("html2canvascustomelement");return fn(A.style,e),e},ln.prototype.createStyleClone=function(A){try{var e=A.sheet;if(e&&e.cssRules){var t=[].slice.call(e.cssRules,0).reduce(function(A,e){return e&&"string"==typeof e.cssText?A+e.cssText:A},""),B=A.cloneNode(!1);return B.textContent=t,B}}catch(A){if(this.context.logger.error("Unable to access cssRules property",A),"SecurityError"!==A.name)throw A}return A.cloneNode(!1)},ln.prototype.createCanvasClone=function(e){var A;if(this.options.inlineImages&&e.ownerDocument){var t=e.ownerDocument.createElement("img");try{return t.src=e.toDataURL(),t}catch(A){this.context.logger.info("Unable to inline canvas contents, canvas is tainted",e)}}t=e.cloneNode(!1);try{t.width=e.width,t.height=e.height;var B,r,n=e.getContext("2d"),s=t.getContext("2d");return s&&(!this.options.allowTaint&&n?s.putImageData(n.getImageData(0,0,e.width,e.height),0,0):(!(B=null!==(A=e.getContext("webgl2"))&&void 0!==A?A:e.getContext("webgl"))||!1===(null==(r=B.getContextAttributes())?void 0:r.preserveDrawingBuffer)&&this.context.logger.warn("Unable to clone WebGL context as it has preserveDrawingBuffer=false",e),s.drawImage(e,0,0))),t}catch(A){this.context.logger.info("Unable to clone canvas as it is tainted",e)}return t},ln.prototype.createVideoClone=function(e){var A=e.ownerDocument.createElement("canvas");A.width=e.offsetWidth,A.height=e.offsetHeight;var t=A.getContext("2d");try{return t&&(t.drawImage(e,0,0,A.width,A.height),this.options.allowTaint||t.getImageData(0,0,A.width,A.height)),A}catch(A){this.context.logger.info("Unable to clone video as it is tainted",e)}A=e.ownerDocument.createElement("canvas");return A.width=e.offsetWidth,A.height=e.offsetHeight,A},ln.prototype.appendChildNode=function(A,e,t){Or(e)&&("SCRIPT"===e.tagName||e.hasAttribute(wn)||"function"==typeof this.options.ignoreElements&&this.options.ignoreElements(e))||this.options.copyStyles&&Or(e)&&Lr(e)||A.appendChild(this.cloneNode(e,t))},ln.prototype.cloneChildNodes=function(A,e,t){for(var B,r=this,n=(A.shadowRoot||A).firstChild;n;n=n.nextSibling)Or(n)&&jr(n)&&"function"==typeof n.assignedNodes?(B=n.assignedNodes()).length&&B.forEach(function(A){return r.appendChildNode(e,A,t)}):this.appendChildNode(e,n,t)},ln.prototype.cloneNode=function(A,e){if(Gr(A))return document.createTextNode(A.data);if(!A.ownerDocument)return A.cloneNode(!1);var t=A.ownerDocument.defaultView;if(t&&Or(A)&&(Vr(A)||kr(A))){var B=this.createElementClone(A);B.style.transitionProperty="none";var r=t.getComputedStyle(A),n=t.getComputedStyle(A,":before"),s=t.getComputedStyle(A,":after");this.referenceElement===A&&Vr(B)&&(this.clonedReferenceElement=B),Jr(B)&&mn(B);t=this.counters.parse(new iB(this.context,r)),n=this.resolvePseudoContent(A,B,n,nn.BEFORE);br(A)&&(e=!0),mr(A)||this.cloneChildNodes(A,B,e),n&&B.insertBefore(n,B.firstChild);s=this.resolvePseudoContent(A,B,s,nn.AFTER);return s&&B.appendChild(s),this.counters.pop(t),(r&&(this.options.copyStyles||kr(A))&&!Zr(A)||e)&&fn(r,B),0===A.scrollTop&&0===A.scrollLeft||this.scrolledElements.push([B,A.scrollLeft,A.scrollTop]),(_r(A)||qr(A))&&(_r(B)||qr(B))&&(B.value=A.value),B}return A.cloneNode(!1)},ln.prototype.resolvePseudoContent=function(o,A,e,t){var i=this;if(e){var B=e.content,Q=A.ownerDocument;if(Q&&B&&"none"!==B&&"-moz-alt-content"!==B&&"none"!==e.display){this.counters.parse(new iB(this.context,e));var c=new oB(this.context,e),a=Q.createElement("html2canvaspseudoelement");fn(e,a),c.content.forEach(function(A){if(0===A.type)a.appendChild(Q.createTextNode(A.value));else if(22===A.type){var e=Q.createElement("img");e.src=A.value,e.style.opacity="1",a.appendChild(e)}else if(18===A.type){var t,B,r,n,s;"attr"===A.name?(e=A.values.filter(PA)).length&&a.appendChild(Q.createTextNode(o.getAttribute(e[0].value)||"")):"counter"===A.name?(r=(B=A.values.filter(WA))[0],B=B[1],r&&PA(r)&&(t=i.counters.getCounterValue(r.value),s=B&&PA(B)?ut.parse(i.context,B.value):3,a.appendChild(Q.createTextNode(gn(t,s,!1))))):"counters"===A.name&&(r=(t=A.values.filter(WA))[0],s=t[1],B=t[2],r&&PA(r)&&(r=i.counters.getCounterValues(r.value),n=B&&PA(B)?ut.parse(i.context,B.value):3,s=s&&0===s.type?s.value:"",s=r.map(function(A){return gn(A,n,!1)}).join(s),a.appendChild(Q.createTextNode(s))))}else if(20===A.type)switch(A.value){case"open-quote":a.appendChild(Q.createTextNode(Ot(c.quotes,i.quoteDepth++,!0)));break;case"close-quote":a.appendChild(Q.createTextNode(Ot(c.quotes,--i.quoteDepth,!1)));break;default:a.appendChild(Q.createTextNode(A.value))}}),a.className=In+" "+yn;t=t===nn.BEFORE?" "+In:" "+yn;return kr(A)?A.className.baseValue+=t:A.className+=t,a}}},ln.destroy=function(A){return!!A.parentNode&&(A.parentNode.removeChild(A),!0)},ln);function ln(A,e,t){if(this.context=A,this.options=t,this.scrolledElements=[],this.referenceElement=e,this.counters=new zr,this.quoteDepth=0,!e.ownerDocument)throw new Error("Cloned element does not have an owner document");this.documentElement=this.cloneNode(e.ownerDocument.documentElement,!1)}(we=nn=nn||{})[we.BEFORE=0]="BEFORE",we[we.AFTER=1]="AFTER";function Cn(e){return new Promise(function(A){!e.complete&&e.src?(e.onload=A,e.onerror=A):A()})}var un=function(A,e){var t=A.createElement("iframe");return t.className="html2canvas-container",t.style.visibility="hidden",t.style.position="fixed",t.style.left="-10000px",t.style.top="0px",t.style.border="0",t.width=e.width.toString(),t.height=e.height.toString(),t.scrolling="no",t.setAttribute(wn,"true"),A.body.appendChild(t),t},Fn=function(A){return Promise.all([].slice.call(A.images,0).map(Cn))},hn=function(r){return new Promise(function(e,A){var t=r.contentWindow;if(!t)return A("No window assigned for iframe");var B=t.document;t.onload=r.onload=function(){t.onload=r.onload=null;var A=setInterval(function(){0<B.body.childNodes.length&&"complete"===B.readyState&&(clearInterval(A),e(r))},50)}})},dn=["all","d","content"],fn=function(A,e){for(var t=A.length-1;0<=t;t--){var B=A.item(t);-1===dn.indexOf(B)&&e.style.setProperty(B,A.getPropertyValue(B))}return e},Hn=function(A){var e="";return A&&(e+="<!DOCTYPE ",A.name&&(e+=A.name),A.internalSubset&&(e+=A.internalSubset),A.publicId&&(e+='"'+A.publicId+'"'),A.systemId&&(e+='"'+A.systemId+'"'),e+=">"),e},pn=function(A,e,t){A&&A.defaultView&&(e!==A.defaultView.pageXOffset||t!==A.defaultView.pageYOffset)&&A.defaultView.scrollTo(e,t)},En=function(A){var e=A[0],t=A[1],A=A[2];e.scrollLeft=t,e.scrollTop=A},In="___html2canvas___pseudoelement_before",yn="___html2canvas___pseudoelement_after",Kn='{\n    content: "" !important;\n    display: none !important;\n}',mn=function(A){Ln(A,"."+In+":before"+Kn+"\n         ."+yn+":after"+Kn)},Ln=function(A,e){var t=A.ownerDocument;t&&((t=t.createElement("style")).textContent=e,A.appendChild(t))},bn=(Dn.getOrigin=function(A){var e=Dn._link;return e?(e.href=A,e.href=e.href,e.protocol+e.hostname+e.port):"about:blank"},Dn.isSameOrigin=function(A){return Dn.getOrigin(A)===Dn._origin},Dn.setContext=function(A){Dn._link=A.document.createElement("a"),Dn._origin=Dn.getOrigin(A.location.href)},Dn._origin="about:blank",Dn);function Dn(){}var vn=(xn.prototype.addImage=function(A){var e=Promise.resolve();return this.has(A)||(kn(A)||Gn(A))&&(this._cache[A]=this.loadImage(A)).catch(function(){}),e},xn.prototype.match=function(A){return this._cache[A]},xn.prototype.loadImage=function(s){return a(this,void 0,void 0,function(){var e,B,t,r,n=this;return H(this,function(A){switch(A.label){case 0:return(e=bn.isSameOrigin(s),B=!On(s)&&!0===this._options.useCORS&&OB.SUPPORT_CORS_IMAGES&&!e,t=!On(s)&&!e&&!kn(s)&&"string"==typeof this._options.proxy&&OB.SUPPORT_CORS_XHR&&!B,e||!1!==this._options.allowTaint||On(s)||kn(s)||t||B)?(r=s,t?[4,this.proxy(r)]:[3,2]):[2];case 1:r=A.sent(),A.label=2;case 2:return this.context.logger.debug("Added image "+s.substring(0,256)),[4,new Promise(function(A,e){var t=new Image;t.onload=function(){return A(t)},t.onerror=e,(Vn(r)||B)&&(t.crossOrigin="anonymous"),t.src=r,!0===t.complete&&setTimeout(function(){return A(t)},500),0<n._options.imageTimeout&&setTimeout(function(){return e("Timed out ("+n._options.imageTimeout+"ms) loading image")},n._options.imageTimeout)})];case 3:return[2,A.sent()]}})})},xn.prototype.has=function(A){return void 0!==this._cache[A]},xn.prototype.keys=function(){return Promise.resolve(Object.keys(this._cache))},xn.prototype.proxy=function(s){var o=this,i=this._options.proxy;if(!i)throw new Error("No proxy defined");var Q=s.substring(0,256);return new Promise(function(e,t){var B=OB.SUPPORT_RESPONSE_TYPE?"blob":"text",r=new XMLHttpRequest;r.onload=function(){var A;200===r.status?"text"==B?e(r.response):((A=new FileReader).addEventListener("load",function(){return e(A.result)},!1),A.addEventListener("error",function(A){return t(A)},!1),A.readAsDataURL(r.response)):t("Failed to proxy resource "+Q+" with status code "+r.status)},r.onerror=t;var A,n=-1<i.indexOf("?")?"&":"?";r.open("GET",i+n+"url="+encodeURIComponent(s)+"&responseType="+B),"text"!=B&&r instanceof XMLHttpRequest&&(r.responseType=B),o._options.imageTimeout&&(A=o._options.imageTimeout,r.timeout=A,r.ontimeout=function(){return t("Timed out ("+A+"ms) proxying "+Q)}),r.send()})},xn);function xn(A,e){this.context=A,this._options=e,this._cache={}}var Mn=/^data:image\/svg\+xml/i,Sn=/^data:image\/.*;base64,/i,Tn=/^data:image\/.*/i,Gn=function(A){return OB.SUPPORT_SVG_DRAWING||!Rn(A)},On=function(A){return Tn.test(A)},Vn=function(A){return Sn.test(A)},kn=function(A){return"blob"===A.substr(0,4)},Rn=function(A){return"svg"===A.substr(-3).toLowerCase()||Mn.test(A)},Nn=(Pn.prototype.add=function(A,e){return new Pn(this.x+A,this.y+e)},Pn);function Pn(A,e){this.type=0,this.x=A,this.y=e}function Xn(A,e,t){return new Nn(A.x+(e.x-A.x)*t,A.y+(e.y-A.y)*t)}var Jn=(Yn.prototype.subdivide=function(A,e){var t=Xn(this.start,this.startControl,A),B=Xn(this.startControl,this.endControl,A),r=Xn(this.endControl,this.end,A),n=Xn(t,B,A),B=Xn(B,r,A),A=Xn(n,B,A);return e?new Yn(this.start,t,n,A):new Yn(A,B,r,this.end)},Yn.prototype.add=function(A,e){return new Yn(this.start.add(A,e),this.startControl.add(A,e),this.endControl.add(A,e),this.end.add(A,e))},Yn.prototype.reverse=function(){return new Yn(this.end,this.endControl,this.startControl,this.start)},Yn);function Yn(A,e,t,B){this.type=1,this.start=A,this.startControl=e,this.endControl=t,this.end=B}function Wn(A){return 1===A.type}var Zn,_n=function(A){var e=A.styles,t=A.bounds,B=(C=zA(e.borderTopLeftRadius,t.width,t.height))[0],r=C[1],n=(u=zA(e.borderTopRightRadius,t.width,t.height))[0],s=u[1],o=(F=zA(e.borderBottomRightRadius,t.width,t.height))[0],i=F[1],Q=(h=zA(e.borderBottomLeftRadius,t.width,t.height))[0],c=h[1];(d=[]).push((B+n)/t.width),d.push((Q+o)/t.width),d.push((r+c)/t.height),d.push((s+i)/t.height),1<(f=Math.max.apply(Math,d))&&(B/=f,r/=f,n/=f,s/=f,o/=f,i/=f,Q/=f,c/=f);var a=t.width-n,g=t.height-i,w=t.width-o,U=t.height-c,l=e.borderTopWidth,C=e.borderRightWidth,u=e.borderBottomWidth,F=e.borderLeftWidth,h=ie(e.paddingTop,A.bounds.width),d=ie(e.paddingRight,A.bounds.width),f=ie(e.paddingBottom,A.bounds.width),A=ie(e.paddingLeft,A.bounds.width);this.topLeftBorderDoubleOuterBox=0<B||0<r?As(t.left+F/3,t.top+l/3,B-F/3,r-l/3,Zn.TOP_LEFT):new Nn(t.left+F/3,t.top+l/3),this.topRightBorderDoubleOuterBox=0<B||0<r?As(t.left+a,t.top+l/3,n-C/3,s-l/3,Zn.TOP_RIGHT):new Nn(t.left+t.width-C/3,t.top+l/3),this.bottomRightBorderDoubleOuterBox=0<o||0<i?As(t.left+w,t.top+g,o-C/3,i-u/3,Zn.BOTTOM_RIGHT):new Nn(t.left+t.width-C/3,t.top+t.height-u/3),this.bottomLeftBorderDoubleOuterBox=0<Q||0<c?As(t.left+F/3,t.top+U,Q-F/3,c-u/3,Zn.BOTTOM_LEFT):new Nn(t.left+F/3,t.top+t.height-u/3),this.topLeftBorderDoubleInnerBox=0<B||0<r?As(t.left+2*F/3,t.top+2*l/3,B-2*F/3,r-2*l/3,Zn.TOP_LEFT):new Nn(t.left+2*F/3,t.top+2*l/3),this.topRightBorderDoubleInnerBox=0<B||0<r?As(t.left+a,t.top+2*l/3,n-2*C/3,s-2*l/3,Zn.TOP_RIGHT):new Nn(t.left+t.width-2*C/3,t.top+2*l/3),this.bottomRightBorderDoubleInnerBox=0<o||0<i?As(t.left+w,t.top+g,o-2*C/3,i-2*u/3,Zn.BOTTOM_RIGHT):new Nn(t.left+t.width-2*C/3,t.top+t.height-2*u/3),this.bottomLeftBorderDoubleInnerBox=0<Q||0<c?As(t.left+2*F/3,t.top+U,Q-2*F/3,c-2*u/3,Zn.BOTTOM_LEFT):new Nn(t.left+2*F/3,t.top+t.height-2*u/3),this.topLeftBorderStroke=0<B||0<r?As(t.left+F/2,t.top+l/2,B-F/2,r-l/2,Zn.TOP_LEFT):new Nn(t.left+F/2,t.top+l/2),this.topRightBorderStroke=0<B||0<r?As(t.left+a,t.top+l/2,n-C/2,s-l/2,Zn.TOP_RIGHT):new Nn(t.left+t.width-C/2,t.top+l/2),this.bottomRightBorderStroke=0<o||0<i?As(t.left+w,t.top+g,o-C/2,i-u/2,Zn.BOTTOM_RIGHT):new Nn(t.left+t.width-C/2,t.top+t.height-u/2),this.bottomLeftBorderStroke=0<Q||0<c?As(t.left+F/2,t.top+U,Q-F/2,c-u/2,Zn.BOTTOM_LEFT):new Nn(t.left+F/2,t.top+t.height-u/2),this.topLeftBorderBox=0<B||0<r?As(t.left,t.top,B,r,Zn.TOP_LEFT):new Nn(t.left,t.top),this.topRightBorderBox=0<n||0<s?As(t.left+a,t.top,n,s,Zn.TOP_RIGHT):new Nn(t.left+t.width,t.top),this.bottomRightBorderBox=0<o||0<i?As(t.left+w,t.top+g,o,i,Zn.BOTTOM_RIGHT):new Nn(t.left+t.width,t.top+t.height),this.bottomLeftBorderBox=0<Q||0<c?As(t.left,t.top+U,Q,c,Zn.BOTTOM_LEFT):new Nn(t.left,t.top+t.height),this.topLeftPaddingBox=0<B||0<r?As(t.left+F,t.top+l,Math.max(0,B-F),Math.max(0,r-l),Zn.TOP_LEFT):new Nn(t.left+F,t.top+l),this.topRightPaddingBox=0<n||0<s?As(t.left+Math.min(a,t.width-C),t.top+l,a>t.width+C?0:Math.max(0,n-C),Math.max(0,s-l),Zn.TOP_RIGHT):new Nn(t.left+t.width-C,t.top+l),this.bottomRightPaddingBox=0<o||0<i?As(t.left+Math.min(w,t.width-F),t.top+Math.min(g,t.height-u),Math.max(0,o-C),Math.max(0,i-u),Zn.BOTTOM_RIGHT):new Nn(t.left+t.width-C,t.top+t.height-u),this.bottomLeftPaddingBox=0<Q||0<c?As(t.left+F,t.top+Math.min(U,t.height-u),Math.max(0,Q-F),Math.max(0,c-u),Zn.BOTTOM_LEFT):new Nn(t.left+F,t.top+t.height-u),this.topLeftContentBox=0<B||0<r?As(t.left+F+A,t.top+l+h,Math.max(0,B-(F+A)),Math.max(0,r-(l+h)),Zn.TOP_LEFT):new Nn(t.left+F+A,t.top+l+h),this.topRightContentBox=0<n||0<s?As(t.left+Math.min(a,t.width+F+A),t.top+l+h,a>t.width+F+A?0:n-F+A,s-(l+h),Zn.TOP_RIGHT):new Nn(t.left+t.width-(C+d),t.top+l+h),this.bottomRightContentBox=0<o||0<i?As(t.left+Math.min(w,t.width-(F+A)),t.top+Math.min(g,t.height+l+h),Math.max(0,o-(C+d)),i-(u+f),Zn.BOTTOM_RIGHT):new Nn(t.left+t.width-(C+d),t.top+t.height-(u+f)),this.bottomLeftContentBox=0<Q||0<c?As(t.left+F+A,t.top+U,Math.max(0,Q-(F+A)),c-(u+f),Zn.BOTTOM_LEFT):new Nn(t.left+F+A,t.top+t.height-(u+f))};(we=Zn=Zn||{})[we.TOP_LEFT=0]="TOP_LEFT",we[we.TOP_RIGHT=1]="TOP_RIGHT",we[we.BOTTOM_RIGHT=2]="BOTTOM_RIGHT",we[we.BOTTOM_LEFT=3]="BOTTOM_LEFT";function qn(A){return[A.topLeftBorderBox,A.topRightBorderBox,A.bottomRightBorderBox,A.bottomLeftBorderBox]}function jn(A){return[A.topLeftPaddingBox,A.topRightPaddingBox,A.bottomRightPaddingBox,A.bottomLeftPaddingBox]}function zn(A){return 1===A.type}function $n(A,t){return A.length===t.length&&A.some(function(A,e){return A===t[e]})}var As=function(A,e,t,B,r){var n=(Math.sqrt(2)-1)/3*4,s=t*n,o=B*n,i=A+t,Q=e+B;switch(r){case Zn.TOP_LEFT:return new Jn(new Nn(A,Q),new Nn(A,Q-o),new Nn(i-s,e),new Nn(i,e));case Zn.TOP_RIGHT:return new Jn(new Nn(A,e),new Nn(A+s,e),new Nn(i,Q-o),new Nn(i,Q));case Zn.BOTTOM_RIGHT:return new Jn(new Nn(i,e),new Nn(i,e+o),new Nn(A+s,Q),new Nn(A,Q));default:Zn.BOTTOM_LEFT;return new Jn(new Nn(i,Q),new Nn(i-s,Q),new Nn(A,e+o),new Nn(A,e))}},es=function(A,e,t){this.offsetX=A,this.offsetY=e,this.matrix=t,this.type=0,this.target=6},ts=function(A,e){this.path=A,this.target=e,this.type=1},Bs=function(A){this.opacity=A,this.type=2,this.target=6},rs=function(A){this.element=A,this.inlineLevel=[],this.nonInlineLevel=[],this.negativeZIndex=[],this.zeroOrAutoZIndexOrTransformedOrOpacity=[],this.positiveZIndex=[],this.nonPositionedFloats=[],this.nonPositionedInlineLevel=[]},ns=(ss.prototype.getEffects=function(e){for(var A=-1===[2,3].indexOf(this.container.styles.position),t=this.parent,B=this.effects.slice(0);t;){var r,n,s=t.effects.filter(function(A){return!zn(A)});A||0!==t.container.styles.position||!t.parent?(B.unshift.apply(B,s),A=-1===[2,3].indexOf(t.container.styles.position),0!==t.container.styles.overflowX&&(r=qn(t.curves),n=jn(t.curves),$n(r,n)||B.unshift(new ts(n,6)))):B.unshift.apply(B,s),t=t.parent}return B.filter(function(A){return Gt(A.target,e)})},ss);function ss(A,e){var t,B;this.container=A,this.parent=e,this.effects=[],this.curves=new _n(this.container),this.container.styles.opacity<1&&this.effects.push(new Bs(this.container.styles.opacity)),null!==this.container.styles.transform&&(e=this.container.bounds.left+this.container.styles.transformOrigin[0].number,t=this.container.bounds.top+this.container.styles.transformOrigin[1].number,B=this.container.styles.transform,this.effects.push(new es(e,t,B))),0!==this.container.styles.overflowX&&(t=qn(this.curves),B=jn(this.curves),$n(t,B)?this.effects.push(new ts(t,6)):(this.effects.push(new ts(t,2)),this.effects.push(new ts(B,4))))}function os(A,e){switch(e){case 0:return Cs(A.topLeftBorderBox,A.topLeftPaddingBox,A.topRightBorderBox,A.topRightPaddingBox);case 1:return Cs(A.topRightBorderBox,A.topRightPaddingBox,A.bottomRightBorderBox,A.bottomRightPaddingBox);case 2:return Cs(A.bottomRightBorderBox,A.bottomRightPaddingBox,A.bottomLeftBorderBox,A.bottomLeftPaddingBox);default:return Cs(A.bottomLeftBorderBox,A.bottomLeftPaddingBox,A.topLeftBorderBox,A.topLeftPaddingBox)}}function is(A){var e=A.bounds,A=A.styles;return e.add(A.borderLeftWidth,A.borderTopWidth,-(A.borderRightWidth+A.borderLeftWidth),-(A.borderTopWidth+A.borderBottomWidth))}function Qs(A){var e=A.styles,t=A.bounds,B=ie(e.paddingLeft,t.width),r=ie(e.paddingRight,t.width),n=ie(e.paddingTop,t.width),A=ie(e.paddingBottom,t.width);return t.add(B+e.borderLeftWidth,n+e.borderTopWidth,-(e.borderRightWidth+e.borderLeftWidth+B+r),-(e.borderTopWidth+e.borderBottomWidth+n+A))}function cs(A,e,t){var B=(r=Fs(A.styles.backgroundOrigin,e),n=A,0===r?n.bounds:(2===r?Qs:is)(n)),r=(s=Fs(A.styles.backgroundClip,e),o=A,0===s?o.bounds:(2===s?Qs:is)(o)),n=us(Fs(A.styles.backgroundSize,e),t,B),s=n[0],o=n[1],t=zA(Fs(A.styles.backgroundPosition,e),B.width-s,B.height-o);return[hs(Fs(A.styles.backgroundRepeat,e),t,n,B,r),Math.round(B.left+t[0]),Math.round(B.top+t[1]),s,o]}function as(A){return PA(A)&&A.value===xe.AUTO}function gs(A){return"number"==typeof A}var ws=function(Q,c,a,g){Q.container.elements.forEach(function(A){var e=Gt(A.flags,4),t=Gt(A.flags,2),B=new ns(A,Q);Gt(A.styles.display,2048)&&g.push(B);var r,n,s,o,i=Gt(A.flags,8)?[]:g;e||t?(r=e||A.styles.isPositioned()?a:c,t=new rs(B),A.styles.isPositioned()||A.styles.opacity<1||A.styles.isTransformed()?(n=A.styles.zIndex.order)<0?(s=0,r.negativeZIndex.some(function(A,e){return n>A.element.container.styles.zIndex.order?(s=e,!1):0<s}),r.negativeZIndex.splice(s,0,t)):0<n?(o=0,r.positiveZIndex.some(function(A,e){return n>=A.element.container.styles.zIndex.order?(o=e+1,!1):0<o}),r.positiveZIndex.splice(o,0,t)):r.zeroOrAutoZIndexOrTransformedOrOpacity.push(t):(A.styles.isFloating()?r.nonPositionedFloats:r.nonPositionedInlineLevel).push(t),ws(B,t,e?t:a,i)):((A.styles.isInlineLevel()?c.inlineLevel:c.nonInlineLevel).push(B),ws(B,c,a,i)),Gt(A.flags,8)&&Us(A,i)})},Us=function(A,e){for(var t=A instanceof ir?A.start:1,B=A instanceof ir&&A.reversed,r=0;r<e.length;r++){var n=e[r];n.container instanceof nr&&"number"==typeof n.container.value&&0!==n.container.value&&(t=n.container.value),n.listValue=gn(t,n.container.styles.listStyleType,!0),t+=B?-1:1}},ls=function(A,e){var t=[];return Wn(A)?t.push(A.subdivide(.5,!1)):t.push(A),Wn(e)?t.push(e.subdivide(.5,!0)):t.push(e),t},Cs=function(A,e,t,B){var r=[];return Wn(A)?r.push(A.subdivide(.5,!1)):r.push(A),Wn(t)?r.push(t.subdivide(.5,!0)):r.push(t),Wn(B)?r.push(B.subdivide(.5,!0).reverse()):r.push(B),Wn(e)?r.push(e.subdivide(.5,!1).reverse()):r.push(e),r},us=function(A,e,t){var B=e[0],r=e[1],n=e[2],s=A[0],o=A[1];if(!s)return[0,0];if(qA(s)&&o&&qA(o))return[ie(s,t.width),ie(o,t.height)];var i=gs(n);if(PA(s)&&(s.value===xe.CONTAIN||s.value===xe.COVER))return gs(n)?t.width/t.height<n!=(s.value===xe.COVER)?[t.width,t.width/n]:[t.height*n,t.height]:[t.width,t.height];var Q=gs(B),e=gs(r),A=Q||e;if(as(s)&&(!o||as(o)))return Q&&e?[B,r]:i||A?A&&i?[Q?B:r*n,e?r:B/n]:[Q?B:t.width,e?r:t.height]:[t.width,t.height];if(i){var c=0,a=0;return qA(s)?c=ie(s,t.width):qA(o)&&(a=ie(o,t.height)),as(s)?c=a*n:o&&!as(o)||(a=c/n),[c,a]}c=null,a=null;if(qA(s)?c=ie(s,t.width):o&&qA(o)&&(a=ie(o,t.height)),null!==(c=null!==(a=null!==c&&(!o||as(o))?Q&&e?c/B*r:t.height:a)&&as(s)?Q&&e?a/r*B:t.width:c)&&null!==a)return[c,a];throw new Error("Unable to calculate background-size for element")},Fs=function(A,e){e=A[e];return void 0===e?A[0]:e},hs=function(A,e,t,B,r){var n=e[0],s=e[1],o=t[0],i=t[1];switch(A){case 2:return[new Nn(Math.round(B.left),Math.round(B.top+s)),new Nn(Math.round(B.left+B.width),Math.round(B.top+s)),new Nn(Math.round(B.left+B.width),Math.round(i+B.top+s)),new Nn(Math.round(B.left),Math.round(i+B.top+s))];case 3:return[new Nn(Math.round(B.left+n),Math.round(B.top)),new Nn(Math.round(B.left+n+o),Math.round(B.top)),new Nn(Math.round(B.left+n+o),Math.round(B.height+B.top)),new Nn(Math.round(B.left+n),Math.round(B.height+B.top))];case 1:return[new Nn(Math.round(B.left+n),Math.round(B.top+s)),new Nn(Math.round(B.left+n+o),Math.round(B.top+s)),new Nn(Math.round(B.left+n+o),Math.round(B.top+s+i)),new Nn(Math.round(B.left+n),Math.round(B.top+s+i))];default:return[new Nn(Math.round(r.left),Math.round(r.top)),new Nn(Math.round(r.left+r.width),Math.round(r.top)),new Nn(Math.round(r.left+r.width),Math.round(r.height+r.top)),new Nn(Math.round(r.left),Math.round(r.height+r.top))]}},ds="Hidden Text",fs=(Hs.prototype.parseMetrics=function(A,e){var t=this._document.createElement("div"),B=this._document.createElement("img"),r=this._document.createElement("span"),n=this._document.body;t.style.visibility="hidden",t.style.fontFamily=A,t.style.fontSize=e,t.style.margin="0",t.style.padding="0",t.style.whiteSpace="nowrap",n.appendChild(t),B.src="data:image/gif;base64,R0lGODlhAQABAIAAAAAAAP///yH5BAEAAAAALAAAAAABAAEAAAIBRAA7",B.width=1,B.height=1,B.style.margin="0",B.style.padding="0",B.style.verticalAlign="baseline",r.style.fontFamily=A,r.style.fontSize=e,r.style.margin="0",r.style.padding="0",r.appendChild(this._document.createTextNode(ds)),t.appendChild(r),t.appendChild(B);e=B.offsetTop-r.offsetTop+2;t.removeChild(r),t.appendChild(this._document.createTextNode(ds)),t.style.lineHeight="normal",B.style.verticalAlign="super";B=B.offsetTop-t.offsetTop+2;return n.removeChild(t),{baseline:e,middle:B}},Hs.prototype.getMetrics=function(A,e){var t=A+" "+e;return void 0===this._data[t]&&(this._data[t]=this.parseMetrics(A,e)),this._data[t]},Hs);function Hs(A){this._data={},this._document=A}var ps,we=function(A,e){this.context=A,this.options=e},Es=(A(Is,ps=we),Is.prototype.applyEffects=function(A){for(var e=this;this._activeEffects.length;)this.popEffect();A.forEach(function(A){return e.applyEffect(A)})},Is.prototype.applyEffect=function(A){this.ctx.save(),2===A.type&&(this.ctx.globalAlpha=A.opacity),0===A.type&&(this.ctx.translate(A.offsetX,A.offsetY),this.ctx.transform(A.matrix[0],A.matrix[1],A.matrix[2],A.matrix[3],A.matrix[4],A.matrix[5]),this.ctx.translate(-A.offsetX,-A.offsetY)),zn(A)&&(this.path(A.path),this.ctx.clip()),this._activeEffects.push(A)},Is.prototype.popEffect=function(){this._activeEffects.pop(),this.ctx.restore()},Is.prototype.renderStack=function(e){return a(this,void 0,void 0,function(){return H(this,function(A){switch(A.label){case 0:return e.element.container.styles.isVisible()?[4,this.renderStackContent(e)]:[3,2];case 1:A.sent(),A.label=2;case 2:return[2]}})})},Is.prototype.renderNode=function(e){return a(this,void 0,void 0,function(){return H(this,function(A){switch(A.label){case 0:return Gt(e.container.flags,16),e.container.styles.isVisible()?[4,this.renderNodeBackgroundAndBorders(e)]:[3,3];case 1:return A.sent(),[4,this.renderNodeContent(e)];case 2:A.sent(),A.label=3;case 3:return[2]}})})},Is.prototype.renderTextWithLetterSpacing=function(t,A,B){var r=this;0===A?this.ctx.fillText(t.text,t.bounds.left,t.bounds.top+B):NB(t.text).reduce(function(A,e){return r.ctx.fillText(e,A,t.bounds.top+B),A+r.ctx.measureText(e).width},t.bounds.left)},Is.prototype.createFontStyle=function(A){var e=A.fontVariant.filter(function(A){return"normal"===A||"small-caps"===A}).join(""),t=Ds(A.fontFamily).join(", "),B=RA(A.fontSize)?""+A.fontSize.number+A.fontSize.unit:A.fontSize.number+"px";return[[A.fontStyle,e,A.fontWeight,B,t].join(" "),t,B]},Is.prototype.renderTextNode=function(i,Q){return a(this,void 0,void 0,function(){var e,t,B,r,n,s,o=this;return H(this,function(A){return B=this.createFontStyle(Q),e=B[0],t=B[1],B=B[2],this.ctx.font=e,this.ctx.direction=1===Q.direction?"rtl":"ltr",this.ctx.textAlign="left",this.ctx.textBaseline="alphabetic",B=this.fontMetrics.getMetrics(t,B),r=B.baseline,n=B.middle,s=Q.paintOrder,i.textBounds.forEach(function(t){s.forEach(function(A){switch(A){case 0:o.ctx.fillStyle=te(Q.color),o.renderTextWithLetterSpacing(t,Q.letterSpacing,r);var e=Q.textShadow;e.length&&t.text.trim().length&&(e.slice(0).reverse().forEach(function(A){o.ctx.shadowColor=te(A.color),o.ctx.shadowOffsetX=A.offsetX.number*o.options.scale,o.ctx.shadowOffsetY=A.offsetY.number*o.options.scale,o.ctx.shadowBlur=A.blur.number,o.renderTextWithLetterSpacing(t,Q.letterSpacing,r)}),o.ctx.shadowColor="",o.ctx.shadowOffsetX=0,o.ctx.shadowOffsetY=0,o.ctx.shadowBlur=0),Q.textDecorationLine.length&&(o.ctx.fillStyle=te(Q.textDecorationColor||Q.color),Q.textDecorationLine.forEach(function(A){switch(A){case 1:o.ctx.fillRect(t.bounds.left,Math.round(t.bounds.top+r),t.bounds.width,1);break;case 2:o.ctx.fillRect(t.bounds.left,Math.round(t.bounds.top),t.bounds.width,1);break;case 3:o.ctx.fillRect(t.bounds.left,Math.ceil(t.bounds.top+n),t.bounds.width,1)}}));break;case 1:Q.webkitTextStrokeWidth&&t.text.trim().length&&(o.ctx.strokeStyle=te(Q.webkitTextStrokeColor),o.ctx.lineWidth=Q.webkitTextStrokeWidth,o.ctx.lineJoin=window.chrome?"miter":"round",o.ctx.strokeText(t.text,t.bounds.left,t.bounds.top+r)),o.ctx.strokeStyle="",o.ctx.lineWidth=0,o.ctx.lineJoin="miter"}})}),[2]})})},Is.prototype.renderReplacedElement=function(A,e,t){var B;t&&0<A.intrinsicWidth&&0<A.intrinsicHeight&&(B=Qs(A),e=jn(e),this.path(e),this.ctx.save(),this.ctx.clip(),this.ctx.drawImage(t,0,0,A.intrinsicWidth,A.intrinsicHeight,B.left,B.top,B.width,B.height),this.ctx.restore())},Is.prototype.renderNodeContent=function(w){return a(this,void 0,void 0,function(){var e,t,B,r,n,s,o,i,Q,c,a,g;return H(this,function(A){switch(A.label){case 0:this.applyEffects(w.getEffects(4)),e=w.container,t=w.curves,B=e.styles,r=0,n=e.textNodes,A.label=1;case 1:return r<n.length?(s=n[r],[4,this.renderTextNode(s,B)]):[3,4];case 2:A.sent(),A.label=3;case 3:return r++,[3,1];case 4:if(!(e instanceof qB))return[3,8];A.label=5;case 5:return A.trys.push([5,7,,8]),[4,this.context.cache.match(e.src)];case 6:return Q=A.sent(),this.renderReplacedElement(e,t,Q),[3,8];case 7:return A.sent(),this.context.logger.error("Error loading image "+e.src),[3,8];case 8:if(e instanceof $B&&this.renderReplacedElement(e,t,e.canvas),!(e instanceof tr))return[3,12];A.label=9;case 9:return A.trys.push([9,11,,12]),[4,this.context.cache.match(e.svg)];case 10:return Q=A.sent(),this.renderReplacedElement(e,t,Q),[3,12];case 11:return A.sent(),this.context.logger.error("Error loading svg "+e.svg.substring(0,255)),[3,12];case 12:return e instanceof yr&&e.tree?[4,new Is(this.context,{scale:this.options.scale,backgroundColor:e.backgroundColor,x:0,y:0,width:e.width,height:e.height}).render(e.tree)]:[3,14];case 13:s=A.sent(),e.width&&e.height&&this.ctx.drawImage(s,0,0,e.width,e.height,e.bounds.left,e.bounds.top,e.bounds.width,e.bounds.height),A.label=14;case 14:if(e instanceof ur&&(i=Math.min(e.bounds.width,e.bounds.height),e.type===wr?e.checked&&(this.ctx.save(),this.path([new Nn(e.bounds.left+.39363*i,e.bounds.top+.79*i),new Nn(e.bounds.left+.16*i,e.bounds.top+.5549*i),new Nn(e.bounds.left+.27347*i,e.bounds.top+.44071*i),new Nn(e.bounds.left+.39694*i,e.bounds.top+.5649*i),new Nn(e.bounds.left+.72983*i,e.bounds.top+.23*i),new Nn(e.bounds.left+.84*i,e.bounds.top+.34085*i),new Nn(e.bounds.left+.39363*i,e.bounds.top+.79*i)]),this.ctx.fillStyle=te(Cr),this.ctx.fill(),this.ctx.restore()):e.type===Ur&&e.checked&&(this.ctx.save(),this.ctx.beginPath(),this.ctx.arc(e.bounds.left+i/2,e.bounds.top+i/2,i/4,0,2*Math.PI,!0),this.ctx.fillStyle=te(Cr),this.ctx.fill(),this.ctx.restore())),Ks(e)&&e.value.length){switch(c=this.createFontStyle(B),a=c[0],i=c[1],c=this.fontMetrics.getMetrics(a,i).baseline,this.ctx.font=a,this.ctx.fillStyle=te(B.color),this.ctx.textBaseline="alphabetic",this.ctx.textAlign=Ls(e.styles.textAlign),g=Qs(e),o=0,e.styles.textAlign){case 1:o+=g.width/2;break;case 2:o+=g.width}i=g.add(o,0,0,-g.height/2+1),this.ctx.save(),this.path([new Nn(g.left,g.top),new Nn(g.left+g.width,g.top),new Nn(g.left+g.width,g.top+g.height),new Nn(g.left,g.top+g.height)]),this.ctx.clip(),this.renderTextWithLetterSpacing(new VB(e.value,i),B.letterSpacing,c),this.ctx.restore(),this.ctx.textBaseline="alphabetic",this.ctx.textAlign="left"}if(!Gt(e.styles.display,2048))return[3,20];if(null===e.styles.listStyleImage)return[3,19];if(0!==(c=e.styles.listStyleImage).type)return[3,18];Q=void 0,c=c.url,A.label=15;case 15:return A.trys.push([15,17,,18]),[4,this.context.cache.match(c)];case 16:return Q=A.sent(),this.ctx.drawImage(Q,e.bounds.left-(Q.width+10),e.bounds.top),[3,18];case 17:return A.sent(),this.context.logger.error("Error loading list-style-image "+c),[3,18];case 18:return[3,20];case 19:w.listValue&&-1!==e.styles.listStyleType&&(a=this.createFontStyle(B)[0],this.ctx.font=a,this.ctx.fillStyle=te(B.color),this.ctx.textBaseline="middle",this.ctx.textAlign="right",g=new d(e.bounds.left,e.bounds.top+ie(e.styles.paddingTop,e.bounds.width),e.bounds.width,ke(B.lineHeight,B.fontSize.number)/2+1),this.renderTextWithLetterSpacing(new VB(w.listValue,g),B.letterSpacing,ke(B.lineHeight,B.fontSize.number)/2+2),this.ctx.textBaseline="bottom",this.ctx.textAlign="left"),A.label=20;case 20:return[2]}})})},Is.prototype.renderStackContent=function(C){return a(this,void 0,void 0,function(){var e,t,B,r,n,s,o,i,Q,c,a,g,w,U,l;return H(this,function(A){switch(A.label){case 0:return Gt(C.element.container.flags,16),[4,this.renderNodeBackgroundAndBorders(C.element)];case 1:A.sent(),e=0,t=C.negativeZIndex,A.label=2;case 2:return e<t.length?(l=t[e],[4,this.renderStack(l)]):[3,5];case 3:A.sent(),A.label=4;case 4:return e++,[3,2];case 5:return[4,this.renderNodeContent(C.element)];case 6:A.sent(),B=0,r=C.nonInlineLevel,A.label=7;case 7:return B<r.length?(l=r[B],[4,this.renderNode(l)]):[3,10];case 8:A.sent(),A.label=9;case 9:return B++,[3,7];case 10:n=0,s=C.nonPositionedFloats,A.label=11;case 11:return n<s.length?(l=s[n],[4,this.renderStack(l)]):[3,14];case 12:A.sent(),A.label=13;case 13:return n++,[3,11];case 14:o=0,i=C.nonPositionedInlineLevel,A.label=15;case 15:return o<i.length?(l=i[o],[4,this.renderStack(l)]):[3,18];case 16:A.sent(),A.label=17;case 17:return o++,[3,15];case 18:Q=0,c=C.inlineLevel,A.label=19;case 19:return Q<c.length?(l=c[Q],[4,this.renderNode(l)]):[3,22];case 20:A.sent(),A.label=21;case 21:return Q++,[3,19];case 22:a=0,g=C.zeroOrAutoZIndexOrTransformedOrOpacity,A.label=23;case 23:return a<g.length?(l=g[a],[4,this.renderStack(l)]):[3,26];case 24:A.sent(),A.label=25;case 25:return a++,[3,23];case 26:w=0,U=C.positiveZIndex,A.label=27;case 27:return w<U.length?(l=U[w],[4,this.renderStack(l)]):[3,30];case 28:A.sent(),A.label=29;case 29:return w++,[3,27];case 30:return[2]}})})},Is.prototype.mask=function(A){this.ctx.beginPath(),this.ctx.moveTo(0,0),this.ctx.lineTo(this.canvas.width,0),this.ctx.lineTo(this.canvas.width,this.canvas.height),this.ctx.lineTo(0,this.canvas.height),this.ctx.lineTo(0,0),this.formatPath(A.slice(0).reverse()),this.ctx.closePath()},Is.prototype.path=function(A){this.ctx.beginPath(),this.formatPath(A),this.ctx.closePath()},Is.prototype.formatPath=function(A){var B=this;A.forEach(function(A,e){var t=Wn(A)?A.start:A;0===e?B.ctx.moveTo(t.x,t.y):B.ctx.lineTo(t.x,t.y),Wn(A)&&B.ctx.bezierCurveTo(A.startControl.x,A.startControl.y,A.endControl.x,A.endControl.y,A.end.x,A.end.y)})},Is.prototype.renderRepeat=function(A,e,t,B){this.path(A),this.ctx.fillStyle=e,this.ctx.translate(t,B),this.ctx.fill(),this.ctx.translate(-t,-B)},Is.prototype.resizeImage=function(A,e,t){if(A.width===e&&A.height===t)return A;var B=(null!==(B=this.canvas.ownerDocument)&&void 0!==B?B:document).createElement("canvas");return B.width=Math.max(1,e),B.height=Math.max(1,t),B.getContext("2d").drawImage(A,0,0,A.width,A.height,0,0,e,t),B},Is.prototype.renderBackgroundImage=function(f){return a(this,void 0,void 0,function(){var h,e,d,t,B,r;return H(this,function(A){switch(A.label){case 0:h=f.styles.backgroundImage.length-1,e=function(e){var t,B,r,n,s,o,i,Q,c,a,g,w,U,l,C,u,F;return H(this,function(A){switch(A.label){case 0:if(0!==e.type)return[3,5];t=void 0,B=e.url,A.label=1;case 1:return A.trys.push([1,3,,4]),[4,d.context.cache.match(B)];case 2:return t=A.sent(),[3,4];case 3:return A.sent(),d.context.logger.error("Error loading background-image "+B),[3,4];case 4:return t&&(r=cs(f,h,[t.width,t.height,t.width/t.height]),o=r[0],g=r[1],w=r[2],c=r[3],a=r[4],s=d.ctx.createPattern(d.resizeImage(t,c,a),"repeat"),d.renderRepeat(o,s,g,w)),[3,6];case 5:1===e.type?(F=cs(f,h,[null,null,null]),o=F[0],g=F[1],w=F[2],c=F[3],a=F[4],C=Fe(e.angle,c,a),l=C[0],r=C[1],i=C[2],u=C[3],Q=C[4],(F=document.createElement("canvas")).width=c,F.height=a,C=F.getContext("2d"),n=C.createLinearGradient(r,u,i,Q),ue(e.stops,l).forEach(function(A){return n.addColorStop(A.stop,te(A.color))}),C.fillStyle=n,C.fillRect(0,0,c,a),0<c&&0<a&&(s=d.ctx.createPattern(F,"repeat"),d.renderRepeat(o,s,g,w))):2===e.type&&(u=cs(f,h,[null,null,null]),o=u[0],i=u[1],Q=u[2],c=u[3],a=u[4],l=0===e.position.length?[se]:e.position,g=ie(l[0],c),w=ie(l[l.length-1],a),C=function(A,e,t,B,r){var n,s,o,i,Q=0,c=0;switch(A.size){case 0:0===A.shape?Q=c=Math.min(Math.abs(e),Math.abs(e-B),Math.abs(t),Math.abs(t-r)):1===A.shape&&(Q=Math.min(Math.abs(e),Math.abs(e-B)),c=Math.min(Math.abs(t),Math.abs(t-r)));break;case 2:0===A.shape?Q=c=Math.min(he(e,t),he(e,t-r),he(e-B,t),he(e-B,t-r)):1===A.shape&&(n=Math.min(Math.abs(t),Math.abs(t-r))/Math.min(Math.abs(e),Math.abs(e-B)),o=(s=de(B,r,e,t,!0))[0],i=s[1],c=n*(Q=he(o-e,(i-t)/n)));break;case 1:0===A.shape?Q=c=Math.max(Math.abs(e),Math.abs(e-B),Math.abs(t),Math.abs(t-r)):1===A.shape&&(Q=Math.max(Math.abs(e),Math.abs(e-B)),c=Math.max(Math.abs(t),Math.abs(t-r)));break;case 3:0===A.shape?Q=c=Math.max(he(e,t),he(e,t-r),he(e-B,t),he(e-B,t-r)):1===A.shape&&(n=Math.max(Math.abs(t),Math.abs(t-r))/Math.max(Math.abs(e),Math.abs(e-B)),o=(s=de(B,r,e,t,!1))[0],i=s[1],c=n*(Q=he(o-e,(i-t)/n)))}return Array.isArray(A.size)&&(Q=ie(A.size[0],B),c=2===A.size.length?ie(A.size[1],r):Q),[Q,c]}(e,g,w,c,a),F=C[0],u=C[1],0<F&&0<u&&(U=d.ctx.createRadialGradient(i+g,Q+w,0,i+g,Q+w,F),ue(e.stops,2*F).forEach(function(A){return U.addColorStop(A.stop,te(A.color))}),d.path(o),d.ctx.fillStyle=U,F!==u?(l=f.bounds.left+.5*f.bounds.width,C=f.bounds.top+.5*f.bounds.height,F=1/(u=u/F),d.ctx.save(),d.ctx.translate(l,C),d.ctx.transform(1,0,0,u,0,0),d.ctx.translate(-l,-C),d.ctx.fillRect(i,F*(Q-C)+C,c,a*F),d.ctx.restore()):d.ctx.fill())),A.label=6;case 6:return h--,[2]}})},d=this,t=0,B=f.styles.backgroundImage.slice(0).reverse(),A.label=1;case 1:return t<B.length?(r=B[t],[5,e(r)]):[3,4];case 2:A.sent(),A.label=3;case 3:return t++,[3,1];case 4:return[2]}})})},Is.prototype.renderSolidBorder=function(e,t,B){return a(this,void 0,void 0,function(){return H(this,function(A){return this.path(os(B,t)),this.ctx.fillStyle=te(e),this.ctx.fill(),[2]})})},Is.prototype.renderDoubleBorder=function(t,B,r,n){return a(this,void 0,void 0,function(){var e;return H(this,function(A){switch(A.label){case 0:return B<3?[4,this.renderSolidBorder(t,r,n)]:[3,2];case 1:return A.sent(),[2];case 2:return e=function(A,e){switch(e){case 0:return Cs(A.topLeftBorderBox,A.topLeftBorderDoubleOuterBox,A.topRightBorderBox,A.topRightBorderDoubleOuterBox);case 1:return Cs(A.topRightBorderBox,A.topRightBorderDoubleOuterBox,A.bottomRightBorderBox,A.bottomRightBorderDoubleOuterBox);case 2:return Cs(A.bottomRightBorderBox,A.bottomRightBorderDoubleOuterBox,A.bottomLeftBorderBox,A.bottomLeftBorderDoubleOuterBox);default:return Cs(A.bottomLeftBorderBox,A.bottomLeftBorderDoubleOuterBox,A.topLeftBorderBox,A.topLeftBorderDoubleOuterBox)}}(n,r),this.path(e),this.ctx.fillStyle=te(t),this.ctx.fill(),e=function(A,e){switch(e){case 0:return Cs(A.topLeftBorderDoubleInnerBox,A.topLeftPaddingBox,A.topRightBorderDoubleInnerBox,A.topRightPaddingBox);case 1:return Cs(A.topRightBorderDoubleInnerBox,A.topRightPaddingBox,A.bottomRightBorderDoubleInnerBox,A.bottomRightPaddingBox);case 2:return Cs(A.bottomRightBorderDoubleInnerBox,A.bottomRightPaddingBox,A.bottomLeftBorderDoubleInnerBox,A.bottomLeftPaddingBox);default:return Cs(A.bottomLeftBorderDoubleInnerBox,A.bottomLeftPaddingBox,A.topLeftBorderDoubleInnerBox,A.topLeftPaddingBox)}}(n,r),this.path(e),this.ctx.fill(),[2]}})})},Is.prototype.renderNodeBackgroundAndBorders=function(c){return a(this,void 0,void 0,function(){var e,t,B,r,n,s,o,i,Q=this;return H(this,function(A){switch(A.label){case 0:return(this.applyEffects(c.getEffects(2)),e=c.container.styles,t=!ee(e.backgroundColor)||e.backgroundImage.length,B=[{style:e.borderTopStyle,color:e.borderTopColor,width:e.borderTopWidth},{style:e.borderRightStyle,color:e.borderRightColor,width:e.borderRightWidth},{style:e.borderBottomStyle,color:e.borderBottomColor,width:e.borderBottomWidth},{style:e.borderLeftStyle,color:e.borderLeftColor,width:e.borderLeftWidth}],r=ms(Fs(e.backgroundClip,0),c.curves),t||e.boxShadow.length)?(this.ctx.save(),this.path(r),this.ctx.clip(),ee(e.backgroundColor)||(this.ctx.fillStyle=te(e.backgroundColor),this.ctx.fill()),[4,this.renderBackgroundImage(c.container)]):[3,2];case 1:A.sent(),this.ctx.restore(),e.boxShadow.slice(0).reverse().forEach(function(A){Q.ctx.save();var t,B,r,n,e=qn(c.curves),s=A.inset?0:1e4,o=(t=-s+(A.inset?1:-1)*A.spread.number,B=(A.inset?1:-1)*A.spread.number,r=A.spread.number*(A.inset?-2:2),n=A.spread.number*(A.inset?-2:2),e.map(function(A,e){switch(e){case 0:return A.add(t,B);case 1:return A.add(t+r,B);case 2:return A.add(t+r,B+n);case 3:return A.add(t,B+n)}return A}));A.inset?(Q.path(e),Q.ctx.clip(),Q.mask(o)):(Q.mask(e),Q.ctx.clip(),Q.path(o)),Q.ctx.shadowOffsetX=A.offsetX.number+s,Q.ctx.shadowOffsetY=A.offsetY.number,Q.ctx.shadowColor=te(A.color),Q.ctx.shadowBlur=A.blur.number,Q.ctx.fillStyle=A.inset?te(A.color):"rgba(0,0,0,1)",Q.ctx.fill(),Q.ctx.restore()}),A.label=2;case 2:s=n=0,o=B,A.label=3;case 3:return s<o.length?0!==(i=o[s]).style&&!ee(i.color)&&0<i.width?2!==i.style?[3,5]:[4,this.renderDashedDottedBorder(i.color,i.width,n,c.curves,2)]:[3,11]:[3,13];case 4:return A.sent(),[3,11];case 5:return 3!==i.style?[3,7]:[4,this.renderDashedDottedBorder(i.color,i.width,n,c.curves,3)];case 6:return A.sent(),[3,11];case 7:return 4!==i.style?[3,9]:[4,this.renderDoubleBorder(i.color,i.width,n,c.curves)];case 8:return A.sent(),[3,11];case 9:return[4,this.renderSolidBorder(i.color,n,c.curves)];case 10:A.sent(),A.label=11;case 11:n++,A.label=12;case 12:return s++,[3,3];case 13:return[2]}})})},Is.prototype.renderDashedDottedBorder=function(g,w,U,l,C){return a(this,void 0,void 0,function(){var e,t,B,r,n,s,o,i,Q,c,a;return H(this,function(A){return this.ctx.save(),Q=function(A,e){switch(e){case 0:return ls(A.topLeftBorderStroke,A.topRightBorderStroke);case 1:return ls(A.topRightBorderStroke,A.bottomRightBorderStroke);case 2:return ls(A.bottomRightBorderStroke,A.bottomLeftBorderStroke);default:return ls(A.bottomLeftBorderStroke,A.topLeftBorderStroke)}}(l,U),e=os(l,U),2===C&&(this.path(e),this.ctx.clip()),s=Wn(e[0])?(t=e[0].start.x,e[0].start.y):(t=e[0].x,e[0].y),o=Wn(e[1])?(B=e[1].end.x,e[1].end.y):(B=e[1].x,e[1].y),r=0===U||2===U?Math.abs(t-B):Math.abs(s-o),this.ctx.beginPath(),3===C?this.formatPath(Q):this.formatPath(e.slice(0,2)),n=w<3?3*w:2*w,s=w<3?2*w:w,3===C&&(s=n=w),o=!0,r<=2*n?o=!1:r<=2*n+s?(n*=i=r/(2*n+s),s*=i):(Q=Math.floor((r+s)/(n+s)),i=(r-Q*n)/(Q-1),s=(Q=(r-(Q+1)*n)/Q)<=0||Math.abs(s-i)<Math.abs(s-Q)?i:Q),o&&(3===C?this.ctx.setLineDash([0,n+s]):this.ctx.setLineDash([n,s])),3===C?(this.ctx.lineCap="round",this.ctx.lineWidth=w):this.ctx.lineWidth=2*w+1.1,this.ctx.strokeStyle=te(g),this.ctx.stroke(),this.ctx.setLineDash([]),2===C&&(Wn(e[0])&&(c=e[3],a=e[0],this.ctx.beginPath(),this.formatPath([new Nn(c.end.x,c.end.y),new Nn(a.start.x,a.start.y)]),this.ctx.stroke()),Wn(e[1])&&(c=e[1],a=e[2],this.ctx.beginPath(),this.formatPath([new Nn(c.end.x,c.end.y),new Nn(a.start.x,a.start.y)]),this.ctx.stroke())),this.ctx.restore(),[2]})})},Is.prototype.render=function(r){return a(this,void 0,void 0,function(){return H(this,function(A){switch(A.label){case 0:return this.options.backgroundColor&&(this.ctx.fillStyle=te(this.options.backgroundColor),this.ctx.fillRect(this.options.x,this.options.y,this.options.width,this.options.height)),t=new ns(e=r,null),B=new rs(t),ws(t,B,B,e=[]),Us(t.container,e),[4,this.renderStack(B)];case 1:return A.sent(),this.applyEffects([]),[2,this.canvas]}var e,t,B})})},Is);function Is(A,e){A=ps.call(this,A,e)||this;return A._activeEffects=[],A.canvas=e.canvas||document.createElement("canvas"),A.ctx=A.canvas.getContext("2d"),e.canvas||(A.canvas.width=Math.floor(e.width*e.scale),A.canvas.height=Math.floor(e.height*e.scale),A.canvas.style.width=e.width+"px",A.canvas.style.height=e.height+"px"),A.fontMetrics=new fs(document),A.ctx.scale(A.options.scale,A.options.scale),A.ctx.translate(-e.x,-e.y),A.ctx.textBaseline="bottom",A._activeEffects=[],A.context.logger.debug("Canvas renderer initialized ("+e.width+"x"+e.height+") with scale "+e.scale),A}var ys,Ks=function(A){return A instanceof pr||(A instanceof dr||A instanceof ur&&A.type!==Ur&&A.type!==wr)},ms=function(A,e){switch(A){case 0:return qn(e);case 2:return[e.topLeftContentBox,e.topRightContentBox,e.bottomRightContentBox,e.bottomLeftContentBox];default:return jn(e)}},Ls=function(A){switch(A){case 1:return"center";case 2:return"right";default:return"left"}},bs=["-apple-system","system-ui"],Ds=function(A){return/iPhone OS 15_(0|1)/.test(window.navigator.userAgent)?A.filter(function(A){return-1===bs.indexOf(A)}):A},vs=(A(xs,ys=we),xs.prototype.render=function(t){return a(this,void 0,void 0,function(){var e;return H(this,function(A){switch(A.label){case 0:return e=TB(this.options.width*this.options.scale,this.options.height*this.options.scale,this.options.scale,this.options.scale,t),[4,Ms(e)];case 1:return e=A.sent(),this.options.backgroundColor&&(this.ctx.fillStyle=te(this.options.backgroundColor),this.ctx.fillRect(0,0,this.options.width*this.options.scale,this.options.height*this.options.scale)),this.ctx.drawImage(e,-this.options.x*this.options.scale,-this.options.y*this.options.scale),[2,this.canvas]}})})},xs);function xs(A,e){A=ys.call(this,A,e)||this;return A.canvas=e.canvas||document.createElement("canvas"),A.ctx=A.canvas.getContext("2d"),A.options=e,A.canvas.width=Math.floor(e.width*e.scale),A.canvas.height=Math.floor(e.height*e.scale),A.canvas.style.width=e.width+"px",A.canvas.style.height=e.height+"px",A.ctx.scale(A.options.scale,A.options.scale),A.ctx.translate(-e.x,-e.y),A.context.logger.debug("EXPERIMENTAL ForeignObject renderer initialized ("+e.width+"x"+e.height+" at "+e.x+","+e.y+") with scale "+e.scale),A}var Ms=function(B){return new Promise(function(A,e){var t=new Image;t.onload=function(){A(t)},t.onerror=e,t.src="data:image/svg+xml;charset=utf-8,"+encodeURIComponent((new XMLSerializer).serializeToString(B))})},Ss=(Ts.prototype.debug=function(){for(var A=[],e=0;e<arguments.length;e++)A[e]=arguments[e];this.enabled&&("undefined"!=typeof window&&window.console&&"function"==typeof console.debug?console.debug.apply(console,t([this.id,this.getTime()+"ms"],A)):this.info.apply(this,A))},Ts.prototype.getTime=function(){return Date.now()-this.start},Ts.prototype.info=function(){for(var A=[],e=0;e<arguments.length;e++)A[e]=arguments[e];this.enabled&&"undefined"!=typeof window&&window.console&&"function"==typeof console.info&&console.info.apply(console,t([this.id,this.getTime()+"ms"],A))},Ts.prototype.warn=function(){for(var A=[],e=0;e<arguments.length;e++)A[e]=arguments[e];this.enabled&&("undefined"!=typeof window&&window.console&&"function"==typeof console.warn?console.warn.apply(console,t([this.id,this.getTime()+"ms"],A)):this.info.apply(this,A))},Ts.prototype.error=function(){for(var A=[],e=0;e<arguments.length;e++)A[e]=arguments[e];this.enabled&&("undefined"!=typeof window&&window.console&&"function"==typeof console.error?console.error.apply(console,t([this.id,this.getTime()+"ms"],A)):this.info.apply(this,A))},Ts.instances={},Ts);function Ts(A){var e=A.id,A=A.enabled;this.id=e,this.enabled=A,this.start=Date.now()}var Gs=(Os.instanceCount=1,Os);function Os(A,e){this.windowBounds=e,this.instanceName="#"+Os.instanceCount++,this.logger=new Ss({id:this.instanceName,enabled:A.logging}),this.cache=null!==(e=A.cache)&&void 0!==e?e:new vn(this,A)}"undefined"!=typeof window&&bn.setContext(window);var Vs=function(u,F){return a(void 0,void 0,void 0,function(){var e,t,B,r,n,s,o,i,Q,c,a,g,w,U,l,C;return H(this,function(A){switch(A.label){case 0:if(!u||"object"!=typeof u)return[2,Promise.reject("Invalid element provided as first argument")];if(!(e=u.ownerDocument))throw new Error("Element is not attached to a Document");if(!(t=e.defaultView))throw new Error("Document is not attached to a Window");return w={allowTaint:null!==(U=F.allowTaint)&&void 0!==U&&U,imageTimeout:null!==(c=F.imageTimeout)&&void 0!==c?c:15e3,proxy:F.proxy,useCORS:null!==(a=F.useCORS)&&void 0!==a&&a},U=h({logging:null===(g=F.logging)||void 0===g||g,cache:F.cache},w),c={windowWidth:null!==(c=F.windowWidth)&&void 0!==c?c:t.innerWidth,windowHeight:null!==(a=F.windowHeight)&&void 0!==a?a:t.innerHeight,scrollX:null!==(g=F.scrollX)&&void 0!==g?g:t.pageXOffset,scrollY:null!==(w=F.scrollY)&&void 0!==w?w:t.pageYOffset},a=new d(c.scrollX,c.scrollY,c.windowWidth,c.windowHeight),g=new Gs(U,a),c=null!==(w=F.foreignObjectRendering)&&void 0!==w&&w,w={allowTaint:null!==(U=F.allowTaint)&&void 0!==U&&U,onclone:F.onclone,ignoreElements:F.ignoreElements,inlineImages:c,copyStyles:c},g.logger.debug("Starting document clone with size "+a.width+"x"+a.height+" scrolled to "+-a.left+","+-a.top),U=new Un(g,u,w),(w=U.clonedReferenceElement)?[4,U.toIFrame(e,a)]:[2,Promise.reject("Unable to find element in cloned iframe")];case 1:return(B=A.sent(),l=Jr(w)||"HTML"===w.tagName?function(A){var e=A.body,t=A.documentElement;if(!e||!t)throw new Error("Unable to get document size");A=Math.max(Math.max(e.scrollWidth,t.scrollWidth),Math.max(e.offsetWidth,t.offsetWidth),Math.max(e.clientWidth,t.clientWidth)),t=Math.max(Math.max(e.scrollHeight,t.scrollHeight),Math.max(e.offsetHeight,t.offsetHeight),Math.max(e.clientHeight,t.clientHeight));return new d(0,0,A,t)}(w.ownerDocument):f(g,w),r=l.width,n=l.height,s=l.left,o=l.top,i=ks(g,w,F.backgroundColor),l={canvas:F.canvas,backgroundColor:i,scale:null!==(l=null!==(l=F.scale)&&void 0!==l?l:t.devicePixelRatio)&&void 0!==l?l:1,x:(null!==(l=F.x)&&void 0!==l?l:0)+s,y:(null!==(l=F.y)&&void 0!==l?l:0)+o,width:null!==(l=F.width)&&void 0!==l?l:Math.ceil(r),height:null!==(l=F.height)&&void 0!==l?l:Math.ceil(n)},c)?(g.logger.debug("Document cloned, using foreign object rendering"),[4,new vs(g,l).render(w)]):[3,3];case 2:return Q=A.sent(),[3,5];case 3:return g.logger.debug("Document cloned, element located at "+s+","+o+" with size "+r+"x"+n+" using computed rendering"),g.logger.debug("Starting DOM parsing"),C=Mr(g,w),i===C.styles.backgroundColor&&(C.styles.backgroundColor=pe.TRANSPARENT),g.logger.debug("Starting renderer for element at "+l.x+","+l.y+" with size "+l.width+"x"+l.height),[4,new Es(g,l).render(C)];case 4:Q=A.sent(),A.label=5;case 5:return null!==(C=F.removeContainer)&&void 0!==C&&!C||Un.destroy(B)||g.logger.error("Cannot detach cloned iframe as it is not in the DOM anymore"),g.logger.debug("Finished rendering"),[2,Q]}})})},ks=function(A,e,t){var B=e.ownerDocument,r=B.documentElement?le(A,getComputedStyle(B.documentElement).backgroundColor):pe.TRANSPARENT,n=B.body?le(A,getComputedStyle(B.body).backgroundColor):pe.TRANSPARENT,t="string"==typeof t?le(A,t):null===t?pe.TRANSPARENT:4294967295;return e===B.documentElement?ee(r)?ee(n)?t:n:r:t};return function(A,e){return Vs(A,e=void 0===e?{}:e)}});