/*!
* html2canvas 1.0.0-rc.7
* Copyright (c) 2021 Niklas von Hertzen
* Released under MIT License
*/
!function(A,e){"object"==typeof exports&&"undefined"!=typeof module?module.exports=e():"function"==typeof define&&define.amd?define(e):(A=A||self).html2canvas=e()}(this,function(){"use strict";
/*! *****************************************************************************
Copyright (c) Microsoft Corporation. All rights reserved.
Licensed under the Apache License, Version 2.0 (the "License"); you may not use
this file except in compliance with the License. You may obtain a copy of the
License at http://www.apache.org/licenses/LICENSE-2.0
THIS CODE IS PROVIDED ON AN *AS IS* BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
KIND, EITHER EXPRESS OR IMPLIED, INCLUDING WITHOUT LIMITATION ANY IMPLIED
WARRANTIES OR CONDITIONS OF TITLE, FITNESS FOR A PARTICULAR PURPOSE,
MERCHANTABLITY OR NON-INFRINGEMENT.
See the Apache Version 2.0 License for specific language governing permissions
and limitations under the License.
***************************************************************************** */var A=function(e,t){return(A=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(A,e){A.__proto__=e}||function(A,e){for(var t in e)e.hasOwnProperty(t)&&(A[t]=e[t])})(e,t)};function e(e,t){function r(){this.constructor=e}A(e,t),e.prototype=null===t?Object.create(t):(r.prototype=t.prototype,new r)}var t=function(){return(t=Object.assign||function(A){for(var e,t=1,r=arguments.length;t0&&n[n.length-1])&&(6===B[0]||2===B[0])){s=0;continue}if(3===B[0]&&(!n||B[1]>n[0]&&B[1]=55296&&n<=56319&&t>10),s%1024+56320)),(n+1===t||r.length>16384)&&(B+=String.fromCharCode.apply(String,r),r.length=0)}return B},a="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",c="undefined"==typeof Uint8Array?[]:new Uint8Array(256),Q=0;Q=0){if(A<55296||A>56319&&A<=65535)return e=((e=this.index[A>>5])<<2)+(31&A),this.data[e];if(A<=65535)return e=((e=this.index[2048+(A-55296>>5)])<<2)+(31&A),this.data[e];if(A>11),e=this.index[e],e+=A>>5&63,e=((e=this.index[e])<<2)+(31&A),this.data[e];if(A<=1114111)return this.data[this.highValueIndex]}return this.errorValue},A}(),l=10,C=13,g=15,E=17,F=18,h=19,H=20,d=21,f=22,p=24,N=25,K=26,I=27,T=28,m=30,R=32,L=33,O=34,v=35,D=37,b=38,S=39,M=40,y=42,_="!",P=function(A){var e,t,r,n=function(A){var e,t,r,n,B,s=.75*A.length,o=A.length,i=0;"="===A[A.length-1]&&(s--,"="===A[A.length-2]&&s--);var a="undefined"!=typeof ArrayBuffer&&"undefined"!=typeof Uint8Array&&void 0!==Uint8Array.prototype.slice?new ArrayBuffer(s):new Array(s),Q=Array.isArray(a)?a:new Uint8Array(a);for(e=0;e>4,Q[i++]=(15&r)<<4|n>>2,Q[i++]=(3&n)<<6|63&B;return a}(A),B=Array.isArray(n)?function(A){for(var e=A.length,t=[],r=0;r0;){var s=r[--B];if(Array.isArray(A)?-1!==A.indexOf(s):A===s)for(var o=t;o<=r.length;){var i;if((i=r[++o])===e)return!0;if(i!==l)break}if(s!==l)break}return!1},Y=function(A,e){for(var t=A;t>=0;){var r=e[t];if(r!==l)return r;t--}return 0},q=function(A,e,t,r,n){if(0===t[r])return"×";var B=r-1;if(Array.isArray(n)&&!0===n[B])return"×";var s=B-1,o=B+1,i=e[B],a=s>=0?e[s]:0,c=e[o];if(2===i&&3===c)return"×";if(-1!==V.indexOf(i))return _;if(-1!==V.indexOf(c))return"×";if(-1!==z.indexOf(c))return"×";if(8===Y(B,e))return"÷";if(11===P.get(A[B])&&(c===D||c===R||c===L))return"×";if(7===i||7===c)return"×";if(9===i)return"×";if(-1===[l,C,g].indexOf(i)&&9===c)return"×";if(-1!==[E,F,h,p,T].indexOf(c))return"×";if(Y(B,e)===f)return"×";if(W(23,f,B,e))return"×";if(W([E,F],d,B,e))return"×";if(W(12,12,B,e))return"×";if(i===l)return"÷";if(23===i||23===c)return"×";if(16===c||16===i)return"÷";if(-1!==[C,g,d].indexOf(c)||14===i)return"×";if(36===a&&-1!==k.indexOf(i))return"×";if(i===T&&36===c)return"×";if(c===H&&-1!==x.concat(H,h,N,D,R,L).indexOf(i))return"×";if(-1!==x.indexOf(c)&&i===N||-1!==x.indexOf(i)&&c===N)return"×";if(i===I&&-1!==[D,R,L].indexOf(c)||-1!==[D,R,L].indexOf(i)&&c===K)return"×";if(-1!==x.indexOf(i)&&-1!==X.indexOf(c)||-1!==X.indexOf(i)&&-1!==x.indexOf(c))return"×";if(-1!==[I,K].indexOf(i)&&(c===N||-1!==[f,g].indexOf(c)&&e[o+1]===N)||-1!==[f,g].indexOf(i)&&c===N||i===N&&-1!==[N,T,p].indexOf(c))return"×";if(-1!==[N,T,p,E,F].indexOf(c))for(var Q=B;Q>=0;){if((u=e[Q])===N)return"×";if(-1===[T,p].indexOf(u))break;Q--}if(-1!==[I,K].indexOf(c))for(Q=-1!==[E,F].indexOf(i)?s:B;Q>=0;){var u;if((u=e[Q])===N)return"×";if(-1===[T,p].indexOf(u))break;Q--}if(b===i&&-1!==[b,S,O,v].indexOf(c)||-1!==[S,O].indexOf(i)&&-1!==[S,M].indexOf(c)||-1!==[M,v].indexOf(i)&&c===M)return"×";if(-1!==G.indexOf(i)&&-1!==[H,K].indexOf(c)||-1!==G.indexOf(c)&&i===I)return"×";if(-1!==x.indexOf(i)&&-1!==x.indexOf(c))return"×";if(i===p&&-1!==x.indexOf(c))return"×";if(-1!==x.concat(N).indexOf(i)&&c===f||-1!==x.concat(N).indexOf(c)&&i===F)return"×";if(41===i&&41===c){for(var w=t[B],U=1;w>0&&41===e[--w];)U++;if(U%2!=0)return"×"}return i===R&&c===L?"×":"÷"},Z=function(A,e){e||(e={lineBreak:"normal",wordBreak:"normal"});var t=function(A,e){void 0===e&&(e="strict");var t=[],r=[],n=[];return A.forEach(function(A,B){var s=P.get(A);if(s>50?(n.push(!0),s-=50):n.push(!1),-1!==["normal","auto","loose"].indexOf(e)&&-1!==[8208,8211,12316,12448].indexOf(A))return r.push(B),t.push(16);if(4===s||11===s){if(0===B)return r.push(B),t.push(m);var o=t[B-1];return-1===J.indexOf(o)?(r.push(r[B-1]),t.push(o)):(r.push(B),t.push(m))}return r.push(B),31===s?t.push("strict"===e?d:D):s===y?t.push(m):29===s?t.push(m):43===s?A>=131072&&A<=196605||A>=196608&&A<=262141?t.push(D):t.push(m):void t.push(s)}),[r,t,n]}(A,e.lineBreak),r=t[0],n=t[1],B=t[2];return"break-all"!==e.wordBreak&&"break-word"!==e.wordBreak||(n=n.map(function(A){return-1!==[N,m,y].indexOf(A)?D:A})),[r,n,"keep-all"===e.wordBreak?B.map(function(e,t){return e&&A[t]>=19968&&A[t]<=40959}):void 0]},j=function(){function A(A,e,t,r){this.codePoints=A,this.required=e===_,this.start=t,this.end=r}return A.prototype.slice=function(){return i.apply(void 0,this.codePoints.slice(this.start,this.end))},A}();!function(A){A[A.STRING_TOKEN=0]="STRING_TOKEN",A[A.BAD_STRING_TOKEN=1]="BAD_STRING_TOKEN",A[A.LEFT_PARENTHESIS_TOKEN=2]="LEFT_PARENTHESIS_TOKEN",A[A.RIGHT_PARENTHESIS_TOKEN=3]="RIGHT_PARENTHESIS_TOKEN",A[A.COMMA_TOKEN=4]="COMMA_TOKEN",A[A.HASH_TOKEN=5]="HASH_TOKEN",A[A.DELIM_TOKEN=6]="DELIM_TOKEN",A[A.AT_KEYWORD_TOKEN=7]="AT_KEYWORD_TOKEN",A[A.PREFIX_MATCH_TOKEN=8]="PREFIX_MATCH_TOKEN",A[A.DASH_MATCH_TOKEN=9]="DASH_MATCH_TOKEN",A[A.INCLUDE_MATCH_TOKEN=10]="INCLUDE_MATCH_TOKEN",A[A.LEFT_CURLY_BRACKET_TOKEN=11]="LEFT_CURLY_BRACKET_TOKEN",A[A.RIGHT_CURLY_BRACKET_TOKEN=12]="RIGHT_CURLY_BRACKET_TOKEN",A[A.SUFFIX_MATCH_TOKEN=13]="SUFFIX_MATCH_TOKEN",A[A.SUBSTRING_MATCH_TOKEN=14]="SUBSTRING_MATCH_TOKEN",A[A.DIMENSION_TOKEN=15]="DIMENSION_TOKEN",A[A.PERCENTAGE_TOKEN=16]="PERCENTAGE_TOKEN",A[A.NUMBER_TOKEN=17]="NUMBER_TOKEN",A[A.FUNCTION=18]="FUNCTION",A[A.FUNCTION_TOKEN=19]="FUNCTION_TOKEN",A[A.IDENT_TOKEN=20]="IDENT_TOKEN",A[A.COLUMN_TOKEN=21]="COLUMN_TOKEN",A[A.URL_TOKEN=22]="URL_TOKEN",A[A.BAD_URL_TOKEN=23]="BAD_URL_TOKEN",A[A.CDC_TOKEN=24]="CDC_TOKEN",A[A.CDO_TOKEN=25]="CDO_TOKEN",A[A.COLON_TOKEN=26]="COLON_TOKEN",A[A.SEMICOLON_TOKEN=27]="SEMICOLON_TOKEN",A[A.LEFT_SQUARE_BRACKET_TOKEN=28]="LEFT_SQUARE_BRACKET_TOKEN",A[A.RIGHT_SQUARE_BRACKET_TOKEN=29]="RIGHT_SQUARE_BRACKET_TOKEN",A[A.UNICODE_RANGE_TOKEN=30]="UNICODE_RANGE_TOKEN",A[A.WHITESPACE_TOKEN=31]="WHITESPACE_TOKEN",A[A.EOF_TOKEN=32]="EOF_TOKEN"}(u||(u={}));var $=function(A){return A>=48&&A<=57},AA=function(A){return $(A)||A>=65&&A<=70||A>=97&&A<=102},eA=function(A){return 10===A||9===A||32===A},tA=function(A){return function(A){return function(A){return A>=97&&A<=122}(A)||function(A){return A>=65&&A<=90}(A)}(A)||function(A){return A>=128}(A)||95===A},rA=function(A){return tA(A)||$(A)||45===A},nA=function(A){return A>=0&&A<=8||11===A||A>=14&&A<=31||127===A},BA=function(A,e){return 92===A&&10!==e},sA=function(A,e,t){return 45===A?tA(e)||BA(e,t):!!tA(A)||!(92!==A||!BA(A,e))},oA=function(A,e,t){return 43===A||45===A?!!$(e)||46===e&&$(t):$(46===A?e:A)},iA={type:u.LEFT_PARENTHESIS_TOKEN},aA={type:u.RIGHT_PARENTHESIS_TOKEN},cA={type:u.COMMA_TOKEN},QA={type:u.SUFFIX_MATCH_TOKEN},uA={type:u.PREFIX_MATCH_TOKEN},wA={type:u.COLUMN_TOKEN},UA={type:u.DASH_MATCH_TOKEN},lA={type:u.INCLUDE_MATCH_TOKEN},CA={type:u.LEFT_CURLY_BRACKET_TOKEN},gA={type:u.RIGHT_CURLY_BRACKET_TOKEN},EA={type:u.SUBSTRING_MATCH_TOKEN},FA={type:u.BAD_URL_TOKEN},hA={type:u.BAD_STRING_TOKEN},HA={type:u.CDO_TOKEN},dA={type:u.CDC_TOKEN},fA={type:u.COLON_TOKEN},pA={type:u.SEMICOLON_TOKEN},NA={type:u.LEFT_SQUARE_BRACKET_TOKEN},KA={type:u.RIGHT_SQUARE_BRACKET_TOKEN},IA={type:u.WHITESPACE_TOKEN},TA={type:u.EOF_TOKEN},mA=function(){function A(){this._value=[]}return A.prototype.write=function(A){this._value=this._value.concat(o(A))},A.prototype.read=function(){for(var A=[],e=this.consumeToken();e!==TA;)A.push(e),e=this.consumeToken();return A},A.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),r=this.peekCodePoint(2);if(rA(e)||BA(t,r)){var n=sA(e,t,r)?2:1,B=this.consumeName();return{type:u.HASH_TOKEN,value:B,flags:n}}break;case 36:if(61===this.peekCodePoint(0))return this.consumeCodePoint(),QA;break;case 39:return this.consumeStringToken(39);case 40:return iA;case 41:return aA;case 42:if(61===this.peekCodePoint(0))return this.consumeCodePoint(),EA;break;case 43:if(oA(A,this.peekCodePoint(0),this.peekCodePoint(1)))return this.reconsumeCodePoint(A),this.consumeNumericToken();break;case 44:return cA;case 45:var s=A,o=this.peekCodePoint(0),a=this.peekCodePoint(1);if(oA(s,o,a))return this.reconsumeCodePoint(A),this.consumeNumericToken();if(sA(s,o,a))return this.reconsumeCodePoint(A),this.consumeIdentLikeToken();if(45===o&&62===a)return this.consumeCodePoint(),this.consumeCodePoint(),dA;break;case 46:if(oA(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 c=this.consumeCodePoint();if(42===c&&47===(c=this.consumeCodePoint()))return this.consumeToken();if(-1===c)return this.consumeToken()}break;case 58:return fA;case 59:return pA;case 60:if(33===this.peekCodePoint(0)&&45===this.peekCodePoint(1)&&45===this.peekCodePoint(2))return this.consumeCodePoint(),this.consumeCodePoint(),HA;break;case 64:var Q=this.peekCodePoint(0),w=this.peekCodePoint(1),U=this.peekCodePoint(2);if(sA(Q,w,U)){B=this.consumeName();return{type:u.AT_KEYWORD_TOKEN,value:B}}break;case 91:return NA;case 92:if(BA(A,this.peekCodePoint(0)))return this.reconsumeCodePoint(A),this.consumeIdentLikeToken();break;case 93:return KA;case 61:if(61===this.peekCodePoint(0))return this.consumeCodePoint(),uA;break;case 123:return CA;case 125:return gA;case 117:case 85:var l=this.peekCodePoint(0),C=this.peekCodePoint(1);return 43!==l||!AA(C)&&63!==C||(this.consumeCodePoint(),this.consumeUnicodeRangeToken()),this.reconsumeCodePoint(A),this.consumeIdentLikeToken();case 124:if(61===this.peekCodePoint(0))return this.consumeCodePoint(),UA;if(124===this.peekCodePoint(0))return this.consumeCodePoint(),wA;break;case 126:if(61===this.peekCodePoint(0))return this.consumeCodePoint(),lA;break;case-1:return TA}return eA(A)?(this.consumeWhiteSpace(),IA):$(A)?(this.reconsumeCodePoint(A),this.consumeNumericToken()):tA(A)?(this.reconsumeCodePoint(A),this.consumeIdentLikeToken()):{type:u.DELIM_TOKEN,value:i(A)}},A.prototype.consumeCodePoint=function(){var A=this._value.shift();return void 0===A?-1:A},A.prototype.reconsumeCodePoint=function(A){this._value.unshift(A)},A.prototype.peekCodePoint=function(A){return A>=this._value.length?-1:this._value[A]},A.prototype.consumeUnicodeRangeToken=function(){for(var A=[],e=this.consumeCodePoint();AA(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){var r=parseInt(i.apply(void 0,A.map(function(A){return 63===A?48:A})),16),n=parseInt(i.apply(void 0,A.map(function(A){return 63===A?70:A})),16);return{type:u.UNICODE_RANGE_TOKEN,start:r,end:n}}var B=parseInt(i.apply(void 0,A),16);if(45===this.peekCodePoint(0)&&AA(this.peekCodePoint(1))){this.consumeCodePoint(),e=this.consumeCodePoint();for(var s=[];AA(e)&&s.length<6;)s.push(e),e=this.consumeCodePoint();n=parseInt(i.apply(void 0,s),16);return{type:u.UNICODE_RANGE_TOKEN,start:B,end:n}}return{type:u.UNICODE_RANGE_TOKEN,start:B,end:B}},A.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:u.FUNCTION_TOKEN,value:A}):{type:u.IDENT_TOKEN,value:A}},A.prototype.consumeUrlToken=function(){var A=[];if(this.consumeWhiteSpace(),-1===this.peekCodePoint(0))return{type:u.URL_TOKEN,value:""};var e=this.peekCodePoint(0);if(39===e||34===e){var t=this.consumeStringToken(this.consumeCodePoint());return t.type===u.STRING_TOKEN&&(this.consumeWhiteSpace(),-1===this.peekCodePoint(0)||41===this.peekCodePoint(0))?(this.consumeCodePoint(),{type:u.URL_TOKEN,value:t.value}):(this.consumeBadUrlRemnants(),FA)}for(;;){var r=this.consumeCodePoint();if(-1===r||41===r)return{type:u.URL_TOKEN,value:i.apply(void 0,A)};if(eA(r))return this.consumeWhiteSpace(),-1===this.peekCodePoint(0)||41===this.peekCodePoint(0)?(this.consumeCodePoint(),{type:u.URL_TOKEN,value:i.apply(void 0,A)}):(this.consumeBadUrlRemnants(),FA);if(34===r||39===r||40===r||nA(r))return this.consumeBadUrlRemnants(),FA;if(92===r){if(!BA(r,this.peekCodePoint(0)))return this.consumeBadUrlRemnants(),FA;A.push(this.consumeEscapedCodePoint())}else A.push(r)}},A.prototype.consumeWhiteSpace=function(){for(;eA(this.peekCodePoint(0));)this.consumeCodePoint()},A.prototype.consumeBadUrlRemnants=function(){for(;;){var A=this.consumeCodePoint();if(41===A||-1===A)return;BA(A,this.peekCodePoint(0))&&this.consumeEscapedCodePoint()}},A.prototype.consumeStringSlice=function(A){for(var e="";A>0;){var t=Math.min(6e4,A);e+=i.apply(void 0,this._value.splice(0,t)),A-=t}return this._value.shift(),e},A.prototype.consumeStringToken=function(A){for(var e="",t=0;;){var r=this._value[t];if(-1===r||void 0===r||r===A)return e+=this.consumeStringSlice(t),{type:u.STRING_TOKEN,value:e};if(10===r)return this._value.splice(0,t),hA;if(92===r){var n=this._value[t+1];-1!==n&&void 0!==n&&(10===n?(e+=this.consumeStringSlice(t),t=-1,this._value.shift()):BA(r,n)&&(e+=this.consumeStringSlice(t),e+=i(this.consumeEscapedCodePoint()),t=-1))}t++}},A.prototype.consumeNumber=function(){var A=[],e=4,t=this.peekCodePoint(0);for(43!==t&&45!==t||A.push(this.consumeCodePoint());$(this.peekCodePoint(0));)A.push(this.consumeCodePoint());t=this.peekCodePoint(0);var r=this.peekCodePoint(1);if(46===t&&$(r))for(A.push(this.consumeCodePoint(),this.consumeCodePoint()),e=8;$(this.peekCodePoint(0));)A.push(this.consumeCodePoint());t=this.peekCodePoint(0),r=this.peekCodePoint(1);var n=this.peekCodePoint(2);if((69===t||101===t)&&((43===r||45===r)&&$(n)||$(r)))for(A.push(this.consumeCodePoint(),this.consumeCodePoint()),e=8;$(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 r=[];$(A[e]);)r.push(A[e++]);var n=r.length?parseInt(i.apply(void 0,r),10):0;46===A[e]&&e++;for(var B=[];$(A[e]);)B.push(A[e++]);var s=B.length,o=s?parseInt(i.apply(void 0,B),10):0;69!==A[e]&&101!==A[e]||e++;var a=1;43!==A[e]&&45!==A[e]||(45===A[e]&&(a=-1),e++);for(var c=[];$(A[e]);)c.push(A[e++]);var Q=c.length?parseInt(i.apply(void 0,c),10):0;return t*(n+o*Math.pow(10,-s))*Math.pow(10,a*Q)}(A),e]},A.prototype.consumeNumericToken=function(){var A=this.consumeNumber(),e=A[0],t=A[1],r=this.peekCodePoint(0),n=this.peekCodePoint(1),B=this.peekCodePoint(2);if(sA(r,n,B)){var s=this.consumeName();return{type:u.DIMENSION_TOKEN,number:e,flags:t,unit:s}}return 37===r?(this.consumeCodePoint(),{type:u.PERCENTAGE_TOKEN,number:e,flags:t}):{type:u.NUMBER_TOKEN,number:e,flags:t}},A.prototype.consumeEscapedCodePoint=function(){var A=this.consumeCodePoint();if(AA(A)){for(var e=i(A);AA(this.peekCodePoint(0))&&e.length<6;)e+=i(this.consumeCodePoint());eA(this.peekCodePoint(0))&&this.consumeCodePoint();var t=parseInt(e,16);return 0===t||function(A){return A>=55296&&A<=57343}(t)||t>1114111?65533:t}return-1===A?65533:A},A.prototype.consumeName=function(){for(var A="";;){var e=this.consumeCodePoint();if(rA(e))A+=i(e);else{if(!BA(e,this.peekCodePoint(0)))return this.reconsumeCodePoint(e),A;A+=i(this.consumeEscapedCodePoint())}}},A}(),RA=function(){function A(A){this._tokens=A}return A.create=function(e){var t=new mA;return t.write(e),new A(t.read())},A.parseValue=function(e){return A.create(e).parseComponentValue()},A.parseValues=function(e){return A.create(e).parseComponentValues()},A.prototype.parseComponentValue=function(){for(var A=this.consumeToken();A.type===u.WHITESPACE_TOKEN;)A=this.consumeToken();if(A.type===u.EOF_TOKEN)throw new SyntaxError("Error parsing CSS component value, unexpected EOF");this.reconsumeToken(A);var e=this.consumeComponentValue();do{A=this.consumeToken()}while(A.type===u.WHITESPACE_TOKEN);if(A.type===u.EOF_TOKEN)return e;throw new SyntaxError("Error parsing CSS component value, multiple values found when expecting only one")},A.prototype.parseComponentValues=function(){for(var A=[];;){var e=this.consumeComponentValue();if(e.type===u.EOF_TOKEN)return A;A.push(e),A.push()}},A.prototype.consumeComponentValue=function(){var A=this.consumeToken();switch(A.type){case u.LEFT_CURLY_BRACKET_TOKEN:case u.LEFT_SQUARE_BRACKET_TOKEN:case u.LEFT_PARENTHESIS_TOKEN:return this.consumeSimpleBlock(A.type);case u.FUNCTION_TOKEN:return this.consumeFunction(A)}return A},A.prototype.consumeSimpleBlock=function(A){for(var e={type:A,values:[]},t=this.consumeToken();;){if(t.type===u.EOF_TOKEN||_A(t,A))return e;this.reconsumeToken(t),e.values.push(this.consumeComponentValue()),t=this.consumeToken()}},A.prototype.consumeFunction=function(A){for(var e={name:A.value,values:[],type:u.FUNCTION};;){var t=this.consumeToken();if(t.type===u.EOF_TOKEN||t.type===u.RIGHT_PARENTHESIS_TOKEN)return e;this.reconsumeToken(t),e.values.push(this.consumeComponentValue())}},A.prototype.consumeToken=function(){var A=this._tokens.shift();return void 0===A?TA:A},A.prototype.reconsumeToken=function(A){this._tokens.unshift(A)},A}(),LA=function(A){return A.type===u.DIMENSION_TOKEN},OA=function(A){return A.type===u.NUMBER_TOKEN},vA=function(A){return A.type===u.IDENT_TOKEN},DA=function(A){return A.type===u.STRING_TOKEN},bA=function(A,e){return vA(A)&&A.value===e},SA=function(A){return A.type!==u.WHITESPACE_TOKEN},MA=function(A){return A.type!==u.WHITESPACE_TOKEN&&A.type!==u.COMMA_TOKEN},yA=function(A){var e=[],t=[];return A.forEach(function(A){if(A.type===u.COMMA_TOKEN){if(0===t.length)throw new Error("Error parsing function args, zero tokens for arg");return e.push(t),void(t=[])}A.type!==u.WHITESPACE_TOKEN&&t.push(A)}),t.length&&e.push(t),e},_A=function(A,e){return e===u.LEFT_CURLY_BRACKET_TOKEN&&A.type===u.RIGHT_CURLY_BRACKET_TOKEN||(e===u.LEFT_SQUARE_BRACKET_TOKEN&&A.type===u.RIGHT_SQUARE_BRACKET_TOKEN||e===u.LEFT_PARENTHESIS_TOKEN&&A.type===u.RIGHT_PARENTHESIS_TOKEN)},PA=function(A){return A.type===u.NUMBER_TOKEN||A.type===u.DIMENSION_TOKEN},xA=function(A){return A.type===u.PERCENTAGE_TOKEN||PA(A)},VA=function(A){return A.length>1?[A[0],A[1]]:[A[0]]},zA={type:u.NUMBER_TOKEN,number:0,flags:4},XA={type:u.PERCENTAGE_TOKEN,number:50,flags:4},JA={type:u.PERCENTAGE_TOKEN,number:100,flags:4},GA=function(A,e,t){var r=A[0],n=A[1];return[kA(r,e),kA(void 0!==n?n:r,t)]},kA=function(A,e){if(A.type===u.PERCENTAGE_TOKEN)return A.number/100*e;if(LA(A))switch(A.unit){case"rem":case"em":return 16*A.number;case"px":default:return A.number}return A.number},WA=function(A){if(A.type===u.DIMENSION_TOKEN)switch(A.unit){case"deg":return Math.PI*A.number/180;case"grad":return Math.PI/200*A.number;case"rad":return A.number;case"turn":return 2*Math.PI*A.number}throw new Error("Unsupported angle type")},YA=function(A){return A.type===u.DIMENSION_TOKEN&&("deg"===A.unit||"grad"===A.unit||"rad"===A.unit||"turn"===A.unit)},qA=function(A){switch(A.filter(vA).map(function(A){return A.value}).join(" ")){case"to bottom right":case"to right bottom":case"left top":case"top left":return[zA,zA];case"to top":case"bottom":return ZA(0);case"to bottom left":case"to left bottom":case"right top":case"top right":return[zA,JA];case"to right":case"left":return ZA(90);case"to top left":case"to left top":case"right bottom":case"bottom right":return[JA,JA];case"to bottom":case"top":return ZA(180);case"to top right":case"to right top":case"left bottom":case"bottom left":return[JA,zA];case"to left":case"right":return ZA(270)}return 0},ZA=function(A){return Math.PI*A/180},jA=function(A){if(A.type===u.FUNCTION){var e=ie[A.name];if(void 0===e)throw new Error('Attempting to parse an unsupported color function "'+A.name+'"');return e(A.values)}if(A.type===u.HASH_TOKEN){if(3===A.value.length){var t=A.value.substring(0,1),r=A.value.substring(1,2),n=A.value.substring(2,3);return ee(parseInt(t+t,16),parseInt(r+r,16),parseInt(n+n,16),1)}if(4===A.value.length){t=A.value.substring(0,1),r=A.value.substring(1,2),n=A.value.substring(2,3);var B=A.value.substring(3,4);return ee(parseInt(t+t,16),parseInt(r+r,16),parseInt(n+n,16),parseInt(B+B,16)/255)}if(6===A.value.length){t=A.value.substring(0,2),r=A.value.substring(2,4),n=A.value.substring(4,6);return ee(parseInt(t,16),parseInt(r,16),parseInt(n,16),1)}if(8===A.value.length){t=A.value.substring(0,2),r=A.value.substring(2,4),n=A.value.substring(4,6),B=A.value.substring(6,8);return ee(parseInt(t,16),parseInt(r,16),parseInt(n,16),parseInt(B,16)/255)}}if(A.type===u.IDENT_TOKEN){var s=ae[A.value.toUpperCase()];if(void 0!==s)return s}return ae.TRANSPARENT},$A=function(A){return 0==(255&A)},Ae=function(A){var e=255&A,t=255&A>>8,r=255&A>>16,n=255&A>>24;return e<255?"rgba("+n+","+r+","+t+","+e/255+")":"rgb("+n+","+r+","+t+")"},ee=function(A,e,t,r){return(A<<24|e<<16|t<<8|Math.round(255*r)<<0)>>>0},te=function(A,e){if(A.type===u.NUMBER_TOKEN)return A.number;if(A.type===u.PERCENTAGE_TOKEN){var t=3===e?1:255;return 3===e?A.number/100*t:Math.round(A.number/100*t)}return 0},re=function(A){var e=A.filter(MA);if(3===e.length){var t=e.map(te),r=t[0],n=t[1],B=t[2];return ee(r,n,B,1)}if(4===e.length){var s=e.map(te),o=(r=s[0],n=s[1],B=s[2],s[3]);return ee(r,n,B,o)}return 0};function ne(A,e,t){return t<0&&(t+=1),t>=1&&(t-=1),t<1/6?(e-A)*t*6+A:t<.5?e:t<2/3?6*(e-A)*(2/3-t)+A:A}var Be,se,oe=function(A){var e=A.filter(MA),t=e[0],r=e[1],n=e[2],B=e[3],s=(t.type===u.NUMBER_TOKEN?ZA(t.number):WA(t))/(2*Math.PI),o=xA(r)?r.number/100:0,i=xA(n)?n.number/100:0,a=void 0!==B&&xA(B)?kA(B,1):1;if(0===o)return ee(255*i,255*i,255*i,1);var c=i<=.5?i*(o+1):i+o-i*o,Q=2*i-c,w=ne(Q,c,s+1/3),U=ne(Q,c,s),l=ne(Q,c,s-1/3);return ee(255*w,255*U,255*l,a)},ie={hsl:oe,hsla:oe,rgb:re,rgba:re},ae={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};!function(A){A[A.VALUE=0]="VALUE",A[A.LIST=1]="LIST",A[A.IDENT_VALUE=2]="IDENT_VALUE",A[A.TYPE_VALUE=3]="TYPE_VALUE",A[A.TOKEN_VALUE=4]="TOKEN_VALUE"}(Be||(Be={})),function(A){A[A.BORDER_BOX=0]="BORDER_BOX",A[A.PADDING_BOX=1]="PADDING_BOX",A[A.CONTENT_BOX=2]="CONTENT_BOX"}(se||(se={}));var ce,Qe={name:"background-clip",initialValue:"border-box",prefix:!1,type:Be.LIST,parse:function(A){return A.map(function(A){if(vA(A))switch(A.value){case"padding-box":return se.PADDING_BOX;case"content-box":return se.CONTENT_BOX}return se.BORDER_BOX})}},ue={name:"background-color",initialValue:"transparent",prefix:!1,type:Be.TYPE_VALUE,format:"color"},we=function(A){var e=jA(A[0]),t=A[1];return t&&xA(t)?{color:e,stop:t}:{color:e,stop:null}},Ue=function(A,e){var t=A[0],r=A[A.length-1];null===t.stop&&(t.stop=zA),null===r.stop&&(r.stop=JA);for(var n=[],B=0,s=0;sB?n.push(i):n.push(B),B=i}else n.push(null)}var a=null;for(s=0;sA.optimumDistance)?{optimumCorner:e,optimumDistance:o}:A},{optimumDistance:n?1/0:-1/0,optimumCorner:null}).optimumCorner},Ee=function(A){var e=ZA(180),t=[];return yA(A).forEach(function(A,r){if(0===r){var n=A[0];if(n.type===u.IDENT_TOKEN&&-1!==["top","left","right","bottom"].indexOf(n.value))return void(e=qA(A));if(YA(n))return void(e=(WA(n)+ZA(270))%ZA(360))}var B=we(A);t.push(B)}),{angle:e,stops:t,type:ce.LINEAR_GRADIENT}},Fe=function(A){return 0===A[0]&&255===A[1]&&0===A[2]&&255===A[3]},he=function(A,e,t,r,n){var B="http://www.w3.org/2000/svg",s=document.createElementNS(B,"svg"),o=document.createElementNS(B,"foreignObject");return s.setAttributeNS(null,"width",A.toString()),s.setAttributeNS(null,"height",e.toString()),o.setAttributeNS(null,"width","100%"),o.setAttributeNS(null,"height","100%"),o.setAttributeNS(null,"x",t.toString()),o.setAttributeNS(null,"y",r.toString()),o.setAttributeNS(null,"externalResourcesRequired","true"),s.appendChild(o),o.appendChild(n),s},He=function(A){return new Promise(function(e,t){var r=new Image;r.onload=function(){return e(r)},r.onerror=t,r.src="data:image/svg+xml;charset=utf-8,"+encodeURIComponent((new XMLSerializer).serializeToString(A))})},de={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);var r=e.getBoundingClientRect(),n=Math.round(r.height);if(A.body.removeChild(t),123===n)return!0}}return!1}(document);return Object.defineProperty(de,"SUPPORT_RANGE_BOUNDS",{value:A}),A},get SUPPORT_SVG_DRAWING(){var A=function(A){var e=new Image,t=A.createElement("canvas"),r=t.getContext("2d");if(!r)return!1;e.src="data:image/svg+xml,";try{r.drawImage(e,0,0),t.toDataURL()}catch(A){return!1}return!0}(document);return Object.defineProperty(de,"SUPPORT_SVG_DRAWING",{value:A}),A},get SUPPORT_FOREIGNOBJECT_DRAWING(){var A="function"==typeof Array.from&&"function"==typeof window.fetch?function(A){var e=A.createElement("canvas");e.width=100,e.height=100;var t=e.getContext("2d");if(!t)return Promise.reject(!1);t.fillStyle="rgb(0, 255, 0)",t.fillRect(0,0,100,100);var r=new Image,n=e.toDataURL();r.src=n;var B=he(100,100,0,0,r);return t.fillStyle="red",t.fillRect(0,0,100,100),He(B).then(function(e){t.drawImage(e,0,0);var r=t.getImageData(0,0,100,100).data;t.fillStyle="red",t.fillRect(0,0,100,100);var B=A.createElement("div");return B.style.backgroundImage="url("+n+")",B.style.height="100px",Fe(r)?He(he(100,100,0,0,B)):Promise.reject(!1)}).then(function(A){return t.drawImage(A,0,0),Fe(t.getImageData(0,0,100,100).data)}).catch(function(){return!1})}(document):Promise.resolve(!1);return Object.defineProperty(de,"SUPPORT_FOREIGNOBJECT_DRAWING",{value:A}),A},get SUPPORT_CORS_IMAGES(){var A=void 0!==(new Image).crossOrigin;return Object.defineProperty(de,"SUPPORT_CORS_IMAGES",{value:A}),A},get SUPPORT_RESPONSE_TYPE(){var A="string"==typeof(new XMLHttpRequest).responseType;return Object.defineProperty(de,"SUPPORT_RESPONSE_TYPE",{value:A}),A},get SUPPORT_CORS_XHR(){var A="withCredentials"in new XMLHttpRequest;return Object.defineProperty(de,"SUPPORT_CORS_XHR",{value:A}),A}},fe=function(){function A(A){var e=A.id,t=A.enabled;this.id=e,this.enabled=t,this.start=Date.now()}return A.prototype.debug=function(){for(var A=[],e=0;e0&&setTimeout(function(){return e("Timed out ("+s._options.imageTimeout+"ms) loading image")},s._options.imageTimeout)})];case 3:return[2,n.sent()]}})})},A.prototype.has=function(A){return void 0!==this._cache[A]},A.prototype.keys=function(){return Promise.resolve(Object.keys(this._cache))},A.prototype.proxy=function(A){var e=this,t=this._options.proxy;if(!t)throw new Error("No proxy defined");var r=A.substring(0,256);return new Promise(function(n,B){var s=de.SUPPORT_RESPONSE_TYPE?"blob":"text",o=new XMLHttpRequest;if(o.onload=function(){if(200===o.status)if("text"===s)n(o.response);else{var A=new FileReader;A.addEventListener("load",function(){return n(A.result)},!1),A.addEventListener("error",function(A){return B(A)},!1),A.readAsDataURL(o.response)}else B("Failed to proxy resource "+r+" with status code "+o.status)},o.onerror=B,o.open("GET",t+"?url="+encodeURIComponent(A)+"&responseType="+s),"text"!==s&&o instanceof XMLHttpRequest&&(o.responseType=s),e._options.imageTimeout){var i=e._options.imageTimeout;o.timeout=i,o.ontimeout=function(){return B("Timed out ("+i+"ms) proxying "+r)}}o.send()})},A}(),Ke=/^data:image\/svg\+xml/i,Ie=/^data:image\/.*;base64,/i,Te=/^data:image\/.*/i,me=function(A){return de.SUPPORT_SVG_DRAWING||!ve(A)},Re=function(A){return Te.test(A)},Le=function(A){return Ie.test(A)},Oe=function(A){return"blob"===A.substr(0,4)},ve=function(A){return"svg"===A.substr(-3).toLowerCase()||Ke.test(A)},De=function(A){var e=be.CIRCLE,t=Se.FARTHEST_CORNER,r=[],n=[];return yA(A).forEach(function(A,B){var s=!0;if(0===B?s=A.reduce(function(A,e){if(vA(e))switch(e.value){case"center":return n.push(XA),!1;case"top":case"left":return n.push(zA),!1;case"right":case"bottom":return n.push(JA),!1}else if(xA(e)||PA(e))return n.push(e),!1;return A},s):1===B&&(s=A.reduce(function(A,r){if(vA(r))switch(r.value){case"circle":return e=be.CIRCLE,!1;case"ellipse":return e=be.ELLIPSE,!1;case"contain":case"closest-side":return t=Se.CLOSEST_SIDE,!1;case"farthest-side":return t=Se.FARTHEST_SIDE,!1;case"closest-corner":return t=Se.CLOSEST_CORNER,!1;case"cover":case"farthest-corner":return t=Se.FARTHEST_CORNER,!1}else if(PA(r)||xA(r))return Array.isArray(t)||(t=[]),t.push(r),!1;return A},s)),s){var o=we(A);r.push(o)}}),{size:t,shape:e,stops:r,position:n,type:ce.RADIAL_GRADIENT}};!function(A){A[A.URL=0]="URL",A[A.LINEAR_GRADIENT=1]="LINEAR_GRADIENT",A[A.RADIAL_GRADIENT=2]="RADIAL_GRADIENT"}(ce||(ce={}));var be,Se;!function(A){A[A.CIRCLE=0]="CIRCLE",A[A.ELLIPSE=1]="ELLIPSE"}(be||(be={})),function(A){A[A.CLOSEST_SIDE=0]="CLOSEST_SIDE",A[A.FARTHEST_SIDE=1]="FARTHEST_SIDE",A[A.CLOSEST_CORNER=2]="CLOSEST_CORNER",A[A.FARTHEST_CORNER=3]="FARTHEST_CORNER"}(Se||(Se={}));var Me=function(A){if(A.type===u.URL_TOKEN){var e={url:A.value,type:ce.URL};return pe.getInstance().addImage(A.value),e}if(A.type===u.FUNCTION){var t=_e[A.name];if(void 0===t)throw new Error('Attempting to parse an unsupported image function "'+A.name+'"');return t(A.values)}throw new Error("Unsupported image type")};var ye,_e={"linear-gradient":function(A){var e=ZA(180),t=[];return yA(A).forEach(function(A,r){if(0===r){var n=A[0];if(n.type===u.IDENT_TOKEN&&"to"===n.value)return void(e=qA(A));if(YA(n))return void(e=WA(n))}var B=we(A);t.push(B)}),{angle:e,stops:t,type:ce.LINEAR_GRADIENT}},"-moz-linear-gradient":Ee,"-ms-linear-gradient":Ee,"-o-linear-gradient":Ee,"-webkit-linear-gradient":Ee,"radial-gradient":function(A){var e=be.CIRCLE,t=Se.FARTHEST_CORNER,r=[],n=[];return yA(A).forEach(function(A,B){var s=!0;if(0===B){var o=!1;s=A.reduce(function(A,r){if(o)if(vA(r))switch(r.value){case"center":return n.push(XA),A;case"top":case"left":return n.push(zA),A;case"right":case"bottom":return n.push(JA),A}else(xA(r)||PA(r))&&n.push(r);else if(vA(r))switch(r.value){case"circle":return e=be.CIRCLE,!1;case"ellipse":return e=be.ELLIPSE,!1;case"at":return o=!0,!1;case"closest-side":return t=Se.CLOSEST_SIDE,!1;case"cover":case"farthest-side":return t=Se.FARTHEST_SIDE,!1;case"contain":case"closest-corner":return t=Se.CLOSEST_CORNER,!1;case"farthest-corner":return t=Se.FARTHEST_CORNER,!1}else if(PA(r)||xA(r))return Array.isArray(t)||(t=[]),t.push(r),!1;return A},s)}if(s){var i=we(A);r.push(i)}}),{size:t,shape:e,stops:r,position:n,type:ce.RADIAL_GRADIENT}},"-moz-radial-gradient":De,"-ms-radial-gradient":De,"-o-radial-gradient":De,"-webkit-radial-gradient":De,"-webkit-gradient":function(A){var e=ZA(180),t=[],r=ce.LINEAR_GRADIENT,n=be.CIRCLE,B=Se.FARTHEST_CORNER;return yA(A).forEach(function(A,e){var n=A[0];if(0===e){if(vA(n)&&"linear"===n.value)return void(r=ce.LINEAR_GRADIENT);if(vA(n)&&"radial"===n.value)return void(r=ce.RADIAL_GRADIENT)}if(n.type===u.FUNCTION)if("from"===n.name){var B=jA(n.values[0]);t.push({stop:zA,color:B})}else if("to"===n.name)B=jA(n.values[0]),t.push({stop:JA,color:B});else if("color-stop"===n.name){var s=n.values.filter(MA);if(2===s.length){B=jA(s[1]);var o=s[0];OA(o)&&t.push({stop:{type:u.PERCENTAGE_TOKEN,number:100*o.number,flags:o.flags},color:B})}}}),r===ce.LINEAR_GRADIENT?{angle:(e+ZA(180))%ZA(360),stops:t,type:r}:{size:B,shape:n,stops:t,position:[],type:r}}},Pe={name:"background-image",initialValue:"none",type:Be.LIST,prefix:!1,parse:function(A){if(0===A.length)return[];var e=A[0];return e.type===u.IDENT_TOKEN&&"none"===e.value?[]:A.filter(function(A){return MA(A)&&function(A){return A.type!==u.FUNCTION||_e[A.name]}(A)}).map(Me)}},xe={name:"background-origin",initialValue:"border-box",prefix:!1,type:Be.LIST,parse:function(A){return A.map(function(A){if(vA(A))switch(A.value){case"padding-box":return 1;case"content-box":return 2}return 0})}},Ve={name:"background-position",initialValue:"0% 0%",type:Be.LIST,prefix:!1,parse:function(A){return yA(A).map(function(A){return A.filter(xA)}).map(VA)}};!function(A){A[A.REPEAT=0]="REPEAT",A[A.NO_REPEAT=1]="NO_REPEAT",A[A.REPEAT_X=2]="REPEAT_X",A[A.REPEAT_Y=3]="REPEAT_Y"}(ye||(ye={}));var ze,Xe={name:"background-repeat",initialValue:"repeat",prefix:!1,type:Be.LIST,parse:function(A){return yA(A).map(function(A){return A.filter(vA).map(function(A){return A.value}).join(" ")}).map(Je)}},Je=function(A){switch(A){case"no-repeat":return ye.NO_REPEAT;case"repeat-x":case"repeat no-repeat":return ye.REPEAT_X;case"repeat-y":case"no-repeat repeat":return ye.REPEAT_Y;case"repeat":default:return ye.REPEAT}};!function(A){A.AUTO="auto",A.CONTAIN="contain",A.COVER="cover"}(ze||(ze={}));var Ge,ke={name:"background-size",initialValue:"0",prefix:!1,type:Be.LIST,parse:function(A){return yA(A).map(function(A){return A.filter(We)})}},We=function(A){return vA(A)||xA(A)},Ye=function(A){return{name:"border-"+A+"-color",initialValue:"transparent",prefix:!1,type:Be.TYPE_VALUE,format:"color"}},qe=Ye("top"),Ze=Ye("right"),je=Ye("bottom"),$e=Ye("left"),At=function(A){return{name:"border-radius-"+A,initialValue:"0 0",prefix:!1,type:Be.LIST,parse:function(A){return VA(A.filter(xA))}}},et=At("top-left"),tt=At("top-right"),rt=At("bottom-right"),nt=At("bottom-left");!function(A){A[A.NONE=0]="NONE",A[A.SOLID=1]="SOLID"}(Ge||(Ge={}));var Bt,st=function(A){return{name:"border-"+A+"-style",initialValue:"solid",prefix:!1,type:Be.IDENT_VALUE,parse:function(A){switch(A){case"none":return Ge.NONE}return Ge.SOLID}}},ot=st("top"),it=st("right"),at=st("bottom"),ct=st("left"),Qt=function(A){return{name:"border-"+A+"-width",initialValue:"0",type:Be.VALUE,prefix:!1,parse:function(A){return LA(A)?A.number:0}}},ut=Qt("top"),wt=Qt("right"),Ut=Qt("bottom"),lt=Qt("left"),Ct={name:"color",initialValue:"transparent",prefix:!1,type:Be.TYPE_VALUE,format:"color"},gt={name:"display",initialValue:"inline-block",prefix:!1,type:Be.LIST,parse:function(A){return A.filter(vA).reduce(function(A,e){return A|Et(e.value)},0)}},Et=function(A){switch(A){case"block":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};!function(A){A[A.NONE=0]="NONE",A[A.LEFT=1]="LEFT",A[A.RIGHT=2]="RIGHT",A[A.INLINE_START=3]="INLINE_START",A[A.INLINE_END=4]="INLINE_END"}(Bt||(Bt={}));var Ft,ht={name:"float",initialValue:"none",prefix:!1,type:Be.IDENT_VALUE,parse:function(A){switch(A){case"left":return Bt.LEFT;case"right":return Bt.RIGHT;case"inline-start":return Bt.INLINE_START;case"inline-end":return Bt.INLINE_END}return Bt.NONE}},Ht={name:"letter-spacing",initialValue:"0",prefix:!1,type:Be.VALUE,parse:function(A){return A.type===u.IDENT_TOKEN&&"normal"===A.value?0:A.type===u.NUMBER_TOKEN?A.number:A.type===u.DIMENSION_TOKEN?A.number:0}};!function(A){A.NORMAL="normal",A.STRICT="strict"}(Ft||(Ft={}));var dt,ft={name:"line-break",initialValue:"normal",prefix:!1,type:Be.IDENT_VALUE,parse:function(A){switch(A){case"strict":return Ft.STRICT;case"normal":default:return Ft.NORMAL}}},pt={name:"line-height",initialValue:"normal",prefix:!1,type:Be.TOKEN_VALUE},Nt={name:"list-style-image",initialValue:"none",type:Be.VALUE,prefix:!1,parse:function(A){return A.type===u.IDENT_TOKEN&&"none"===A.value?null:Me(A)}};!function(A){A[A.INSIDE=0]="INSIDE",A[A.OUTSIDE=1]="OUTSIDE"}(dt||(dt={}));var Kt,It={name:"list-style-position",initialValue:"outside",prefix:!1,type:Be.IDENT_VALUE,parse:function(A){switch(A){case"inside":return dt.INSIDE;case"outside":default:return dt.OUTSIDE}}};!function(A){A[A.NONE=-1]="NONE",A[A.DISC=0]="DISC",A[A.CIRCLE=1]="CIRCLE",A[A.SQUARE=2]="SQUARE",A[A.DECIMAL=3]="DECIMAL",A[A.CJK_DECIMAL=4]="CJK_DECIMAL",A[A.DECIMAL_LEADING_ZERO=5]="DECIMAL_LEADING_ZERO",A[A.LOWER_ROMAN=6]="LOWER_ROMAN",A[A.UPPER_ROMAN=7]="UPPER_ROMAN",A[A.LOWER_GREEK=8]="LOWER_GREEK",A[A.LOWER_ALPHA=9]="LOWER_ALPHA",A[A.UPPER_ALPHA=10]="UPPER_ALPHA",A[A.ARABIC_INDIC=11]="ARABIC_INDIC",A[A.ARMENIAN=12]="ARMENIAN",A[A.BENGALI=13]="BENGALI",A[A.CAMBODIAN=14]="CAMBODIAN",A[A.CJK_EARTHLY_BRANCH=15]="CJK_EARTHLY_BRANCH",A[A.CJK_HEAVENLY_STEM=16]="CJK_HEAVENLY_STEM",A[A.CJK_IDEOGRAPHIC=17]="CJK_IDEOGRAPHIC",A[A.DEVANAGARI=18]="DEVANAGARI",A[A.ETHIOPIC_NUMERIC=19]="ETHIOPIC_NUMERIC",A[A.GEORGIAN=20]="GEORGIAN",A[A.GUJARATI=21]="GUJARATI",A[A.GURMUKHI=22]="GURMUKHI",A[A.HEBREW=22]="HEBREW",A[A.HIRAGANA=23]="HIRAGANA",A[A.HIRAGANA_IROHA=24]="HIRAGANA_IROHA",A[A.JAPANESE_FORMAL=25]="JAPANESE_FORMAL",A[A.JAPANESE_INFORMAL=26]="JAPANESE_INFORMAL",A[A.KANNADA=27]="KANNADA",A[A.KATAKANA=28]="KATAKANA",A[A.KATAKANA_IROHA=29]="KATAKANA_IROHA",A[A.KHMER=30]="KHMER",A[A.KOREAN_HANGUL_FORMAL=31]="KOREAN_HANGUL_FORMAL",A[A.KOREAN_HANJA_FORMAL=32]="KOREAN_HANJA_FORMAL",A[A.KOREAN_HANJA_INFORMAL=33]="KOREAN_HANJA_INFORMAL",A[A.LAO=34]="LAO",A[A.LOWER_ARMENIAN=35]="LOWER_ARMENIAN",A[A.MALAYALAM=36]="MALAYALAM",A[A.MONGOLIAN=37]="MONGOLIAN",A[A.MYANMAR=38]="MYANMAR",A[A.ORIYA=39]="ORIYA",A[A.PERSIAN=40]="PERSIAN",A[A.SIMP_CHINESE_FORMAL=41]="SIMP_CHINESE_FORMAL",A[A.SIMP_CHINESE_INFORMAL=42]="SIMP_CHINESE_INFORMAL",A[A.TAMIL=43]="TAMIL",A[A.TELUGU=44]="TELUGU",A[A.THAI=45]="THAI",A[A.TIBETAN=46]="TIBETAN",A[A.TRAD_CHINESE_FORMAL=47]="TRAD_CHINESE_FORMAL",A[A.TRAD_CHINESE_INFORMAL=48]="TRAD_CHINESE_INFORMAL",A[A.UPPER_ARMENIAN=49]="UPPER_ARMENIAN",A[A.DISCLOSURE_OPEN=50]="DISCLOSURE_OPEN",A[A.DISCLOSURE_CLOSED=51]="DISCLOSURE_CLOSED"}(Kt||(Kt={}));var Tt,mt={name:"list-style-type",initialValue:"none",prefix:!1,type:Be.IDENT_VALUE,parse:function(A){switch(A){case"disc":return Kt.DISC;case"circle":return Kt.CIRCLE;case"square":return Kt.SQUARE;case"decimal":return Kt.DECIMAL;case"cjk-decimal":return Kt.CJK_DECIMAL;case"decimal-leading-zero":return Kt.DECIMAL_LEADING_ZERO;case"lower-roman":return Kt.LOWER_ROMAN;case"upper-roman":return Kt.UPPER_ROMAN;case"lower-greek":return Kt.LOWER_GREEK;case"lower-alpha":return Kt.LOWER_ALPHA;case"upper-alpha":return Kt.UPPER_ALPHA;case"arabic-indic":return Kt.ARABIC_INDIC;case"armenian":return Kt.ARMENIAN;case"bengali":return Kt.BENGALI;case"cambodian":return Kt.CAMBODIAN;case"cjk-earthly-branch":return Kt.CJK_EARTHLY_BRANCH;case"cjk-heavenly-stem":return Kt.CJK_HEAVENLY_STEM;case"cjk-ideographic":return Kt.CJK_IDEOGRAPHIC;case"devanagari":return Kt.DEVANAGARI;case"ethiopic-numeric":return Kt.ETHIOPIC_NUMERIC;case"georgian":return Kt.GEORGIAN;case"gujarati":return Kt.GUJARATI;case"gurmukhi":return Kt.GURMUKHI;case"hebrew":return Kt.HEBREW;case"hiragana":return Kt.HIRAGANA;case"hiragana-iroha":return Kt.HIRAGANA_IROHA;case"japanese-formal":return Kt.JAPANESE_FORMAL;case"japanese-informal":return Kt.JAPANESE_INFORMAL;case"kannada":return Kt.KANNADA;case"katakana":return Kt.KATAKANA;case"katakana-iroha":return Kt.KATAKANA_IROHA;case"khmer":return Kt.KHMER;case"korean-hangul-formal":return Kt.KOREAN_HANGUL_FORMAL;case"korean-hanja-formal":return Kt.KOREAN_HANJA_FORMAL;case"korean-hanja-informal":return Kt.KOREAN_HANJA_INFORMAL;case"lao":return Kt.LAO;case"lower-armenian":return Kt.LOWER_ARMENIAN;case"malayalam":return Kt.MALAYALAM;case"mongolian":return Kt.MONGOLIAN;case"myanmar":return Kt.MYANMAR;case"oriya":return Kt.ORIYA;case"persian":return Kt.PERSIAN;case"simp-chinese-formal":return Kt.SIMP_CHINESE_FORMAL;case"simp-chinese-informal":return Kt.SIMP_CHINESE_INFORMAL;case"tamil":return Kt.TAMIL;case"telugu":return Kt.TELUGU;case"thai":return Kt.THAI;case"tibetan":return Kt.TIBETAN;case"trad-chinese-formal":return Kt.TRAD_CHINESE_FORMAL;case"trad-chinese-informal":return Kt.TRAD_CHINESE_INFORMAL;case"upper-armenian":return Kt.UPPER_ARMENIAN;case"disclosure-open":return Kt.DISCLOSURE_OPEN;case"disclosure-closed":return Kt.DISCLOSURE_CLOSED;case"none":default:return Kt.NONE}}},Rt=function(A){return{name:"margin-"+A,initialValue:"0",prefix:!1,type:Be.TOKEN_VALUE}},Lt=Rt("top"),Ot=Rt("right"),vt=Rt("bottom"),Dt=Rt("left");!function(A){A[A.VISIBLE=0]="VISIBLE",A[A.HIDDEN=1]="HIDDEN",A[A.SCROLL=2]="SCROLL",A[A.AUTO=3]="AUTO"}(Tt||(Tt={}));var bt,St={name:"overflow",initialValue:"visible",prefix:!1,type:Be.LIST,parse:function(A){return A.filter(vA).map(function(A){switch(A.value){case"hidden":return Tt.HIDDEN;case"scroll":return Tt.SCROLL;case"auto":return Tt.AUTO;case"visible":default:return Tt.VISIBLE}})}};!function(A){A.NORMAL="normal",A.BREAK_WORD="break-word"}(bt||(bt={}));var Mt,yt={name:"overflow-wrap",initialValue:"normal",prefix:!1,type:Be.IDENT_VALUE,parse:function(A){switch(A){case"break-word":return bt.BREAK_WORD;case"normal":default:return bt.NORMAL}}},_t=function(A){return{name:"padding-"+A,initialValue:"0",prefix:!1,type:Be.TYPE_VALUE,format:"length-percentage"}},Pt=_t("top"),xt=_t("right"),Vt=_t("bottom"),zt=_t("left");!function(A){A[A.LEFT=0]="LEFT",A[A.CENTER=1]="CENTER",A[A.RIGHT=2]="RIGHT"}(Mt||(Mt={}));var Xt,Jt={name:"text-align",initialValue:"left",prefix:!1,type:Be.IDENT_VALUE,parse:function(A){switch(A){case"right":return Mt.RIGHT;case"center":case"justify":return Mt.CENTER;case"left":default:return Mt.LEFT}}};!function(A){A[A.STATIC=0]="STATIC",A[A.RELATIVE=1]="RELATIVE",A[A.ABSOLUTE=2]="ABSOLUTE",A[A.FIXED=3]="FIXED",A[A.STICKY=4]="STICKY"}(Xt||(Xt={}));var Gt,kt={name:"position",initialValue:"static",prefix:!1,type:Be.IDENT_VALUE,parse:function(A){switch(A){case"relative":return Xt.RELATIVE;case"absolute":return Xt.ABSOLUTE;case"fixed":return Xt.FIXED;case"sticky":return Xt.STICKY}return Xt.STATIC}},Wt={name:"text-shadow",initialValue:"none",type:Be.LIST,prefix:!1,parse:function(A){return 1===A.length&&bA(A[0],"none")?[]:yA(A).map(function(A){for(var e={color:ae.TRANSPARENT,offsetX:zA,offsetY:zA,blur:zA},t=0,r=0;r1?1:0],this.overflowWrap=Kr(yt,A.overflowWrap),this.paddingTop=Kr(Pt,A.paddingTop),this.paddingRight=Kr(xt,A.paddingRight),this.paddingBottom=Kr(Vt,A.paddingBottom),this.paddingLeft=Kr(zt,A.paddingLeft),this.position=Kr(kt,A.position),this.textAlign=Kr(Jt,A.textAlign),this.textDecorationColor=Kr(ir,A.textDecorationColor||A.color),this.textDecorationLine=Kr(ar,A.textDecorationLine),this.textShadow=Kr(Wt,A.textShadow),this.textTransform=Kr(qt,A.textTransform),this.transform=Kr(Zt,A.transform),this.transformOrigin=Kr(er,A.transformOrigin),this.visibility=Kr(rr,A.visibility),this.wordBreak=Kr(Br,A.wordBreak),this.zIndex=Kr(sr,A.zIndex)}return A.prototype.isVisible=function(){return this.display>0&&this.opacity>0&&this.visibility===Yt.VISIBLE},A.prototype.isTransparent=function(){return $A(this.backgroundColor)},A.prototype.isTransformed=function(){return null!==this.transform},A.prototype.isPositioned=function(){return this.position!==Xt.STATIC},A.prototype.isPositionedWithZIndex=function(){return this.isPositioned()&&!this.zIndex.auto},A.prototype.isFloating=function(){return this.float!==Bt.NONE},A.prototype.isInlineLevel=function(){return Cr(this.display,4)||Cr(this.display,33554432)||Cr(this.display,268435456)||Cr(this.display,536870912)||Cr(this.display,67108864)||Cr(this.display,134217728)},A}(),pr=function(){return function(A){this.content=Kr(gr,A.content),this.quotes=Kr(hr,A.quotes)}}(),Nr=function(){return function(A){this.counterIncrement=Kr(Er,A.counterIncrement),this.counterReset=Kr(Fr,A.counterReset)}}(),Kr=function(A,e){var t=new mA,r=null!==e&&void 0!==e?e.toString():A.initialValue;t.write(r);var n=new RA(t.read());switch(A.type){case Be.IDENT_VALUE:var B=n.parseComponentValue();return A.parse(vA(B)?B.value:A.initialValue);case Be.VALUE:return A.parse(n.parseComponentValue());case Be.LIST:return A.parse(n.parseComponentValues());case Be.TOKEN_VALUE:return n.parseComponentValue();case Be.TYPE_VALUE:switch(A.format){case"angle":return WA(n.parseComponentValue());case"color":return jA(n.parseComponentValue());case"image":return Me(n.parseComponentValue());case"length":var s=n.parseComponentValue();return PA(s)?s:zA;case"length-percentage":var o=n.parseComponentValue();return xA(o)?o:zA}}throw new Error("Attempting to parse unsupported css format type "+A.format)},Ir=function(){return function(A){this.styles=new fr(window.getComputedStyle(A,null)),this.textNodes=[],this.elements=[],null!==this.styles.transform&&cn(A)&&(A.style.transform="none"),this.bounds=s(A),this.flags=0}}(),Tr=function(){return function(A,e){this.text=A,this.bounds=e}}(),mr=function(A,e,t){var r=[],n=0;return Or(A,e).forEach(function(A){if(e.textDecorationLine.length||A.trim().length>0)if(de.SUPPORT_RANGE_BOUNDS)r.push(new Tr(A,Lr(t,n,A.length)));else{var B=t.splitText(A.length);r.push(new Tr(A,Rr(t))),t=B}else de.SUPPORT_RANGE_BOUNDS||(t=t.splitText(A.length));n+=A.length}),r},Rr=function(A){var e=A.ownerDocument;if(e){var t=e.createElement("html2canvaswrapper");t.appendChild(A.cloneNode(!0));var r=A.parentNode;if(r){r.replaceChild(t,A);var n=s(t);return t.firstChild&&r.replaceChild(t.firstChild,t),n}}return new B(0,0,0,0)},Lr=function(A,e,t){var r=A.ownerDocument;if(!r)throw new Error("Node has no owner document");var n=r.createRange();return n.setStart(A,e),n.setEnd(A,e+t),B.fromClientRect(n.getBoundingClientRect())},Or=function(A,e){return 0!==e.letterSpacing?o(A).map(function(A){return i(A)}):vr(A,e)},vr=function(A,e){for(var t,r=function(A,e){var t=o(A),r=Z(t,e),n=r[0],B=r[1],s=r[2],i=t.length,a=0,c=0;return{next:function(){if(c>=i)return{done:!0,value:null};for(var A="×";c0?e+t.toUpperCase():A},yr=function(A){function t(e){var t=A.call(this,e)||this;return t.src=e.currentSrc||e.src,t.intrinsicWidth=e.naturalWidth,t.intrinsicHeight=e.naturalHeight,pe.getInstance().addImage(t.src),t}return e(t,A),t}(Ir),_r=function(A){function t(e){var t=A.call(this,e)||this;return t.canvas=e,t.intrinsicWidth=e.width,t.intrinsicHeight=e.height,t}return e(t,A),t}(Ir),Pr=function(A){function t(e){var t=A.call(this,e)||this,r=new XMLSerializer;return t.svg="data:image/svg+xml,"+encodeURIComponent(r.serializeToString(e)),t.intrinsicWidth=e.width.baseVal.value,t.intrinsicHeight=e.height.baseVal.value,pe.getInstance().addImage(t.svg),t}return e(t,A),t}(Ir),xr=function(A){function t(e){var t=A.call(this,e)||this;return t.value=e.value,t}return e(t,A),t}(Ir),Vr=function(A){function t(e){var t=A.call(this,e)||this;return t.start=e.start,t.reversed="boolean"==typeof e.reversed&&!0===e.reversed,t}return e(t,A),t}(Ir),zr=[{type:u.DIMENSION_TOKEN,flags:0,unit:"px",number:3}],Xr=[{type:u.PERCENTAGE_TOKEN,flags:0,number:50}],Jr=function(A){return A.width>A.height?new B(A.left+(A.width-A.height)/2,A.top,A.height,A.height):A.width0)e.textNodes.push(new Dr(r,e.styles));else if(an(r)){var B=rn(r);B.styles.isVisible()&&(Bn(r,B,t)?B.flags|=4:sn(B.styles)&&(B.flags|=2),-1!==en.indexOf(r.tagName)&&(B.flags|=8),e.elements.push(B),dn(r)||ln(r)||fn(r)||tn(r,B,t))}},rn=function(A){return En(A)?new yr(A):gn(A)?new _r(A):ln(A)?new Pr(A):un(A)?new xr(A):wn(A)?new Vr(A):Un(A)?new qr(A):fn(A)?new Zr(A):dn(A)?new jr(A):Fn(A)?new An(A):new Ir(A)},nn=function(A){var e=rn(A);return e.flags|=4,tn(A,e,e),e},Bn=function(A,e,t){return e.styles.isPositionedWithZIndex()||e.styles.opacity<1||e.styles.isTransformed()||Cn(A)&&t.styles.isTransparent()},sn=function(A){return A.isPositioned()||A.isFloating()},on=function(A){return A.nodeType===Node.TEXT_NODE},an=function(A){return A.nodeType===Node.ELEMENT_NODE},cn=function(A){return an(A)&&void 0!==A.style&&!Qn(A)},Qn=function(A){return"object"==typeof A.className},un=function(A){return"LI"===A.tagName},wn=function(A){return"OL"===A.tagName},Un=function(A){return"INPUT"===A.tagName},ln=function(A){return"svg"===A.tagName},Cn=function(A){return"BODY"===A.tagName},gn=function(A){return"CANVAS"===A.tagName},En=function(A){return"IMG"===A.tagName},Fn=function(A){return"IFRAME"===A.tagName},hn=function(A){return"STYLE"===A.tagName},Hn=function(A){return"SCRIPT"===A.tagName},dn=function(A){return"TEXTAREA"===A.tagName},fn=function(A){return"SELECT"===A.tagName},pn=function(){function A(){this.counters={}}return A.prototype.getCounterValue=function(A){var e=this.counters[A];return e&&e.length?e[e.length-1]:1},A.prototype.getCounterValues=function(A){var e=this.counters[A];return e||[]},A.prototype.pop=function(A){var e=this;A.forEach(function(A){return e.counters[A].pop()})},A.prototype.parse=function(A){var e=this,t=A.counterIncrement,r=A.counterReset,n=!0;null!==t&&t.forEach(function(A){var t=e.counters[A.counter];t&&0!==A.increment&&(n=!1,t[Math.max(0,t.length-1)]+=A.increment)});var B=[];return n&&r.forEach(function(A){var t=e.counters[A.counter];B.push(A.counter),t||(t=e.counters[A.counter]=[]),t.push(A.reset)}),B},A}(),Nn={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"]},Kn={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:["Ք","Փ","Ւ","Ց","Ր","Տ","Վ","Ս","Ռ","Ջ","Պ","Չ","Ո","Շ","Ն","Յ","Մ","Ճ","Ղ","Ձ","Հ","Կ","Ծ","Խ","Լ","Ի","Ժ","Թ","Ը","Է","Զ","Ե","Դ","Գ","Բ","Ա"]},In={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:["י׳","ט׳","ח׳","ז׳","ו׳","ה׳","ד׳","ג׳","ב׳","א׳","ת","ש","ר","ק","צ","פ","ע","ס","נ","מ","ל","כ","יט","יח","יז","טז","טו","י","ט","ח","ז","ו","ה","ד","ג","ב","א"]},Tn={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:["ჵ","ჰ","ჯ","ჴ","ხ","ჭ","წ","ძ","ც","ჩ","შ","ყ","ღ","ქ","ფ","ჳ","ტ","ს","რ","ჟ","პ","ო","ჲ","ნ","მ","ლ","კ","ი","თ","ჱ","ზ","ვ","ე","დ","გ","ბ","ა"]},mn=function(A,e,t,r,n,B){return At?Dn(A,n,B.length>0):r.integers.reduce(function(e,t,n){for(;A>=t;)A-=t,e+=r.values[n];return e},"")+B},Rn=function(A,e,t,r){var n="";do{t||A--,n=r(A)+n,A/=e}while(A*e>=e);return n},Ln=function(A,e,t,r,n){var B=t-e+1;return(A<0?"-":"")+(Rn(Math.abs(A),B,r,function(A){return i(Math.floor(A%B)+e)})+n)},On=function(A,e,t){void 0===t&&(t=". ");var r=e.length;return Rn(Math.abs(A),r,!1,function(A){return e[Math.floor(A%r)]})+t},vn=function(A,e,t,r,n,B){if(A<-9999||A>9999)return Dn(A,Kt.CJK_DECIMAL,n.length>0);var s=Math.abs(A),o=n;if(0===s)return e[0]+o;for(var i=0;s>0&&i<=4;i++){var a=s%10;0===a&&Cr(B,1)&&""!==o?o=e[a]+o:a>1||1===a&&0===i||1===a&&1===i&&Cr(B,2)||1===a&&1===i&&Cr(B,4)&&A>100||1===a&&i>1&&Cr(B,8)?o=e[a]+(i>0?t[i-1]:"")+o:1===a&&i>0&&(o=t[i-1]+o),s=Math.floor(s/10)}return(A<0?r:"")+o},Dn=function(A,e,t){var r=t?". ":"",n=t?"、":"",B=t?", ":"",s=t?" ":"";switch(e){case Kt.DISC:return"•"+s;case Kt.CIRCLE:return"◦"+s;case Kt.SQUARE:return"◾"+s;case Kt.DECIMAL_LEADING_ZERO:var o=Ln(A,48,57,!0,r);return o.length<4?"0"+o:o;case Kt.CJK_DECIMAL:return On(A,"〇一二三四五六七八九",n);case Kt.LOWER_ROMAN:return mn(A,1,3999,Nn,Kt.DECIMAL,r).toLowerCase();case Kt.UPPER_ROMAN:return mn(A,1,3999,Nn,Kt.DECIMAL,r);case Kt.LOWER_GREEK:return Ln(A,945,969,!1,r);case Kt.LOWER_ALPHA:return Ln(A,97,122,!1,r);case Kt.UPPER_ALPHA:return Ln(A,65,90,!1,r);case Kt.ARABIC_INDIC:return Ln(A,1632,1641,!0,r);case Kt.ARMENIAN:case Kt.UPPER_ARMENIAN:return mn(A,1,9999,Kn,Kt.DECIMAL,r);case Kt.LOWER_ARMENIAN:return mn(A,1,9999,Kn,Kt.DECIMAL,r).toLowerCase();case Kt.BENGALI:return Ln(A,2534,2543,!0,r);case Kt.CAMBODIAN:case Kt.KHMER:return Ln(A,6112,6121,!0,r);case Kt.CJK_EARTHLY_BRANCH:return On(A,"子丑寅卯辰巳午未申酉戌亥",n);case Kt.CJK_HEAVENLY_STEM:return On(A,"甲乙丙丁戊己庚辛壬癸",n);case Kt.CJK_IDEOGRAPHIC:case Kt.TRAD_CHINESE_INFORMAL:return vn(A,"零一二三四五六七八九","十百千萬","負",n,14);case Kt.TRAD_CHINESE_FORMAL:return vn(A,"零壹貳參肆伍陸柒捌玖","拾佰仟萬","負",n,15);case Kt.SIMP_CHINESE_INFORMAL:return vn(A,"零一二三四五六七八九","十百千萬","负",n,14);case Kt.SIMP_CHINESE_FORMAL:return vn(A,"零壹贰叁肆伍陆柒捌玖","拾佰仟萬","负",n,15);case Kt.JAPANESE_INFORMAL:return vn(A,"〇一二三四五六七八九","十百千万","マイナス",n,0);case Kt.JAPANESE_FORMAL:return vn(A,"零壱弐参四伍六七八九","拾百千万","マイナス",n,7);case Kt.KOREAN_HANGUL_FORMAL:return vn(A,"영일이삼사오육칠팔구","십백천만","마이너스",B,7);case Kt.KOREAN_HANJA_INFORMAL:return vn(A,"零一二三四五六七八九","十百千萬","마이너스",B,0);case Kt.KOREAN_HANJA_FORMAL:return vn(A,"零壹貳參四五六七八九","拾百千","마이너스",B,7);case Kt.DEVANAGARI:return Ln(A,2406,2415,!0,r);case Kt.GEORGIAN:return mn(A,1,19999,Tn,Kt.DECIMAL,r);case Kt.GUJARATI:return Ln(A,2790,2799,!0,r);case Kt.GURMUKHI:return Ln(A,2662,2671,!0,r);case Kt.HEBREW:return mn(A,1,10999,In,Kt.DECIMAL,r);case Kt.HIRAGANA:return On(A,"あいうえおかきくけこさしすせそたちつてとなにぬねのはひふへほまみむめもやゆよらりるれろわゐゑをん");case Kt.HIRAGANA_IROHA:return On(A,"いろはにほへとちりぬるをわかよたれそつねならむうゐのおくやまけふこえてあさきゆめみしゑひもせす");case Kt.KANNADA:return Ln(A,3302,3311,!0,r);case Kt.KATAKANA:return On(A,"アイウエオカキクケコサシスセソタチツテトナニヌネノハヒフヘホマミムメモヤユヨラリルレロワヰヱヲン",n);case Kt.KATAKANA_IROHA:return On(A,"イロハニホヘトチリヌルヲワカヨタレソツネナラムウヰノオクヤマケフコエテアサキユメミシヱヒモセス",n);case Kt.LAO:return Ln(A,3792,3801,!0,r);case Kt.MONGOLIAN:return Ln(A,6160,6169,!0,r);case Kt.MYANMAR:return Ln(A,4160,4169,!0,r);case Kt.ORIYA:return Ln(A,2918,2927,!0,r);case Kt.PERSIAN:return Ln(A,1776,1785,!0,r);case Kt.TAMIL:return Ln(A,3046,3055,!0,r);case Kt.TELUGU:return Ln(A,3174,3183,!0,r);case Kt.THAI:return Ln(A,3664,3673,!0,r);case Kt.TIBETAN:return Ln(A,3872,3881,!0,r);case Kt.DECIMAL:default:return Ln(A,48,57,!0,r)}},bn=function(){function A(A,e){if(this.options=e,this.scrolledElements=[],this.referenceElement=A,this.counters=new pn,this.quoteDepth=0,!A.ownerDocument)throw new Error("Cloned element does not have an owner document");this.documentElement=this.cloneNode(A.ownerDocument.documentElement)}return A.prototype.toIFrame=function(A,e){var t=this,B=Mn(A,e);if(!B.contentWindow)return Promise.reject("Unable to find iframe window");var s=A.defaultView.pageXOffset,o=A.defaultView.pageYOffset,i=B.contentWindow,a=i.document,c=yn(B).then(function(){return r(t,void 0,void 0,function(){var A;return n(this,function(t){switch(t.label){case 0:return this.scrolledElements.forEach(Vn),i&&(i.scrollTo(e.left,e.top),!/(iPad|iPhone|iPod)/g.test(navigator.userAgent)||i.scrollY===e.top&&i.scrollX===e.left||(a.documentElement.style.top=-e.top+"px",a.documentElement.style.left=-e.left+"px",a.documentElement.style.position="absolute")),A=this.options.onclone,void 0===this.clonedReferenceElement?[2,Promise.reject("Error finding the "+this.referenceElement.nodeName+" in the cloned document")]:a.fonts&&a.fonts.ready?[4,a.fonts.ready]:[3,2];case 1:t.sent(),t.label=2;case 2:return"function"==typeof A?[2,Promise.resolve().then(function(){return A(a)}).then(function(){return B})]:[2,B]}})})});return a.open(),a.write(Pn(document.doctype)+""),xn(this.referenceElement.ownerDocument,s,o),a.replaceChild(a.adoptNode(this.documentElement),a.documentElement),a.close(),c},A.prototype.createElementClone=function(A){if(gn(A))return this.createCanvasClone(A);if(hn(A))return this.createStyleClone(A);var e=A.cloneNode(!1);return En(e)&&"lazy"===e.loading&&(e.loading="eager"),e},A.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},""),r=A.cloneNode(!1);return r.textContent=t,r}}catch(A){if(fe.getInstance(this.options.id).error("Unable to access cssRules property",A),"SecurityError"!==A.name)throw A}return A.cloneNode(!1)},A.prototype.createCanvasClone=function(A){if(this.options.inlineImages&&A.ownerDocument){var e=A.ownerDocument.createElement("img");try{return e.src=A.toDataURL(),e}catch(A){fe.getInstance(this.options.id).info("Unable to clone canvas contents, canvas is tainted")}}var t=A.cloneNode(!1);try{t.width=A.width,t.height=A.height;var r=A.getContext("2d"),n=t.getContext("2d");return n&&(r?n.putImageData(r.getImageData(0,0,A.width,A.height),0,0):n.drawImage(A,0,0)),t}catch(A){}return t},A.prototype.cloneNode=function(A){if(on(A))return document.createTextNode(A.data);if(!A.ownerDocument)return A.cloneNode(!1);var e=A.ownerDocument.defaultView;if(e&&an(A)&&(cn(A)||Qn(A))){var t=this.createElementClone(A),r=e.getComputedStyle(A),n=e.getComputedStyle(A,":before"),B=e.getComputedStyle(A,":after");this.referenceElement===A&&cn(t)&&(this.clonedReferenceElement=t),Cn(t)&&Jn(t);for(var s=this.counters.parse(new Nr(r)),o=this.resolvePseudoContent(A,t,n,Ur.BEFORE),i=A.firstChild;i;i=i.nextSibling)an(i)&&(Hn(i)||i.hasAttribute("data-html2canvas-ignore")||"function"==typeof this.options.ignoreElements&&this.options.ignoreElements(i))||this.options.copyStyles&&an(i)&&hn(i)||t.appendChild(this.cloneNode(i));o&&t.insertBefore(o,t.firstChild);var a=this.resolvePseudoContent(A,t,B,Ur.AFTER);return a&&t.appendChild(a),this.counters.pop(s),r&&(this.options.copyStyles||Qn(A))&&!Fn(A)&&_n(r,t),0===A.scrollTop&&0===A.scrollLeft||this.scrolledElements.push([t,A.scrollLeft,A.scrollTop]),(dn(A)||fn(A))&&(dn(t)||fn(t))&&(t.value=A.value),t}return A.cloneNode(!1)},A.prototype.resolvePseudoContent=function(A,e,t,r){var n=this;if(t){var B=t.content,s=e.ownerDocument;if(s&&B&&"none"!==B&&"-moz-alt-content"!==B&&"none"!==t.display){this.counters.parse(new Nr(t));var o=new pr(t),i=s.createElement("html2canvaspseudoelement");_n(t,i),o.content.forEach(function(e){if(e.type===u.STRING_TOKEN)i.appendChild(s.createTextNode(e.value));else if(e.type===u.URL_TOKEN){var t=s.createElement("img");t.src=e.value,t.style.opacity="1",i.appendChild(t)}else if(e.type===u.FUNCTION){if("attr"===e.name){var r=e.values.filter(vA);r.length&&i.appendChild(s.createTextNode(A.getAttribute(r[0].value)||""))}else if("counter"===e.name){var B=e.values.filter(MA),a=B[0],c=B[1];if(a&&vA(a)){var Q=n.counters.getCounterValue(a.value),w=c&&vA(c)?mt.parse(c.value):Kt.DECIMAL;i.appendChild(s.createTextNode(Dn(Q,w,!1)))}}else if("counters"===e.name){var U=e.values.filter(MA),l=(a=U[0],U[1]);c=U[2];if(a&&vA(a)){var C=n.counters.getCounterValues(a.value),g=c&&vA(c)?mt.parse(c.value):Kt.DECIMAL,E=l&&l.type===u.STRING_TOKEN?l.value:"",F=C.map(function(A){return Dn(A,g,!1)}).join(E);i.appendChild(s.createTextNode(F))}}}else if(e.type===u.IDENT_TOKEN)switch(e.value){case"open-quote":i.appendChild(s.createTextNode(Hr(o.quotes,n.quoteDepth++,!0)));break;case"close-quote":i.appendChild(s.createTextNode(Hr(o.quotes,--n.quoteDepth,!1)));break;default:i.appendChild(s.createTextNode(e.value))}}),i.className=zn+" "+Xn;var a=r===Ur.BEFORE?" "+zn:" "+Xn;return Qn(e)?e.className.baseValue+=a:e.className+=a,i}}},A.destroy=function(A){return!!A.parentNode&&(A.parentNode.removeChild(A),!0)},A}();!function(A){A[A.BEFORE=0]="BEFORE",A[A.AFTER=1]="AFTER"}(Ur||(Ur={}));var Sn,Mn=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("data-html2canvas-ignore","true"),A.body.appendChild(t),t},yn=function(A){return new Promise(function(e,t){var r=A.contentWindow;if(!r)return t("No window assigned for iframe");var n=r.document;r.onload=A.onload=n.onreadystatechange=function(){r.onload=A.onload=n.onreadystatechange=null;var t=setInterval(function(){n.body.childNodes.length>0&&"complete"===n.readyState&&(clearInterval(t),e(A))},50)}})},_n=function(A,e){for(var t=A.length-1;t>=0;t--){var r=A.item(t);"content"!==r&&e.style.setProperty(r,A.getPropertyValue(r))}return e},Pn=function(A){var e="";return A&&(e+=""),e},xn=function(A,e,t){A&&A.defaultView&&(e!==A.defaultView.pageXOffset||t!==A.defaultView.pageYOffset)&&A.defaultView.scrollTo(e,t)},Vn=function(A){var e=A[0],t=A[1],r=A[2];e.scrollLeft=t,e.scrollTop=r},zn="___html2canvas___pseudoelement_before",Xn="___html2canvas___pseudoelement_after",Jn=function(A){Gn(A,"."+zn+':before{\n content: "" !important;\n display: none !important;\n}\n .'+Xn+':after{\n content: "" !important;\n display: none !important;\n}')},Gn=function(A,e){var t=A.ownerDocument;if(t){var r=t.createElement("style");r.textContent=e,A.appendChild(r)}};!function(A){A[A.VECTOR=0]="VECTOR",A[A.BEZIER_CURVE=1]="BEZIER_CURVE"}(Sn||(Sn={}));var kn,Wn=function(A,e){return A.length===e.length&&A.some(function(A,t){return A===e[t]})},Yn=function(){function A(A,e){this.type=Sn.VECTOR,this.x=A,this.y=e}return A.prototype.add=function(e,t){return new A(this.x+e,this.y+t)},A}(),qn=function(A,e,t){return new Yn(A.x+(e.x-A.x)*t,A.y+(e.y-A.y)*t)},Zn=function(){function A(A,e,t,r){this.type=Sn.BEZIER_CURVE,this.start=A,this.startControl=e,this.endControl=t,this.end=r}return A.prototype.subdivide=function(e,t){var r=qn(this.start,this.startControl,e),n=qn(this.startControl,this.endControl,e),B=qn(this.endControl,this.end,e),s=qn(r,n,e),o=qn(n,B,e),i=qn(s,o,e);return t?new A(this.start,r,s,i):new A(i,o,B,this.end)},A.prototype.add=function(e,t){return new A(this.start.add(e,t),this.startControl.add(e,t),this.endControl.add(e,t),this.end.add(e,t))},A.prototype.reverse=function(){return new A(this.end,this.endControl,this.startControl,this.start)},A}(),jn=function(A){return A.type===Sn.BEZIER_CURVE},$n=function(){return function(A){var e=A.styles,t=A.bounds,r=GA(e.borderTopLeftRadius,t.width,t.height),n=r[0],B=r[1],s=GA(e.borderTopRightRadius,t.width,t.height),o=s[0],i=s[1],a=GA(e.borderBottomRightRadius,t.width,t.height),c=a[0],Q=a[1],u=GA(e.borderBottomLeftRadius,t.width,t.height),w=u[0],U=u[1],l=[];l.push((n+o)/t.width),l.push((w+c)/t.width),l.push((B+U)/t.height),l.push((i+Q)/t.height);var C=Math.max.apply(Math,l);C>1&&(n/=C,B/=C,o/=C,i/=C,c/=C,Q/=C,w/=C,U/=C);var g=t.width-o,E=t.height-Q,F=t.width-c,h=t.height-U,H=e.borderTopWidth,d=e.borderRightWidth,f=e.borderBottomWidth,p=e.borderLeftWidth,N=kA(e.paddingTop,A.bounds.width),K=kA(e.paddingRight,A.bounds.width),I=kA(e.paddingBottom,A.bounds.width),T=kA(e.paddingLeft,A.bounds.width);this.topLeftBorderBox=n>0||B>0?AB(t.left,t.top,n,B,kn.TOP_LEFT):new Yn(t.left,t.top),this.topRightBorderBox=o>0||i>0?AB(t.left+g,t.top,o,i,kn.TOP_RIGHT):new Yn(t.left+t.width,t.top),this.bottomRightBorderBox=c>0||Q>0?AB(t.left+F,t.top+E,c,Q,kn.BOTTOM_RIGHT):new Yn(t.left+t.width,t.top+t.height),this.bottomLeftBorderBox=w>0||U>0?AB(t.left,t.top+h,w,U,kn.BOTTOM_LEFT):new Yn(t.left,t.top+t.height),this.topLeftPaddingBox=n>0||B>0?AB(t.left+p,t.top+H,Math.max(0,n-p),Math.max(0,B-H),kn.TOP_LEFT):new Yn(t.left+p,t.top+H),this.topRightPaddingBox=o>0||i>0?AB(t.left+Math.min(g,t.width+p),t.top+H,g>t.width+p?0:o-p,i-H,kn.TOP_RIGHT):new Yn(t.left+t.width-d,t.top+H),this.bottomRightPaddingBox=c>0||Q>0?AB(t.left+Math.min(F,t.width-p),t.top+Math.min(E,t.height+H),Math.max(0,c-d),Q-f,kn.BOTTOM_RIGHT):new Yn(t.left+t.width-d,t.top+t.height-f),this.bottomLeftPaddingBox=w>0||U>0?AB(t.left+p,t.top+h,Math.max(0,w-p),U-f,kn.BOTTOM_LEFT):new Yn(t.left+p,t.top+t.height-f),this.topLeftContentBox=n>0||B>0?AB(t.left+p+T,t.top+H+N,Math.max(0,n-(p+T)),Math.max(0,B-(H+N)),kn.TOP_LEFT):new Yn(t.left+p+T,t.top+H+N),this.topRightContentBox=o>0||i>0?AB(t.left+Math.min(g,t.width+p+T),t.top+H+N,g>t.width+p+T?0:o-p+T,i-(H+N),kn.TOP_RIGHT):new Yn(t.left+t.width-(d+K),t.top+H+N),this.bottomRightContentBox=c>0||Q>0?AB(t.left+Math.min(F,t.width-(p+T)),t.top+Math.min(E,t.height+H+N),Math.max(0,c-(d+K)),Q-(f+I),kn.BOTTOM_RIGHT):new Yn(t.left+t.width-(d+K),t.top+t.height-(f+I)),this.bottomLeftContentBox=w>0||U>0?AB(t.left+p+T,t.top+h,Math.max(0,w-(p+T)),U-(f+I),kn.BOTTOM_LEFT):new Yn(t.left+p+T,t.top+t.height-(f+I))}}();!function(A){A[A.TOP_LEFT=0]="TOP_LEFT",A[A.TOP_RIGHT=1]="TOP_RIGHT",A[A.BOTTOM_RIGHT=2]="BOTTOM_RIGHT",A[A.BOTTOM_LEFT=3]="BOTTOM_LEFT"}(kn||(kn={}));var AB=function(A,e,t,r,n){var B=(Math.sqrt(2)-1)/3*4,s=t*B,o=r*B,i=A+t,a=e+r;switch(n){case kn.TOP_LEFT:return new Zn(new Yn(A,a),new Yn(A,a-o),new Yn(i-s,e),new Yn(i,e));case kn.TOP_RIGHT:return new Zn(new Yn(A,e),new Yn(A+s,e),new Yn(i,a-o),new Yn(i,a));case kn.BOTTOM_RIGHT:return new Zn(new Yn(i,e),new Yn(i,e+o),new Yn(A+s,a),new Yn(A,a));case kn.BOTTOM_LEFT:default:return new Zn(new Yn(i,a),new Yn(i-s,a),new Yn(A,e+o),new Yn(A,e))}},eB=function(A){return[A.topLeftBorderBox,A.topRightBorderBox,A.bottomRightBorderBox,A.bottomLeftBorderBox]},tB=function(A){return[A.topLeftPaddingBox,A.topRightPaddingBox,A.bottomRightPaddingBox,A.bottomLeftPaddingBox]},rB=function(){return function(A,e,t){this.type=0,this.target=6,this.offsetX=A,this.offsetY=e,this.matrix=t}}(),nB=function(){return function(A,e){this.type=1,this.target=e,this.path=A}}(),BB=function(){return function(A){this.type=2,this.target=6,this.opacity=A}}(),sB=function(){return function(A){this.element=A,this.inlineLevel=[],this.nonInlineLevel=[],this.negativeZIndex=[],this.zeroOrAutoZIndexOrTransformedOrOpacity=[],this.positiveZIndex=[],this.nonPositionedFloats=[],this.nonPositionedInlineLevel=[]}}(),oB=function(){function A(A,e){if(this.container=A,this.effects=e.slice(0),this.curves=new $n(A),A.styles.opacity<1&&this.effects.push(new BB(A.styles.opacity)),null!==A.styles.transform){var t=A.bounds.left+A.styles.transformOrigin[0].number,r=A.bounds.top+A.styles.transformOrigin[1].number,n=A.styles.transform;this.effects.push(new rB(t,r,n))}if(A.styles.overflowX!==Tt.VISIBLE){var B=eB(this.curves),s=tB(this.curves);Wn(B,s)?this.effects.push(new nB(B,6)):(this.effects.push(new nB(B,2)),this.effects.push(new nB(s,4)))}}return A.prototype.getParentEffects=function(){var A=this.effects.slice(0);if(this.container.styles.overflowX!==Tt.VISIBLE){var e=eB(this.curves),t=tB(this.curves);Wn(e,t)||A.push(new nB(t,6))}return A},A}(),iB=function(A,e,t,r){A.container.elements.forEach(function(n){var B=Cr(n.flags,4),s=Cr(n.flags,2),o=new oB(n,A.getParentEffects());Cr(n.styles.display,2048)&&r.push(o);var i=Cr(n.flags,8)?[]:r;if(B||s){var a=B||n.styles.isPositioned()?t:e,c=new sB(o);if(n.styles.isPositioned()||n.styles.opacity<1||n.styles.isTransformed()){var Q=n.styles.zIndex.order;if(Q<0){var u=0;a.negativeZIndex.some(function(A,e){return Q>A.element.container.styles.zIndex.order?(u=e,!1):u>0}),a.negativeZIndex.splice(u,0,c)}else if(Q>0){var w=0;a.positiveZIndex.some(function(A,e){return Q>=A.element.container.styles.zIndex.order?(w=e+1,!1):w>0}),a.positiveZIndex.splice(w,0,c)}else a.zeroOrAutoZIndexOrTransformedOrOpacity.push(c)}else n.styles.isFloating()?a.nonPositionedFloats.push(c):a.nonPositionedInlineLevel.push(c);iB(o,c,B?c:t,i)}else n.styles.isInlineLevel()?e.inlineLevel.push(o):e.nonInlineLevel.push(o),iB(o,e,t,i);Cr(n.flags,8)&&aB(n,i)})},aB=function(A,e){for(var t=A instanceof Vr?A.start:1,r=A instanceof Vr&&A.reversed,n=0;n0&&A.intrinsicHeight>0){var r=uB(A),n=tB(e);this.path(n),this.ctx.save(),this.ctx.clip(),this.ctx.drawImage(t,0,0,A.intrinsicWidth,A.intrinsicHeight,r.left,r.top,r.width,r.height),this.ctx.restore()}},A.prototype.renderNodeContent=function(e){return r(this,void 0,void 0,function(){var t,r,s,o,i,a,c,Q,w,U,l,C,g,E;return n(this,function(n){switch(n.label){case 0:this.applyEffects(e.effects,4),t=e.container,r=e.curves,s=t.styles,o=0,i=t.textNodes,n.label=1;case 1:return o0&&p>0&&(E=r.ctx.createPattern(l,"repeat"),r.renderRepeat(h,E,K,I))):function(A){return A.type===ce.RADIAL_GRADIENT}(t)&&(F=wB(A,e,[null,null,null]),h=F[0],H=F[1],d=F[2],f=F[3],p=F[4],N=0===t.position.length?[XA]:t.position,K=kA(N[0],f),I=kA(N[N.length-1],p),T=function(A,e,t,r,n){var B=0,s=0;switch(A.size){case Se.CLOSEST_SIDE:A.shape===be.CIRCLE?B=s=Math.min(Math.abs(e),Math.abs(e-r),Math.abs(t),Math.abs(t-n)):A.shape===be.ELLIPSE&&(B=Math.min(Math.abs(e),Math.abs(e-r)),s=Math.min(Math.abs(t),Math.abs(t-n)));break;case Se.CLOSEST_CORNER:if(A.shape===be.CIRCLE)B=s=Math.min(Ce(e,t),Ce(e,t-n),Ce(e-r,t),Ce(e-r,t-n));else if(A.shape===be.ELLIPSE){var o=Math.min(Math.abs(t),Math.abs(t-n))/Math.min(Math.abs(e),Math.abs(e-r)),i=ge(r,n,e,t,!0),a=i[0],c=i[1];s=o*(B=Ce(a-e,(c-t)/o))}break;case Se.FARTHEST_SIDE:A.shape===be.CIRCLE?B=s=Math.max(Math.abs(e),Math.abs(e-r),Math.abs(t),Math.abs(t-n)):A.shape===be.ELLIPSE&&(B=Math.max(Math.abs(e),Math.abs(e-r)),s=Math.max(Math.abs(t),Math.abs(t-n)));break;case Se.FARTHEST_CORNER:if(A.shape===be.CIRCLE)B=s=Math.max(Ce(e,t),Ce(e,t-n),Ce(e-r,t),Ce(e-r,t-n));else if(A.shape===be.ELLIPSE){o=Math.max(Math.abs(t),Math.abs(t-n))/Math.max(Math.abs(e),Math.abs(e-r));var Q=ge(r,n,e,t,!1);a=Q[0],c=Q[1],s=o*(B=Ce(a-e,(c-t)/o))}}return Array.isArray(A.size)&&(B=kA(A.size[0],r),s=2===A.size.length?kA(A.size[1],n):B),[B,s]}(t,K,I,f,p),m=T[0],R=T[1],m>0&&m>0&&(L=r.ctx.createRadialGradient(H+K,d+I,0,H+K,d+I,m),Ue(t.stops,2*m).forEach(function(A){return L.addColorStop(A.stop,Ae(A.color))}),r.path(h),r.ctx.fillStyle=L,m!==R?(O=A.bounds.left+.5*A.bounds.width,v=A.bounds.top+.5*A.bounds.height,b=1/(D=R/m),r.ctx.save(),r.ctx.translate(O,v),r.ctx.transform(1,0,0,D,0,0),r.ctx.translate(-O,-v),r.ctx.fillRect(H,b*(d-v)+v,f,p*b),r.ctx.restore()):r.ctx.fill())),n.label=6;case 6:return e--,[2]}})},r=this,B=0,s=A.styles.backgroundImage.slice(0).reverse(),i.label=1;case 1:return B