/*!
 * html2canvas 1.4.1 <https://html2canvas.hertzen.com>
 * Copyright (c) 2022 Niklas von Hertzen <https://hertzen.com>
 * Released under MIT License
 */
/*! *****************************************************************************
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.
***************************************************************************** */
!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";var T=function(A,e){return(T=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}T(A,e),A.prototype=null===e?Object.create(e):(t.prototype=e.prototype,new t)}var G=function(){return(G=Object.assign||function(A){for(var e,t=1,r=arguments.length;t<r;t++)for(var B in e=arguments[t])Object.prototype.hasOwnProperty.call(e,B)&&(A[B]=e[B]);return A}).apply(this,arguments)};function i(A,s,o,i){return new(o=o||Promise)(function(t,e){function r(A){try{n(i.next(A))}catch(A){e(A)}}function B(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(r,B)}n((i=i.apply(A,s||[])).next())})}function K(r,B){var n,s,o,i={label:0,sent:function(){if(1&o[0])throw o[1];return o[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(t){return function(A){var e=[t,A];if(n)throw new TypeError("Generator is already executing.");for(;i;)try{if(n=1,s&&(o=2&e[0]?s.return:e[0]?s.throw||((o=s.return)&&o.call(s),0):s.next)&&!(o=o.call(s,e[1])).done)return o;switch(s=0,(e=o?[2&e[0],o.value]:e)[0]){case 0:case 1:o=e;break;case 4:return i.label++,{value:e[1],done:!1};case 5:i.label++,s=e[1],e=[0];continue;case 7:e=i.ops.pop(),i.trys.pop();continue;default:if(!(o=0<(o=i.trys).length&&o[o.length-1])&&(6===e[0]||2===e[0])){i=0;continue}if(3===e[0]&&(!o||e[1]>o[0]&&e[1]<o[3])){i.label=e[1];break}if(6===e[0]&&i.label<o[1]){i.label=o[1],o=e;break}if(o&&i.label<o[2]){i.label=o[2],i.ops.push(e);break}o[2]&&i.ops.pop(),i.trys.pop();continue}e=B.call(r,i)}catch(A){e=[6,A],s=0}finally{n=o=0}if(5&e[0])throw e[1];return{value:e[0]?e[1]:void 0,done:!0}}}}function O(A,e,t){if(t||2===arguments.length)for(var r,B=0,n=e.length;B<n;B++)!r&&B in e||((r=r||Array.prototype.slice.call(e,0,B))[B]=e[B]);return A.concat(r||e)}B.prototype.add=function(A,e,t,r){return new B(this.left+A,this.top+e,this.width+t,this.height+r)},B.fromClientRect=function(A,e){return new B(e.left+A.windowBounds.left,e.top+A.windowBounds.top,e.width,e.height)},B.fromDOMRectList=function(A,e){e=Array.from(e).find(function(A){return 0!==A.width});return e?new B(e.left+A.windowBounds.left,e.top+A.windowBounds.top,e.width,e.height):B.EMPTY},B.EMPTY=new B(0,0,0,0);var h=B;function B(A,e,t,r){this.left=A,this.top=e,this.width=t,this.height=r}for(var V=function(A,e){return h.fromClientRect(A,e.getBoundingClientRect())},k=function(A){var e=A.body,A=A.documentElement;if(!e||!A)throw new Error("Unable to get document size");var t=Math.max(Math.max(e.scrollWidth,A.scrollWidth),Math.max(e.offsetWidth,A.offsetWidth),Math.max(e.clientWidth,A.clientWidth)),e=Math.max(Math.max(e.scrollHeight,A.scrollHeight),Math.max(e.offsetHeight,A.offsetHeight),Math.max(e.clientHeight,A.clientHeight));return new h(0,0,t,e)},R=function(A){for(var e=[],t=0,r=A.length;t<r;){var B,n=A.charCodeAt(t++);55296<=n&&n<=56319&&t<r?56320==(64512&(B=A.charCodeAt(t++)))?e.push(((1023&n)<<10)+(1023&B)+65536):(e.push(n),t--):e.push(n)}return e},a=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 r=[],B=-1,n="";++B<t;){var s=A[B];s<=65535?r.push(s):(s-=65536,r.push(55296+(s>>10),s%1024+56320)),(B+1===t||16384<r.length)&&(n+=String.fromCharCode.apply(String,r),r.length=0)}return n},N="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",P="undefined"==typeof Uint8Array?[]:new Uint8Array(256),J=0;J<N.length;J++)P[N.charCodeAt(J)]=J;for(var X="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",Y="undefined"==typeof Uint8Array?[]:new Uint8Array(256),W=0;W<X.length;W++)Y[X.charCodeAt(W)]=W;function Z(A,e,t){return A.slice?A.slice(e,t):new Uint16Array(Array.prototype.slice.call(A,e,t))}q.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};var _=q;function q(A,e,t,r,B,n){this.initialValue=A,this.errorValue=e,this.highStart=t,this.highValueIndex=r,this.index=B,this.data=n}for(var j="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",z="undefined"==typeof Uint8Array?[]:new Uint8Array(256),$=0;$<j.length;$++)z[j.charCodeAt($)]=$;function AA(A,e,t,r){var B=r[t];if(Array.isArray(A)?-1!==A.indexOf(B):A===B)for(var n=t;n<=r.length;){if((o=r[++n])===e)return 1;if(10!==o)break}if(10===B)for(n=t;0<n;){var s=r[--n];if(Array.isArray(A)?-1!==A.indexOf(s):A===s)for(var o,i=t;i<=r.length;){if((o=r[++i])===e)return 1;if(10!==o)break}if(10!==s)break}}function eA(A,e){for(var t=A;0<=t;){var r=e[t];if(10!==r)return r;t--}return 0}function tA(t,A){void 0===(r=(A=A||{lineBreak:"normal",wordBreak:"normal"}).lineBreak)&&(r="strict"),B=[],n=[],s=[],t.forEach(function(A,e){var t=BA.get(A);if(50<t?(s.push(!0),t-=50):s.push(!1),-1!==["normal","auto","loose"].indexOf(r)&&-1!==[8208,8211,12316,12448].indexOf(A))return n.push(e),B.push(16);if(4!==t&&11!==t)return n.push(e),31===t?B.push("strict"===r?21:37):42===t||29===t?B.push(30):43===t?131072<=A&&A<=196605||196608<=A&&A<=262141?B.push(37):B.push(30):void B.push(t);if(0===e)return n.push(e),B.push(30);A=B[e-1];return-1===QA.indexOf(A)?(n.push(n[e-1]),B.push(A)):(n.push(e),B.push(30))});var r,B,n,s,e=(i=[n,B,s])[0],o=i[1],i=i[2],A=("break-all"!==A.wordBreak&&"break-word"!==A.wordBreak||(o=o.map(function(A){return-1!==[25,30,42].indexOf(A)?37:A})),"keep-all"===A.wordBreak?i.map(function(A,e){return A&&19968<=t[e]&&t[e]<=40959}):void 0);return[e,o,A]}var rA=[9001,65288],w="×",BA=(s=function(A){for(var e,t,r,B,n=.75*A.length,s=A.length,o=0,n=("="===A[A.length-1]&&(n--,"="===A[A.length-2]&&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=Y[A.charCodeAt(Q)],t=Y[A.charCodeAt(Q+1)],r=Y[A.charCodeAt(Q+2)],B=Y[A.charCodeAt(Q+3)],i[o++]=e<<2|t>>4,i[o++]=(15&t)<<4|r>>2,i[o++]=(3&r)<<6|63&B;return n}(s=" "),p=Array.isArray(s)?function(A){for(var e=A.length,t=[],r=0;r<e;r+=4)t.push(A[r+3]<<24|A[r+2]<<16|A[r+1]<<8|A[r]);return t}(s):new Uint32Array(s),s=Array.isArray(s)?function(A){for(var e=A.length,t=[],r=0;r<e;r+=2)t.push(A[r+1]<<8|A[r]);return t}(s):new Uint16Array(s),mr=Z(s,12,p[4]/2),s=2===p[5]?Z(s,(24+p[4])/2):(s=p,_e=Math.ceil((24+p[4])/4),s.slice?s.slice(_e,o):new Uint32Array(Array.prototype.slice.call(s,_e,o))),new _(p[0],p[1],p[2],p[3],mr,s)),nA=[30,36],sA=[1,2,3,5],oA=[10,8],iA=[27,26],QA=sA.concat(oA),cA=[38,39,40,34,35],aA=[15,13],gA=(wA.prototype.slice=function(){return a.apply(void 0,this.codePoints.slice(this.start,this.end))},wA);function wA(A,e,t,r){this.codePoints=A,this.required="!"===e,this.start=t,this.end=r}function g(A){return HA<=A&&A<=57}function lA(A){return g(A)||65<=A&&A<=70||97<=A&&A<=102}function UA(A){return 10===A||9===A||32===A}function CA(A){return EA(A)||IA(A)||A===pA}function uA(A){return CA(A)||g(A)||45===A}function FA(A,e){return 92===A&&10!==e}function hA(A,e,t){return 45===A?CA(e)||FA(e,t):!!CA(A)||92===A&&10!==e}function dA(A,e,t){return 43===A||45===A?!!g(e)||46===e&&g(t):g(46===A?e:A)}var fA=function(A,e){var t=R(A),A=tA(t,e),r=A[0],B=A[1],n=A[2],s=t.length,o=0,i=0;return{next:function(){if(s<=i)return{done:!0,value:null};for(var A,e=w;i<s&&(e=function(A,e,t,r,B){if(0===t[r])return w;r-=1;if(Array.isArray(B)&&!0===B[r])return w;var B=r-1,n=1+r,s=e[r],o=0<=B?e[B]:0,i=e[n];if(2===s&&3===i)return w;if(-1!==sA.indexOf(s))return"!";if(-1!==sA.indexOf(i))return w;if(-1!==oA.indexOf(i))return w;if(8===eA(r,e))return"÷";if(11===BA.get(A[r]))return w;if((32===s||33===s)&&11===BA.get(A[n]))return w;if(7===s||7===i)return w;if(9===s)return w;if(-1===[10,13,15].indexOf(s)&&9===i)return w;if(-1!==[17,18,19,24,28].indexOf(i))return w;if(22===eA(r,e))return w;if(AA(23,22,r,e))return w;if(AA([17,18],21,r,e))return w;if(AA(12,12,r,e))return w;if(10===s)return"÷";if(23===s||23===i)return w;if(16===i||16===s)return"÷";if(-1!==[13,15,21].indexOf(i)||14===s)return w;if(36===o&&-1!==aA.indexOf(s))return w;if(28===s&&36===i)return w;if(20===i)return w;if(-1!==nA.indexOf(i)&&25===s||-1!==nA.indexOf(s)&&25===i)return w;if(27===s&&-1!==[37,32,33].indexOf(i)||-1!==[37,32,33].indexOf(s)&&26===i)return w;if(-1!==nA.indexOf(s)&&-1!==iA.indexOf(i)||-1!==iA.indexOf(s)&&-1!==nA.indexOf(i))return w;if(-1!==[27,26].indexOf(s)&&(25===i||-1!==[22,15].indexOf(i)&&25===e[1+n])||-1!==[22,15].indexOf(s)&&25===i||25===s&&-1!==[25,28,24].indexOf(i))return w;if(-1!==[25,28,24,17,18].indexOf(i))for(var Q=r;0<=Q;){if(25===(c=e[Q]))return w;if(-1===[28,24].indexOf(c))break;Q--}if(-1!==[27,26].indexOf(i))for(var c,Q=-1!==[17,18].indexOf(s)?B:r;0<=Q;){if(25===(c=e[Q]))return w;if(-1===[28,24].indexOf(c))break;Q--}if(38===s&&-1!==[38,39,34,35].indexOf(i)||-1!==[39,34].indexOf(s)&&-1!==[39,40].indexOf(i)||-1!==[40,35].indexOf(s)&&40===i)return w;if(-1!==cA.indexOf(s)&&-1!==[20,26].indexOf(i)||-1!==cA.indexOf(i)&&27===s)return w;if(-1!==nA.indexOf(s)&&-1!==nA.indexOf(i))return w;if(24===s&&-1!==nA.indexOf(i))return w;if(-1!==nA.concat(25).indexOf(s)&&22===i&&-1===rA.indexOf(A[n])||-1!==nA.concat(25).indexOf(i)&&18===s)return w;if(41===s&&41===i){for(var a=t[r],g=1;0<a&&41===e[--a];)g++;if(g%2!=0)return w}return 32===s&&33===i?w:"÷"}(t,B,r,++i,n))===w;);return e!==w||i===s?(A=new gA(t,e,o,i),o=i,{value:A,done:!1}):{done:!0,value:null}}}},pA=95,HA=48,EA=function(A){return 97<=(e=A)&&e<=122||65<=(e=A)&&e<=90;var e},IA=function(A){return 128<=A},yA={type:2},KA={type:3},mA={type:4},LA={type:13},bA={type:8},DA={type:21},vA={type:9},xA={type:10},SA={type:11},MA={type:12},TA={type:14},GA={type:23},OA={type:1},VA={type:25},kA={type:24},RA={type:26},NA={type:27},PA={type:28},JA={type:29},XA={type:31},YA={type:32},WA=(e.prototype.write=function(A){this._value=this._value.concat(R(A))},e.prototype.read=function(){for(var A=[],e=this.consumeToken();e!==YA;)A.push(e),e=this.consumeToken();return A},e.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(uA(e)||FA(t,r))return e=hA(e,t,r)?2:1,{type:5,value:this.consumeName(),flags:e};break;case 36:if(61===this.peekCodePoint(0))return this.consumeCodePoint(),LA;break;case 39:return this.consumeStringToken(39);case 40:return yA;case 41:return KA;case 42:if(61===this.peekCodePoint(0))return this.consumeCodePoint(),TA;break;case 43:if(dA(A,this.peekCodePoint(0),this.peekCodePoint(1)))return this.reconsumeCodePoint(A),this.consumeNumericToken();break;case 44:return mA;case 45:t=A,r=this.peekCodePoint(0),e=this.peekCodePoint(1);if(dA(t,r,e))return this.reconsumeCodePoint(A),this.consumeNumericToken();if(hA(t,r,e))return this.reconsumeCodePoint(A),this.consumeIdentLikeToken();if(45===r&&62===e)return this.consumeCodePoint(),this.consumeCodePoint(),kA;break;case 46:if(dA(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 B=this.consumeCodePoint();if(42===B&&47===(B=this.consumeCodePoint()))return this.consumeToken();if(-1===B)return this.consumeToken()}break;case 58:return RA;case 59:return NA;case 60:if(33===this.peekCodePoint(0)&&45===this.peekCodePoint(1)&&45===this.peekCodePoint(2))return this.consumeCodePoint(),this.consumeCodePoint(),VA;break;case 64:t=this.peekCodePoint(0),r=this.peekCodePoint(1),e=this.peekCodePoint(2);if(hA(t,r,e))return{type:7,value:this.consumeName()};break;case 91:return PA;case 92:if(FA(A,this.peekCodePoint(0)))return this.reconsumeCodePoint(A),this.consumeIdentLikeToken();break;case 93:return JA;case 61:if(61===this.peekCodePoint(0))return this.consumeCodePoint(),bA;break;case 123:return SA;case 125:return MA;case 117:case 85:t=this.peekCodePoint(0),r=this.peekCodePoint(1);return 43!==t||!lA(r)&&63!==r||(this.consumeCodePoint(),this.consumeUnicodeRangeToken()),this.reconsumeCodePoint(A),this.consumeIdentLikeToken();case 124:if(61===this.peekCodePoint(0))return this.consumeCodePoint(),vA;if(124===this.peekCodePoint(0))return this.consumeCodePoint(),DA;break;case 126:if(61===this.peekCodePoint(0))return this.consumeCodePoint(),xA;break;case-1:return YA}return UA(A)?(this.consumeWhiteSpace(),XA):g(A)?(this.reconsumeCodePoint(A),this.consumeNumericToken()):CA(A)?(this.reconsumeCodePoint(A),this.consumeIdentLikeToken()):{type:6,value:a(A)}},e.prototype.consumeCodePoint=function(){var A=this._value.shift();return void 0===A?-1:A},e.prototype.reconsumeCodePoint=function(A){this._value.unshift(A)},e.prototype.peekCodePoint=function(A){return A>=this._value.length?-1:this._value[A]},e.prototype.consumeUnicodeRangeToken=function(){for(var A=[],e=this.consumeCodePoint();lA(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(a.apply(void 0,A.map(function(A){return 63===A?HA:A})),16),end:parseInt(a.apply(void 0,A.map(function(A){return 63===A?70:A})),16)};var r=parseInt(a.apply(void 0,A),16);if(45===this.peekCodePoint(0)&&lA(this.peekCodePoint(1))){this.consumeCodePoint();for(var e=this.consumeCodePoint(),B=[];lA(e)&&B.length<6;)B.push(e),e=this.consumeCodePoint();return{type:30,start:r,end:parseInt(a.apply(void 0,B),16)}}return{type:30,start:r,end:r}},e.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}},e.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)return 0===(t=this.consumeStringToken(this.consumeCodePoint())).type&&(this.consumeWhiteSpace(),-1===this.peekCodePoint(0)||41===this.peekCodePoint(0))?(this.consumeCodePoint(),{type:22,value:t.value}):(this.consumeBadUrlRemnants(),GA);for(;;){var r=this.consumeCodePoint();if(-1===r||41===r)return{type:22,value:a.apply(void 0,A)};if(UA(r))return this.consumeWhiteSpace(),-1===this.peekCodePoint(0)||41===this.peekCodePoint(0)?(this.consumeCodePoint(),{type:22,value:a.apply(void 0,A)}):(this.consumeBadUrlRemnants(),GA);if(34===r||39===r||40===r||(0<=(e=r)&&e<=8||11===e||14<=e&&e<=31||127===e))return this.consumeBadUrlRemnants(),GA;if(92===r){if(!FA(r,this.peekCodePoint(0)))return this.consumeBadUrlRemnants(),GA;A.push(this.consumeEscapedCodePoint())}else A.push(r)}},e.prototype.consumeWhiteSpace=function(){for(;UA(this.peekCodePoint(0));)this.consumeCodePoint()},e.prototype.consumeBadUrlRemnants=function(){for(;;){var A=this.consumeCodePoint();if(41===A||-1===A)return;FA(A,this.peekCodePoint(0))&&this.consumeEscapedCodePoint()}},e.prototype.consumeStringSlice=function(A){for(var e="";0<A;){var t=Math.min(5e4,A);e+=a.apply(void 0,this._value.splice(0,t)),A-=t}return this._value.shift(),e},e.prototype.consumeStringToken=function(A){for(var e="",t=0;;){var r,B=this._value[t];if(-1===B||void 0===B||B===A)return{type:0,value:e+=this.consumeStringSlice(t)};if(10===B)return this._value.splice(0,t),OA;92!==B||-1!==(r=this._value[t+1])&&void 0!==r&&(10===r?(e+=this.consumeStringSlice(t),t=-1,this._value.shift()):FA(B,r)&&(e=(e+=this.consumeStringSlice(t))+a(this.consumeEscapedCodePoint()),t=-1)),t++}},e.prototype.consumeNumber=function(){var A=[],e=4;for(43!==(t=this.peekCodePoint(0))&&45!==t||A.push(this.consumeCodePoint());g(this.peekCodePoint(0));)A.push(this.consumeCodePoint());var t=this.peekCodePoint(0),r=this.peekCodePoint(1);if(46===t&&g(r))for(A.push(this.consumeCodePoint(),this.consumeCodePoint()),e=8;g(this.peekCodePoint(0));)A.push(this.consumeCodePoint());t=this.peekCodePoint(0);var r=this.peekCodePoint(1),B=this.peekCodePoint(2);if((69===t||101===t)&&((43===r||45===r)&&g(B)||g(r)))for(A.push(this.consumeCodePoint(),this.consumeCodePoint()),e=8;g(this.peekCodePoint(0));)A.push(this.consumeCodePoint());return[function(A){for(var e=0,t=1,r=(43!==A[e]&&45!==A[e]||(45===A[e]&&(t=-1),e++),[]);g(A[e]);)r.push(A[e++]);for(var B=r.length?parseInt(a.apply(void 0,r),10):0,n=(46===A[e]&&e++,[]);g(A[e]);)n.push(A[e++]);for(var s=n.length,o=s?parseInt(a.apply(void 0,n),10):0,i=(69!==A[e]&&101!==A[e]||e++,1),Q=(43!==A[e]&&45!==A[e]||(45===A[e]&&(i=-1),e++),[]);g(A[e]);)Q.push(A[e++]);var c=Q.length?parseInt(a.apply(void 0,Q),10):0;return t*(B+o*Math.pow(10,-s))*Math.pow(10,i*c)}(A),e]},e.prototype.consumeNumericToken=function(){var A=this.consumeNumber(),e=A[0],A=A[1],t=this.peekCodePoint(0),r=this.peekCodePoint(1),B=this.peekCodePoint(2);return hA(t,r,B)?{type:15,number:e,flags:A,unit:this.consumeName()}:37===t?(this.consumeCodePoint(),{type:16,number:e,flags:A}):{type:17,number:e,flags:A}},e.prototype.consumeEscapedCodePoint=function(){var A,e=this.consumeCodePoint();if(lA(e)){for(var t=a(e);lA(this.peekCodePoint(0))&&t.length<6;)t+=a(this.consumeCodePoint());UA(this.peekCodePoint(0))&&this.consumeCodePoint();var r=parseInt(t,16);return 0===r||55296<=(A=r)&&A<=57343||1114111<r?65533:r}return-1===e?65533:e},e.prototype.consumeName=function(){for(var A="";;){var e=this.consumeCodePoint();if(uA(e))A+=a(e);else{if(!FA(e,this.peekCodePoint(0)))return this.reconsumeCodePoint(e),A;A+=a(this.consumeEscapedCodePoint())}}},e);function e(){this._value=[]}t.create=function(A){var e=new WA;return e.write(A),new t(e.read())},t.parseValue=function(A){return t.create(A).parseComponentValue()},t.parseValues=function(A){return t.create(A).parseComponentValues()},t.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")},t.prototype.parseComponentValues=function(){for(var A=[];;){var e=this.consumeComponentValue();if(32===e.type)return A;A.push(e),A.push()}},t.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},t.prototype.consumeSimpleBlock=function(A){for(var e={type:A,values:[]},t=this.consumeToken();;){if(32===t.type||oe(t,A))return e;this.reconsumeToken(t),e.values.push(this.consumeComponentValue()),t=this.consumeToken()}},t.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())}},t.prototype.consumeToken=function(){var A=this._tokens.shift();return void 0===A?YA:A},t.prototype.reconsumeToken=function(A){this._tokens.unshift(A)};var ZA=t;function t(A){this._tokens=A}function _A(A){return 17===A.type}function qA(A){return 0===A.type}function jA(A,e){return l(A)&&A.value===e}function zA(A){return 31!==A.type}function $A(A){return 31!==A.type&&4!==A.type}function c(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 Ae(A){return 1<A.length?[A[0],A[1]]:[A[0]]}function ee(A){return 15===A.type&&(A.unit===ge||A.unit===we||A.unit===le||A.unit===Ue)}function te(A){switch(A.filter(l).map(function(A){return A.value}).join(" ")){case"to bottom right":case"to right bottom":case"left top":case"top left":return[C,C];case"to top":case"bottom":return u(0);case"to bottom left":case"to left bottom":case"right top":case"top right":return[C,ce];case"to right":case"left":return u(90);case"to top left":case"to left top":case"right bottom":case"bottom right":return[ce,ce];case"to bottom":case"top":return u(180);case"to top right":case"to right top":case"left bottom":case"bottom left":return[ce,C];case"to left":case"right":return u(270)}return 0}function re(A){return 0==(255&A)}function m(A){var e=255&A,t=255&A>>8,r=255&A>>16,A=255&A>>24;return e<255?"rgba("+A+","+r+","+t+","+e/255+")":"rgb("+A+","+r+","+t+")"}function Be(A,e){return 17===A.type?A.number:16===A.type?(t=3===e?1:255,3===e?A.number/100*t:Math.round(A.number/100*t)):0;var t}function ne(A,e){var t,r,B;return 3===(e=e.filter($A)).length?(t=(B=e.map(Be))[0],r=B[1],B=B[2],Fe(t,r,B,1)):4===e.length?(t=(e=e.map(Be))[0],r=e[1],B=e[2],e=e[3],Fe(t,r,B,e)):0}var se=function(A){return 15===A.type},l=function(A){return 20===A.type},oe=function(A,e){return 11===e&&12===A.type||(28===e&&29===A.type||2===e&&3===A.type)},ie=function(A){return 17===A.type||15===A.type},U=function(A){return 16===A.type||ie(A)},C={type:17,number:0,flags:4},Qe={type:16,number:50,flags:4},ce={type:16,number:100,flags:4},ae=function(A,e,t){var r=A[0],A=A[1];return[L(r,e),L(void 0!==A?A:r,t)]},L=function(A,e){if(16===A.type)return A.number/100*e;if(se(A))switch(A.unit){case"rem":case"em":return 16*A.number;default:return A.number}return A.number},ge="deg",we="grad",le="rad",Ue="turn",Ce=function(A,e){if(15===e.type)switch(e.unit){case ge:return Math.PI*e.number/180;case we:return Math.PI/200*e.number;case le:return e.number;case Ue:return 2*Math.PI*e.number}throw new Error("Unsupported angle type")},u=function(A){return Math.PI*A/180},ue={name:"color",parse:function(A,e){if(18===e.type){var t=me[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){var r,B,n,s;if(3===e.value.length)return r=e.value.substring(0,1),B=e.value.substring(1,2),n=e.value.substring(2,3),Fe(parseInt(r+r,16),parseInt(B+B,16),parseInt(n+n,16),1);if(4===e.value.length)return r=e.value.substring(0,1),B=e.value.substring(1,2),n=e.value.substring(2,3),s=e.value.substring(3,4),Fe(parseInt(r+r,16),parseInt(B+B,16),parseInt(n+n,16),parseInt(s+s,16)/255);if(6===e.value.length)return r=e.value.substring(0,2),B=e.value.substring(2,4),n=e.value.substring(4,6),Fe(parseInt(r,16),parseInt(B,16),parseInt(n,16),1);if(8===e.value.length)return r=e.value.substring(0,2),B=e.value.substring(2,4),n=e.value.substring(4,6),s=e.value.substring(6,8),Fe(parseInt(r,16),parseInt(B,16),parseInt(n,16),parseInt(s,16)/255)}if(20===e.type){t=Le[e.value.toUpperCase()];if(void 0!==t)return t}return Le.TRANSPARENT}},Fe=function(A,e,t,r){return(A<<24|e<<16|t<<8|Math.round(255*r)<<0)>>>0};function he(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 de(A,e){var t=(e=e.filter($A))[0],r=e[1],B=e[2],e=e[3],A=(17===t.type?u(t.number):Ce(A,t))/(2*Math.PI),t=U(r)?r.number/100:0,r=U(B)?B.number/100:0,B=void 0!==e&&U(e)?L(e,1):1;if(0==t)return Fe(255*r,255*r,255*r,1);var r=he(t=2*r-(e=r<=.5?r*(1+t):r+t-r*t),e,A+1/3),n=he(t,e,A),t=he(t,e,A-1/3);return Fe(255*r,255*n,255*t,B)}function fe(A,e){return ue.parse(A,ZA.create(e).parseComponentValue())}function pe(A,e){return A=ue.parse(A,e[0]),(e=e[1])&&U(e)?{color:A,stop:e}:{color:A,stop:null}}function He(A,t){for(var e=A[0],r=A[A.length-1],B=(null===e.stop&&(e.stop=C),null===r.stop&&(r.stop=ce),[]),n=0,s=0;s<A.length;s++){var o=A[s].stop;null!==o?(n<(o=L(o,t))?B.push(o):B.push(n),n=o):B.push(null)}for(var i=null,s=0;s<B.length;s++){var Q=B[s];if(null===Q)null===i&&(i=s);else if(null!==i){for(var c=s-i,a=(Q-B[i-1])/(1+c),g=1;g<=c;g++)B[i+g-1]=a*g;i=null}}return A.map(function(A,e){return{color:A.color,stop:Math.max(Math.min(1,B[e]/t),0)}})}function Ee(A,e,t){var r="number"==typeof A?A:(n=(s=e)/2,r=(B=t)/2,s=L((A=A)[0],e)-n,n=r-L(A[1],B),(Math.atan2(n,s)+2*Math.PI)%(2*Math.PI)),A=Math.abs(e*Math.sin(r))+Math.abs(t*Math.cos(r)),B=e/2,n=t/2,s=A/2,e=Math.sin(r-Math.PI/2)*s,t=Math.cos(r-Math.PI/2)*s;return[A,B-t,B+t,n-e,n+e]}function Ie(t,A){var r=u(180),B=[];return c(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(r=te(A));if(ee(e))return void(r=(Ce(t,e)+u(270))%u(360))}e=pe(t,A);B.push(e)}),{angle:r,stops:B,type:1}}function ye(t,A){var r=u(180),B=[];c(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(r=te(A));if(ee(e))return void(r=(Ce(t,e)+u(270))%u(360))}e=pe(t,A);B.push(e)});try{var n=JSON.parse(JSON.stringify(B)),s=n[n.length-1],o=s.stop&&s.stop.number||0;for(let e=1;e<100;e++){var i=JSON.parse(JSON.stringify(n)),Q=(i.forEach(A=>{A.stop||(A.stop=Object.assign({},s.stop)),A.stop.number+=o*e}),(B=B.concat(i))[B.length-1].stop);if(!Q)break;if("em"===Q.unit&&1<=Q.number)break;if("rem"===Q.unit&&1<=Q.number)break;if("%"===Q.unit&&100<=Q.number)break;if("px"===Q.unit&&1920<=Q.number)break}}catch(A){console.log(A)}return{angle:r,stops:B,type:1}}function Ke(r,A){var B=0,n=3,s=[],o=[];return c(A).forEach(function(A,e){var t=!0;0===e?t=A.reduce(function(A,e){if(l(e))switch(e.value){case"center":return o.push(Qe),!1;case"top":case"left":return o.push(C),!1;case"right":case"bottom":return o.push(ce),!1}else if(U(e)||ie(e))return o.push(e),!1;return A},t):1===e&&(t=A.reduce(function(A,e){if(l(e))switch(e.value){case"circle":return B=0,!1;case Ge:return!(B=1);case Oe:case xe:return n=0,!1;case Se:return!(n=1);case Me:return!(n=2);case"cover":case Te:return!(n=3)}else if(ie(e)||U(e))return(n=Array.isArray(n)?n:[]).push(e),!1;return A},t)),t&&(e=pe(r,A),s.push(e))}),{size:n,shape:B,stops:s,position:o,type:2}}var me={hsl:de,hsla:de,rgb:ne,rgba:ne},Le={ALICEBLUE:4042850303,ANTIQUEWHITE:4209760255,AQUA:16777215,AQUAMARINE:2147472639,AZURE:4043309055,BEIGE:4126530815,BISQUE:4293182719,BLACK:255,BLANCHEDALMOND:4293643775,BLUE:65535,BLUEVIOLET:2318131967,BROWN:2771004159,BURLYWOOD:3736635391,CADETBLUE:1604231423,CHARTREUSE:2147418367,CHOCOLATE:3530104575,CORAL:4286533887,CORNFLOWERBLUE:1687547391,CORNSILK:4294499583,CRIMSON:3692313855,CYAN:16777215,DARKBLUE:35839,DARKCYAN:9145343,DARKGOLDENROD:3095837695,DARKGRAY:2846468607,DARKGREEN:6553855,DARKGREY:2846468607,DARKKHAKI:3182914559,DARKMAGENTA:2332068863,DARKOLIVEGREEN:1433087999,DARKORANGE:4287365375,DARKORCHID:2570243327,DARKRED:2332033279,DARKSALMON:3918953215,DARKSEAGREEN:2411499519,DARKSLATEBLUE:1211993087,DARKSLATEGRAY:793726975,DARKSLATEGREY:793726975,DARKTURQUOISE:13554175,DARKVIOLET:2483082239,DEEPPINK:4279538687,DEEPSKYBLUE:12582911,DIMGRAY:1768516095,DIMGREY:1768516095,DODGERBLUE:512819199,FIREBRICK:2988581631,FLORALWHITE:4294635775,FORESTGREEN:579543807,FUCHSIA:4278255615,GAINSBORO:3705462015,GHOSTWHITE:4177068031,GOLD:4292280575,GOLDENROD:3668254975,GRAY:2155905279,GREEN:8388863,GREENYELLOW:2919182335,GREY:2155905279,HONEYDEW:4043305215,HOTPINK:4285117695,INDIANRED:3445382399,INDIGO:1258324735,IVORY:4294963455,KHAKI:4041641215,LAVENDER:3873897215,LAVENDERBLUSH:4293981695,LAWNGREEN:2096890111,LEMONCHIFFON:4294626815,LIGHTBLUE:2916673279,LIGHTCORAL:4034953471,LIGHTCYAN:3774873599,LIGHTGOLDENRODYELLOW:4210742015,LIGHTGRAY:3553874943,LIGHTGREEN:2431553791,LIGHTGREY:3553874943,LIGHTPINK:4290167295,LIGHTSALMON:4288707327,LIGHTSEAGREEN:548580095,LIGHTSKYBLUE:2278488831,LIGHTSLATEGRAY:2005441023,LIGHTSLATEGREY:2005441023,LIGHTSTEELBLUE:2965692159,LIGHTYELLOW:4294959359,LIME:16711935,LIMEGREEN:852308735,LINEN:4210091775,MAGENTA:4278255615,MAROON:2147483903,MEDIUMAQUAMARINE:1724754687,MEDIUMBLUE:52735,MEDIUMORCHID:3126187007,MEDIUMPURPLE:2473647103,MEDIUMSEAGREEN:1018393087,MEDIUMSLATEBLUE:2070474495,MEDIUMSPRINGGREEN:16423679,MEDIUMTURQUOISE:1221709055,MEDIUMVIOLETRED:3340076543,MIDNIGHTBLUE:421097727,MINTCREAM:4127193855,MISTYROSE:4293190143,MOCCASIN:4293178879,NAVAJOWHITE:4292783615,NAVY:33023,OLDLACE:4260751103,OLIVE:2155872511,OLIVEDRAB:1804477439,ORANGE:4289003775,ORANGERED:4282712319,ORCHID:3664828159,PALEGOLDENROD:4008225535,PALEGREEN:2566625535,PALETURQUOISE:2951671551,PALEVIOLETRED:3681588223,PAPAYAWHIP:4293907967,PEACHPUFF:4292524543,PERU:3448061951,PINK:4290825215,PLUM:3718307327,POWDERBLUE:2967529215,PURPLE:2147516671,REBECCAPURPLE:1714657791,RED:4278190335,ROSYBROWN:3163525119,ROYALBLUE:1097458175,SADDLEBROWN:2336560127,SALMON:4202722047,SANDYBROWN:4104413439,SEAGREEN:780883967,SEASHELL:4294307583,SIENNA:2689740287,SILVER:3233857791,SKYBLUE:2278484991,SLATEBLUE:1784335871,SLATEGRAY:1887473919,SLATEGREY:1887473919,SNOW:4294638335,SPRINGGREEN:16744447,STEELBLUE:1182971135,TAN:3535047935,TEAL:8421631,THISTLE:3636451583,TOMATO:4284696575,TRANSPARENT:0,TURQUOISE:1088475391,VIOLET:4001558271,WHEAT:4125012991,WHITE:4294967295,WHITESMOKE:4126537215,YELLOW:4294902015,YELLOWGREEN:2597139199},be={name:"background-clip",initialValue:"border-box",prefix:!1,type:1,parse:function(A,e){return e.map(function(A){if(l(A))switch(A.value){case"padding-box":return 1;case"content-box":return 2;case"text":return 3}return 0})}},De={name:"background-color",initialValue:"transparent",prefix:!1,type:3,format:"color"},b=function(A,e){return Math.sqrt(A*A+e*e)},ve=function(A,e,B,n,s){return[[0,0],[0,e],[A,0],[A,e]].reduce(function(A,e){var t=e[0],r=e[1],t=b(B-t,n-r);return(s?t<A.optimumDistance:t>A.optimumDistance)?{optimumCorner:e,optimumDistance:t}:A},{optimumDistance:s?1/0:-1/0,optimumCorner:null}).optimumCorner},xe="closest-side",Se="farthest-side",Me="closest-corner",Te="farthest-corner",Ge="ellipse",Oe="contain",Ve=function(A,e){if(22===e.type)return t={url:e.value,type:0},A.cache.addImage(e.value),t;if(18!==e.type)throw new Error("Unsupported image type "+e.type);var t=ze[e.name];if(void 0===t)throw new Error('Attempting to parse an unsupported image function "'+e.name+'"');return t(A,e.values)};function ke(A){return{name:"border-"+A+"-color",initialValue:"transparent",prefix:!1,type:3,format:"color"}}function Re(A){return{name:"border-radius-"+A,initialValue:"0 0",prefix:!1,type:1,parse:function(A,e){return Ae(e.filter(U))}}}function Ne(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}}}function Pe(A){return{name:"border-"+A+"-width",initialValue:"0",type:0,prefix:!1,parse:function(A,e){return se(e)?e.number:0}}}function Je(A,e){return l(A)&&"normal"===A.value?1.2*e:17===A.type?e*A.number:U(A)?L(A,e):e}function Xe(A){return{name:"margin-"+A,initialValue:"0",prefix:!1,type:4}}function Ye(A){return{name:"padding-"+A,initialValue:"0",prefix:!1,type:3,format:"length-percentage"}}function We(A,e,t){return A&&(e=A[Math.min(e,A.length-1)])?t?e.open:e.close:""}var Ze,_e,qe,je,ze={"linear-gradient":function(t,A){var r=u(180),B=[];return c(A).forEach(function(A,e){if(0===e){e=A[0];if(20===e.type&&"to"===e.value)return void(r=te(A));if(ee(e))return void(r=Ce(t,e))}e=pe(t,A);B.push(e)}),{angle:r,stops:B,type:1}},"-moz-linear-gradient":Ie,"-ms-linear-gradient":Ie,"-o-linear-gradient":Ie,"-webkit-linear-gradient":Ie,"repeating-linear-gradient":function(t,A){var r=u(180),B=[];c(A).forEach(function(A,e){if(0===e){e=A[0];if(20===e.type&&"to"===e.value)return void(r=te(A));if(ee(e))return void(r=Ce(t,e))}e=pe(t,A);B.push(e)});try{var n=JSON.parse(JSON.stringify(B)),s=n[n.length-1],o=s.stop&&s.stop.number||0;for(let e=1;e<100;e++){var i=JSON.parse(JSON.stringify(n)),Q=(i.forEach(A=>{A.stop||(A.stop=Object.assign({},s.stop)),A.stop.number+=o*e}),(B=B.concat(i))[B.length-1].stop);if(!Q)break;if("em"===Q.unit&&1<=Q.number)break;if("rem"===Q.unit&&1<=Q.number)break;if("%"===Q.unit&&100<=Q.number)break;if("px"===Q.unit&&1920<=Q.number)break}}catch(A){console.log(A)}return{angle:r,stops:B,type:1}},"-moz-repeating-linear-gradient":ye,"-ms-repeating-linear-gradient":ye,"-o-repeating-linear-gradient":ye,"-webkit-repeating-linear-gradient":ye,"radial-gradient":function(B,A){var n=0,s=3,o=[],i=[];return c(A).forEach(function(A,e){var t,r=!0;0===e&&(t=!1,r=A.reduce(function(A,e){if(t)if(l(e))switch(e.value){case"center":return i.push(Qe),A;case"top":case"left":return i.push(C),A;case"right":case"bottom":return i.push(ce),A}else(U(e)||ie(e))&&i.push(e);else if(l(e))switch(e.value){case"circle":return n=0,!1;case Ge:return!(n=1);case"at":return!(t=!0);case xe:return s=0,!1;case"cover":case Se:return!(s=1);case Oe:case Me:return!(s=2);case Te:return!(s=3)}else if(ie(e)||U(e))return(s=Array.isArray(s)?s:[]).push(e),!1;return A},r)),r&&(e=pe(B,A),o.push(e))}),{size:s,shape:n,stops:o,position:i,type:2}},"-moz-radial-gradient":Ke,"-ms-radial-gradient":Ke,"-o-radial-gradient":Ke,"-webkit-radial-gradient":Ke,"-webkit-gradient":function(r,A){var e=u(180),B=[],n=1;return c(A).forEach(function(A,e){var t,A=A[0];if(0===e){if(l(A)&&"linear"===A.value)return void(n=1);if(l(A)&&"radial"===A.value)return void(n=2)}18===A.type&&("from"===A.name?(t=ue.parse(r,A.values[0]),B.push({stop:C,color:t})):"to"===A.name?(t=ue.parse(r,A.values[0]),B.push({stop:ce,color:t})):"color-stop"===A.name&&2===(e=A.values.filter($A)).length&&(t=ue.parse(r,e[1]),A=e[0],_A(A)&&B.push({stop:{type:16,number:100*A.number,flags:A.flags},color:t})))}),1===n?{angle:(e+u(180))%u(360),stops:B,type:n}:{size:3,shape:0,stops:B,position:[],type:n}}},$e={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 $A(A)&&!(20===(A=A).type&&"none"===A.value||18===A.type&&!ze[A.name])}).map(function(A){return Ve(e,A)})}},At={name:"background-origin",initialValue:"border-box",prefix:!1,type:1,parse:function(A,e){return e.map(function(A){if(l(A))switch(A.value){case"padding-box":return 1;case"content-box":return 2}return 0})}},et={name:"background-position",initialValue:"0% 0%",type:1,prefix:!1,parse:function(A,e){return c(e).map(function(A){return A.filter(U)}).map(Ae)}},tt={name:"background-repeat",initialValue:"repeat",prefix:!1,type:1,parse:function(A,e){return c(e).map(function(A){return A.filter(l).map(function(A){return A.value}).join(" ")}).map(rt)}},rt=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}},Bt=((_e=Ze=Ze||{}).AUTO="auto",_e.CONTAIN="contain",{name:"background-size",initialValue:"0",prefix:!(_e.COVER="cover"),type:1,parse:function(A,e){return c(e).map(function(A){return A.filter(nt)})}}),nt=function(A){return l(A)||U(A)},st=ke("top"),ot=ke("right"),it=ke("bottom"),Qt=ke("left"),ct=Re("top-left"),at=Re("top-right"),gt=Re("bottom-right"),wt=Re("bottom-left"),lt=Ne("top"),Ut=Ne("right"),Ct=Ne("bottom"),ut=Ne("left"),Ft=Pe("top"),ht=Pe("right"),dt=Pe("bottom"),ft=Pe("left"),pt={name:"color",initialValue:"transparent",prefix:!1,type:3,format:"color"},Ht={name:"direction",initialValue:"ltr",prefix:!1,type:2,parse:function(A,e){return"rtl"!==e?0:1}},Et={name:"display",initialValue:"inline-block",prefix:!1,type:1,parse:function(A,e){return e.filter(l).reduce(function(A,e){return A|It(e.value)},0)}},It=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},yt={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}},Kt={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}},mt={name:"line-break",initialValue:(o=qe=qe||{}).NORMAL="normal",prefix:!(o.STRICT="strict"),type:2,parse:function(A,e){return"strict"!==e?qe.NORMAL:qe.STRICT}},Lt={name:"line-height",initialValue:"normal",prefix:!1,type:4},bt={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)}},Dt={name:"list-style-position",initialValue:"outside",prefix:!1,type:2,parse:function(A,e){return"inside"!==e?1:0}},vt={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}}},xt=Xe("top"),St=Xe("right"),Mt=Xe("bottom"),Tt=Xe("left"),Gt={name:"overflow",initialValue:"visible",prefix:!1,type:1,parse:function(A,e){return e.filter(l).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}})}},Ot={name:"overflow-wrap",initialValue:"normal",prefix:!1,type:2,parse:function(A,e){return"break-word"!==e?"normal":"break-word"}},Vt=Ye("top"),kt=Ye("right"),Rt=Ye("bottom"),Nt=Ye("left"),Pt={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}}},Jt={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}},Xt={name:"text-shadow",initialValue:"none",type:1,prefix:!1,parse:function(n,A){return 1===A.length&&jA(A[0],"none")?[]:c(A).map(function(A){for(var e={color:Le.TRANSPARENT,offsetX:C,offsetY:C,blur:C},t=0,r=0;r<A.length;r++){var B=A[r];ie(B)?(0===t?e.offsetX=B:1===t?e.offsetY=B:e.blur=B,t++):e.color=ue.parse(n,B)}return e})}},Yt={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}},Wt={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=Zt[e.name];if(void 0===t)throw new Error('Attempting to parse an unsupported transform function "'+e.name+'"');return t(e.values)}},Zt={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 A=A.filter(function(A){return 17===A.type}).map(function(A){return A.number}),e=A[0],t=A[1],r=(A[2],A[3],A[4]),B=A[5],n=(A[6],A[7],A[8],A[9],A[10],A[11],A[12]),s=A[13];return A[14],A[15],16===A.length?[e,t,r,B,n,s]:null}},_={type:16,number:50,flags:4},_t=[_,_],qt={name:"transform-origin",initialValue:"50% 50%",prefix:!0,type:1,parse:function(A,e){e=e.filter(U);return 2!==e.length?_t:[e[0],e[1]]}},jt={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}}},zt=((p=je=je||{}).NORMAL="normal",p.BREAK_ALL="break-all",{name:"word-break",initialValue:"normal",prefix:!(p.KEEP_ALL="keep-all"),type:2,parse:function(A,e){switch(e){case"break-all":return je.BREAK_ALL;case"keep-all":return je.KEEP_ALL;default:return je.NORMAL}}}),$t={name:"z-index",initialValue:"auto",prefix:!1,type:0,parse:function(A,e){if(20===e.type)return{auto:!0,order:0};if(_A(e))return{auto:!1,order:e.number};throw new Error("Invalid z-index number parsed")}},Ar=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")},er={name:"opacity",initialValue:"1",type:0,prefix:!1,parse:function(A,e){return _A(e)?e.number:1}},tr={name:"text-decoration-color",initialValue:"transparent",prefix:!1,type:3,format:"color"},rr={name:"text-decoration-line",initialValue:"none",prefix:!1,type:1,parse:function(A,e){return e.filter(l).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})}},Br={name:"font-family",initialValue:"",prefix:!1,type:1,parse:function(A,e){var t=[],r=[];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:r.push(t.join(" ")),t.length=0}}),t.length&&r.push(t.join(" ")),r.map(function(A){return-1===A.indexOf(" ")?A:"'"+A+"'"})}},nr={name:"font-size",initialValue:"0",prefix:!1,type:3,format:"length"},sr={name:"font-weight",initialValue:"normal",type:0,prefix:!1,parse:function(A,e){return _A(e)?e.number:!l(e)||"bold"!==e.value?400:700}},or={name:"font-variant",initialValue:"none",type:1,prefix:!1,parse:function(A,e){return e.filter(l).map(function(A){return A.value})}},ir={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"}}},F=function(A,e){return 0!=(A&e)},Qr={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}},cr={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 r=[],B=e.filter(zA),n=0;n<B.length;n++){var s=B[n],o=B[n+1];20===s.type&&(o=o&&_A(o)?o.number:1,r.push({counter:s.value,increment:o}))}return r}},ar={name:"counter-reset",initialValue:"none",prefix:!0,type:1,parse:function(A,e){if(0===e.length)return[];for(var t=[],r=e.filter(zA),B=0;B<r.length;B++){var n=r[B],s=r[B+1];l(n)&&"none"!==n.value&&(s=s&&_A(s)?s.number:0,t.push({counter:n.value,reset:s}))}return t}},gr={name:"duration",initialValue:"0s",prefix:!1,type:1,parse:function(e,A){return A.filter(se).map(function(A){return Ar(e,A)})}},wr={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 r=[],B=e.filter(qA);if(B.length%2!=0)return null;for(var n=0;n<B.length;n+=2){var s=B[n].value,o=B[n+1].value;r.push({open:s,close:o})}return r}},lr={name:"box-shadow",initialValue:"none",type:1,prefix:!1,parse:function(n,A){return 1===A.length&&jA(A[0],"none")?[]:c(A).map(function(A){for(var e={color:255,offsetX:C,offsetY:C,blur:C,spread:C,inset:!1},t=0,r=0;r<A.length;r++){var B=A[r];jA(B,"inset")?e.inset=!0:ie(B)?(0===t?e.offsetX=B:1===t?e.offsetY=B:2===t?e.blur=B:e.spread=B,t++):e.color=ue.parse(n,B)}return e})}},Ur={name:"paint-order",initialValue:"normal",prefix:!1,type:1,parse:function(A,e){var t=[];return e.filter(l).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}},Cr={name:"-webkit-text-stroke-color",initialValue:"currentcolor",prefix:!1,type:3,format:"color"},ur={name:"-webkit-text-stroke-width",initialValue:"0",type:0,prefix:!1,parse:function(A,e){return se(e)?e.number:0}},Fr=(hr.prototype.isVisible=function(){return 0<this.display&&0<this.opacity&&0===this.visibility},hr.prototype.isTransparent=function(){return re(this.backgroundColor)},hr.prototype.isTransformed=function(){return null!==this.transform},hr.prototype.isPositioned=function(){return 0!==this.position},hr.prototype.isPositionedWithZIndex=function(){return this.isPositioned()&&!this.zIndex.auto},hr.prototype.isFloating=function(){return 0!==this.float},hr.prototype.isInlineLevel=function(){return F(this.display,4)||F(this.display,33554432)||F(this.display,268435456)||F(this.display,536870912)||F(this.display,67108864)||F(this.display,134217728)},hr);function hr(A,e){this.animationDuration=r(A,gr,e.animationDuration),this.backgroundClip=r(A,be,e.backgroundClip),this.backgroundColor=r(A,De,e.backgroundColor),this.backgroundImage=r(A,$e,e.backgroundImage),this.backgroundOrigin=r(A,At,e.backgroundOrigin),this.backgroundPosition=r(A,et,e.backgroundPosition),this.backgroundRepeat=r(A,tt,e.backgroundRepeat),this.backgroundSize=r(A,Bt,e.backgroundSize),this.borderTopColor=r(A,st,e.borderTopColor),this.borderRightColor=r(A,ot,e.borderRightColor),this.borderBottomColor=r(A,it,e.borderBottomColor),this.borderLeftColor=r(A,Qt,e.borderLeftColor),this.borderTopLeftRadius=r(A,ct,e.borderTopLeftRadius),this.borderTopRightRadius=r(A,at,e.borderTopRightRadius),this.borderBottomRightRadius=r(A,gt,e.borderBottomRightRadius),this.borderBottomLeftRadius=r(A,wt,e.borderBottomLeftRadius),this.borderTopStyle=r(A,lt,e.borderTopStyle),this.borderRightStyle=r(A,Ut,e.borderRightStyle),this.borderBottomStyle=r(A,Ct,e.borderBottomStyle),this.borderLeftStyle=r(A,ut,e.borderLeftStyle),this.borderTopWidth=r(A,Ft,e.borderTopWidth),this.borderRightWidth=r(A,ht,e.borderRightWidth),this.borderBottomWidth=r(A,dt,e.borderBottomWidth),this.borderLeftWidth=r(A,ft,e.borderLeftWidth),this.boxShadow=r(A,lr,e.boxShadow),this.color=r(A,pt,e.color),this.direction=r(A,Ht,e.direction),this.display=r(A,Et,e.display),this.float=r(A,yt,e.cssFloat),this.fontFamily=r(A,Br,e.fontFamily),this.fontSize=r(A,nr,e.fontSize),this.fontStyle=r(A,ir,e.fontStyle),this.fontVariant=r(A,or,e.fontVariant),this.fontWeight=r(A,sr,e.fontWeight),this.letterSpacing=r(A,Kt,e.letterSpacing),this.lineBreak=r(A,mt,e.lineBreak),this.lineHeight=r(A,Lt,e.lineHeight),this.listStyleImage=r(A,bt,e.listStyleImage),this.listStylePosition=r(A,Dt,e.listStylePosition),this.listStyleType=r(A,vt,e.listStyleType),this.marginTop=r(A,xt,e.marginTop),this.marginRight=r(A,St,e.marginRight),this.marginBottom=r(A,Mt,e.marginBottom),this.marginLeft=r(A,Tt,e.marginLeft),this.opacity=r(A,er,e.opacity);var t=r(A,Gt,e.overflow);this.overflowX=t[0],this.overflowY=t[1<t.length?1:0],this.overflowWrap=r(A,Ot,e.overflowWrap),this.paddingTop=r(A,Vt,e.paddingTop),this.paddingRight=r(A,kt,e.paddingRight),this.paddingBottom=r(A,Rt,e.paddingBottom),this.paddingLeft=r(A,Nt,e.paddingLeft),this.paintOrder=r(A,Ur,e.paintOrder),this.position=r(A,Jt,e.position),this.textAlign=r(A,Pt,e.textAlign),this.textDecorationColor=r(A,tr,null!=(t=e.textDecorationColor)?t:e.color),this.textDecorationLine=r(A,rr,null!=(t=e.textDecorationLine)?t:e.textDecoration),this.textShadow=r(A,Xt,e.textShadow),this.textTransform=r(A,Yt,e.textTransform),this.transform=r(A,Wt,e.transform),this.transformOrigin=r(A,qt,e.transformOrigin),this.visibility=r(A,jt,e.visibility),this.webkitTextStrokeColor=r(A,Cr,e.webkitTextStrokeColor),this.webkitTextStrokeWidth=r(A,ur,e.webkitTextStrokeWidth),this.wordBreak=r(A,zt,e.wordBreak),this.zIndex=r(A,$t,e.zIndex)}for(var dr=function(A,e){this.content=r(A,Qr,e.content),this.quotes=r(A,wr,e.quotes)},fr=function(A,e){this.counterIncrement=r(A,cr,e.counterIncrement),this.counterReset=r(A,ar,e.counterReset)},r=function(A,e,t){var r=new WA,t=null!=t?t.toString():e.initialValue,B=(r.write(t),new ZA(r.read()));switch(e.type){case 2:var n=B.parseComponentValue();return e.parse(A,l(n)?n.value:e.initialValue);case 0:return e.parse(A,B.parseComponentValue());case 1:return e.parse(A,B.parseComponentValues());case 4:return B.parseComponentValue();case 3:switch(e.format){case"angle":return Ce(A,B.parseComponentValue());case"color":return ue.parse(A,B.parseComponentValue());case"image":return Ve(A,B.parseComponentValue());case"length":var s=B.parseComponentValue();return ie(s)?s:C;case"length-percentage":s=B.parseComponentValue();return U(s)?s:C;case"time":return Ar(A,B.parseComponentValue())}}},pr=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}},Hr=function(A,e){A=pr(A);return 1===A||e===A},n=function(A,e){this.context=A,this.textNodes=[],this.elements=[],this.flags=0,Hr(e,3),this.styles=new Fr(A,window.getComputedStyle(e,null)),kB(e)&&(this.styles.animationDuration.some(function(A){return 0<A})&&(e.style.animationDuration="0s"),null!==this.styles.transform&&(e.style.transform="none")),this.bounds=V(this.context,e),Hr(e,4)&&(this.flags|=16)},Er="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",Ir="undefined"==typeof Uint8Array?[]:new Uint8Array(256),yr=0;yr<Er.length;yr++)Ir[Er.charCodeAt(yr)]=yr;function Kr(A,e,t){return A.slice?A.slice(e,t):new Uint16Array(Array.prototype.slice.call(A,e,t))}Lr.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};var mr=Lr;function Lr(A,e,t,r,B,n){this.initialValue=A,this.errorValue=e,this.highStart=t,this.highValueIndex=r,this.index=B,this.data=n}for(var br="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",Dr="undefined"==typeof Uint8Array?[]:new Uint8Array(256),vr=0;vr<br.length;vr++)Dr[br.charCodeAt(vr)]=vr;function xr(A){return Vr.get(A)}function Sr(A){return 0===A[0]&&255===A[1]&&0===A[2]&&255===A[3]}function Mr(A,e,t,r,B){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",r.toString()),n.setAttributeNS(null,"externalResourcesRequired","true"),s.appendChild(n),n.appendChild(B),s}function Tr(r){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(r))})}function Gr(A,e){if(d.SUPPORT_NATIVE_TEXT_SEGMENTATION)return r=new Intl.Segmenter(void 0,{granularity:"word"}),Array.from(r.segment(A)).map(function(A){return A.segment});for(var t,r=e,B=fA(A,{lineBreak:r.lineBreak,wordBreak:"break-word"===r.overflowWrap?"break-word":r.wordBreak}),n=[],s=function(){var A,e;t.value&&(A=t.value.slice(),A=R(A),e="",A.forEach(function(A){-1===Yr.indexOf(A)?e+=a(A):(e.length&&n.push(e),n.push(a(A)),e="")}),e.length&&n.push(e))};!(t=B.next()).done;)s();return n}s=function(A){for(var e,t,r,B,n=.75*A.length,s=A.length,o=0,n=("="===A[A.length-1]&&(n--,"="===A[A.length-2]&&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=Ir[A.charCodeAt(Q)],t=Ir[A.charCodeAt(Q+1)],r=Ir[A.charCodeAt(Q+2)],B=Ir[A.charCodeAt(Q+3)],i[o++]=e<<2|t>>4,i[o++]=(15&t)<<4|r>>2,i[o++]=(3&r)<<6|63&B;return n}(s=" "),o=Array.isArray(s)?function(A){for(var e=A.length,t=[],r=0;r<e;r+=4)t.push(A[r+3]<<24|A[r+2]<<16|A[r+1]<<8|A[r]);return t}(s):new Uint32Array(s),s=Array.isArray(s)?function(A){for(var e=A.length,t=[],r=0;r<e;r+=2)t.push(A[r+1]<<8|A[r]);return t}(s):new Uint16Array(s),_=Kr(s,12,o[4]/2),s=2===o[5]?Kr(s,(24+o[4])/2):(s=o,p=Math.ceil((24+o[4])/4),s.slice?s.slice(p,D):new Uint32Array(Array.prototype.slice.call(s,p,D)));var s,o,Or,Vr=new mr(o[0],o[1],o[2],o[3],_,s),Q="×",kr=function(A){var t=function(A){for(var e=[],t=0,r=A.length;t<r;){var B,n=A.charCodeAt(t++);55296<=n&&n<=56319&&t<r?56320==(64512&(B=A.charCodeAt(t++)))?e.push(((1023&n)<<10)+(1023&B)+65536):(e.push(n),t--):e.push(n)}return e}(A),r=t.length,B=0,n=0,s=t.map(xr);return{next:function(){if(r<=B)return{done:!0,value:null};for(var A,e=Q;B<r&&(e=function(A,e){var t=e-2,r=A[t],B=A[e-1],e=A[e];if(2===B&&3===e)return Q;if(2!==B&&3!==B&&4!==B&&2!==e&&3!==e&&4!==e){if(8===B&&-1!==[8,9,11,12].indexOf(e))return Q;if(!(11!==B&&9!==B||9!==e&&10!==e))return Q;if((12===B||10===B)&&10===e)return Q;if(13===e||5===e)return Q;if(7===e)return Q;if(1===B)return Q;if(13===B&&14===e){for(;5===r;)r=A[--t];if(14===r)return Q}if(15===B&&15===e){for(var n=0;15===r;)n++,r=A[--t];if(n%2==0)return Q}}return"÷"}(s,++B))===Q;);return e!==Q||B===r?(A=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 r=[],B=-1,n="";++B<t;){var s=A[B];s<=65535?r.push(s):(s-=65536,r.push(55296+(s>>10),s%1024+56320)),(B+1===t||16384<r.length)&&(n+=String.fromCharCode.apply(String,r),r.length=0)}return n}.apply(null,t.slice(n,B)),n=B,{value:A,done:!1}):{done:!0,value:null}}}},d={get SUPPORT_RANGE_BOUNDS(){var A=function(A){if(A.createRange){var e=A.createRange();if(e.getBoundingClientRect){var t=A.createElement("boundtest"),e=(t.style.height="123px",t.style.display="block",A.body.appendChild(t),e.selectNode(t),e.getBoundingClientRect()),e=Math.round(e.height);if(A.body.removeChild(t),123===e)return!0}}return!1}(document);return Object.defineProperty(d,"SUPPORT_RANGE_BOUNDS",{value:A}),A},get SUPPORT_WORD_BREAKING(){var A,r,B,e,n,s,t=d.SUPPORT_RANGE_BOUNDS&&(t=document,(A=t.createElement("boundtest")).style.width="50px",A.style.display="block",A.style.fontSize="12px",A.style.letterSpacing="0px",A.style.wordSpacing="0px",t.body.appendChild(A),r=t.createRange(),A.innerHTML="function"==typeof"".repeat?"&#128104;".repeat(10):"",B=A.firstChild,e=R(B.data).map(function(A){return a(A)}),n=0,s={},e=e.every(function(A,e){r.setStart(B,n),r.setEnd(B,n+A.length);var t=r.getBoundingClientRect(),A=(n+=A.length,t.x>s.x||t.y>s.y);return s=t,0===e||A}),t.body.removeChild(A),e);return Object.defineProperty(d,"SUPPORT_WORD_BREAKING",{value:t}),t},get SUPPORT_SVG_DRAWING(){var A=function(A){var e=new Image,A=A.createElement("canvas"),t=A.getContext("2d");if(!t)return!1;e.src="data:image/svg+xml,<svg xmlns='http://www.w3.org/2000/svg'></svg>";try{t.drawImage(e,0,0),A.toDataURL()}catch(A){return!1}return!0}(document);return Object.defineProperty(d,"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"),r=100,B=(A.width=r,A.height=r,A.getContext("2d"));if(!B)return Promise.reject(!1);B.fillStyle="rgb(0, 255, 0)",B.fillRect(0,0,r,r);var e=new Image,n=A.toDataURL(),A=(e.src=n,Mr(r,r,0,0,e));return B.fillStyle="red",B.fillRect(0,0,r,r),Tr(A).then(function(A){B.drawImage(A,0,0);var A=B.getImageData(0,0,r,r).data,e=(B.fillStyle="red",B.fillRect(0,0,r,r),t.createElement("div"));return e.style.backgroundImage="url("+n+")",e.style.height="100px",Sr(A)?Tr(Mr(r,r,0,0,e)):Promise.reject(!1)}).then(function(A){return B.drawImage(A,0,0),Sr(B.getImageData(0,0,r,r).data)}).catch(function(){return!1})}(document):Promise.resolve(!1);return Object.defineProperty(d,"SUPPORT_FOREIGNOBJECT_DRAWING",{value:A}),A},get SUPPORT_CORS_IMAGES(){var A=void 0!==(new Image).crossOrigin;return Object.defineProperty(d,"SUPPORT_CORS_IMAGES",{value:A}),A},get SUPPORT_RESPONSE_TYPE(){var A="string"==typeof(new XMLHttpRequest).responseType;return Object.defineProperty(d,"SUPPORT_RESPONSE_TYPE",{value:A}),A},get SUPPORT_CORS_XHR(){var A="withCredentials"in new XMLHttpRequest;return Object.defineProperty(d,"SUPPORT_CORS_XHR",{value:A}),A},get SUPPORT_NATIVE_TEXT_SEGMENTATION(){var A=!("undefined"==typeof Intl||!Intl.Segmenter);return Object.defineProperty(d,"SUPPORT_NATIVE_TEXT_SEGMENTATION",{value:A}),A}},Rr=function(A,e){this.text=A,this.bounds=e},Nr=function(A,e){var t=e.ownerDocument;if(t){var t=t.createElement("html2canvaswrapper"),r=(t.appendChild(e.cloneNode(!0)),e.parentNode);if(r)return r.replaceChild(t,e),e=V(A,t),t.firstChild&&r.replaceChild(t.firstChild,t),e}return h.EMPTY},Pr=function(A,e,t){var r=A.ownerDocument;if(!r)throw new Error("Node has no owner document");r=r.createRange();return r.setStart(A,e),r.setEnd(A,e+t),r},Jr=function(A){var e;if(d.SUPPORT_NATIVE_TEXT_SEGMENTATION)return e=new Intl.Segmenter(void 0,{granularity:"grapheme"}),Array.from(e.segment(A)).map(function(A){return A.segment});for(var t,r=kr(A),B=[];!(t=r.next()).done;)t.value&&B.push(t.value.slice());return B},Xr=function(A,e){return 0!==e.letterSpacing?Jr(A):Gr(A,e)},Yr=[32,160,4961,65792,65793,4153,4241],Wr=function(A,e,t){var B,n,s,o,i;this.text=Zr(e.data,t.textTransform),this.textBounds=(B=A,A=this.text,s=e,A=Xr(A,n=t),o=[],i=0,A.forEach(function(A){var e,t,r;n.textDecorationLine.length||0<A.trim().length?d.SUPPORT_RANGE_BOUNDS?1<(e=Pr(s,i,A.length).getClientRects()).length?(r=Jr(A),t=0,r.forEach(function(A){o.push(new Rr(A,h.fromDOMRectList(B,Pr(s,t+i,A.length).getClientRects()))),t+=A.length})):o.push(new Rr(A,h.fromDOMRectList(B,e))):(r=s.splitText(A.length),o.push(new Rr(A,Nr(B,s))),s=r):d.SUPPORT_RANGE_BOUNDS||(s=s.splitText(A.length)),i+=A.length}),o)},Zr=function(A,e){switch(e){case 1:return A.toLowerCase();case 3:return A.replace(_r,qr);case 2:return A.toUpperCase();default:return A}},_r=/(^|\s|:|-|\(|\))([a-z])/g,qr=function(A,e,t){return 0<A.length?e+t.toUpperCase():A},jr=(A(zr,Or=n),zr);function zr(A,e){A=Or.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}A(eB,$r=n);var $r,AB=eB;function eB(A,e){A=$r.call(this,A,e)||this;return A.canvas=e,A.intrinsicWidth=e.width,A.intrinsicHeight=e.height,A}A(BB,tB=n);var tB,rB=BB;function BB(A,e){var t=tB.call(this,A,e)||this,r=new XMLSerializer,A=V(A,e);return e.setAttribute("width",A.width+"px"),e.setAttribute("height",A.height+"px"),t.svg="data:image/svg+xml,"+encodeURIComponent(r.serializeToString(e)),t.intrinsicWidth=e.width.baseVal.value,t.intrinsicHeight=e.height.baseVal.value,t.context.cache.addImage(t.svg),t}A(oB,nB=n);var nB,sB=oB;function oB(A,e){A=nB.call(this,A,e)||this;return A.value=e.value,A}A(cB,iB=n);var iB,QB=cB;function cB(A,e){A=iB.call(this,A,e)||this;return A.start=e.start,A.reversed="boolean"==typeof e.reversed&&!0===e.reversed,A}var aB,gB=[{type:15,flags:0,unit:"px",number:3}],wB=[{type:16,flags:0,number:50}],lB="checkbox",UB="radio",CB="password",uB=707406591,FB=(A(hB,aB=n),hB);function hB(A,e){var t=aB.call(this,A,e)||this;switch(t.type=e.type.toLowerCase(),t.checked=e.checked,t.value=0===(e=(A=e).type===CB?new Array(A.value.length+1).join("•"):A.value).length?A.placeholder||"":e,t.type!==lB&&t.type!==UB||(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=(A=t.bounds).width>A.height?new h(A.left+(A.width-A.height)/2,A.top,A.height,A.height):A.width<A.height?new h(A.left,A.top+(A.height-A.width)/2,A.width,A.width):A),t.type){case lB:t.styles.borderTopRightRadius=t.styles.borderTopLeftRadius=t.styles.borderBottomRightRadius=t.styles.borderBottomLeftRadius=gB;break;case UB:t.styles.borderTopRightRadius=t.styles.borderTopLeftRadius=t.styles.borderBottomRightRadius=t.styles.borderBottomLeftRadius=wB}return t}A(pB,dB=n);var dB,fB=pB;function pB(A,e){A=dB.call(this,A,e)||this,e=e.options[e.selectedIndex||0];return A.value=e&&e.text||"",A}A(IB,HB=n);var HB,EB=IB;function IB(A,e){A=HB.call(this,A,e)||this;return A.value=e.value,A}A(mB,yB=n);var yB,KB=mB;function mB(A,e){var t,r,B=yB.call(this,A,e)||this;B.src=e.src,B.width=parseInt(e.width,10)||0,B.height=parseInt(e.height,10)||0,B.backgroundColor=B.styles.backgroundColor;try{e.contentWindow&&e.contentWindow.document&&e.contentWindow.document.documentElement&&(B.tree=MB(A,e.contentWindow.document.documentElement),t=e.contentWindow.document.documentElement?fe(A,getComputedStyle(e.contentWindow.document.documentElement).backgroundColor):Le.TRANSPARENT,r=e.contentWindow.document.body?fe(A,getComputedStyle(e.contentWindow.document.body).backgroundColor):Le.TRANSPARENT,B.backgroundColor=re(t)?re(r)?B.styles.backgroundColor:r:t)}catch(A){}return B}function LB(A){return"VIDEO"===A.tagName}function bB(A){return"STYLE"===A.tagName}function DB(A){return 0<A.tagName.indexOf("-")}var vB=["OL","UL","MENU"],xB=function(e,A,t,r){for(var B=A.firstChild;B;B=s){var n,s=B.nextSibling;OB(B)&&0<B.data.trim().length?t.textNodes.push(new Wr(e,B,t.styles)):VB(B)&&($B(B)&&B.assignedNodes?B.assignedNodes().forEach(function(A){return xB(e,A,t,r)}):(n=SB(e,B)).styles.isVisible()&&(TB(B,n,r)?n.flags|=4:GB(n.styles)&&(n.flags|=2),-1!==vB.indexOf(B.tagName)&&(n.flags|=8),t.elements.push(n),B.slot,B.shadowRoot?xB(e,B.shadowRoot,n,r):jB(B)||YB(B)||zB(B)||xB(e,B,n,r)))}},SB=function(A,e){return new(_B(e)?jr:ZB(e)?AB:YB(e)?rB:NB(e)?sB:PB(e)?QB:JB(e)?FB:zB(e)?fB:jB(e)?EB:qB(e)?KB:n)(A,e)},MB=function(A,e){var t=SB(A,e);return t.flags|=4,xB(A,e,t,t),t},TB=function(A,e,t){return e.styles.isPositionedWithZIndex()||e.styles.opacity<1||e.styles.isTransformed()||WB(A)&&t.styles.isTransparent()},GB=function(A){return A.isPositioned()||A.isFloating()},OB=function(A){return A.nodeType===Node.TEXT_NODE},VB=function(A){return A.nodeType===Node.ELEMENT_NODE},kB=function(A){return VB(A)&&void 0!==A.style&&!RB(A)},RB=function(A){return"object"==typeof A.className},NB=function(A){return"LI"===A.tagName},PB=function(A){return"OL"===A.tagName},JB=function(A){return"INPUT"===A.tagName},XB=function(A){return"HTML"===A.tagName},YB=function(A){return"svg"===A.tagName},WB=function(A){return"BODY"===A.tagName},ZB=function(A){return"CANVAS"===A.tagName},_B=function(A){return"IMG"===A.tagName},qB=function(A){return"IFRAME"===A.tagName},jB=function(A){return"TEXTAREA"===A.tagName},zB=function(A){return"SELECT"===A.tagName},$B=function(A){return"SLOT"===A.tagName},An=(en.prototype.getCounterValue=function(A){A=this.counters[A];return A&&A.length?A[A.length-1]:1},en.prototype.getCounterValues=function(A){A=this.counters[A];return A||[]},en.prototype.pop=function(A){var e=this;A.forEach(function(A){return e.counters[A].pop()})},en.prototype.parse=function(A){var t=this,e=A.counterIncrement,A=A.counterReset,r=!0,B=(null!==e&&e.forEach(function(A){var e=t.counters[A.counter];e&&0!==A.increment&&(r=!1,e.length||e.push(1),e[Math.max(0,e.length-1)]+=A.increment)}),[]);return r&&A.forEach(function(A){var e=t.counters[A.counter];B.push(A.counter),(e=e||(t.counters[A.counter]=[])).push(A.reset)}),B},en);function en(){this.counters={}}function tn(r,A,e,B,t,n){return r<A||e<r?un(r,t,0<n.length):B.integers.reduce(function(A,e,t){for(;e<=r;)r-=e,A+=B.values[t];return A},"")+n}function f(A,e,t,r,B){var n=t-e+1;return(A<0?"-":"")+(an(Math.abs(A),n,r,function(A){return a(Math.floor(A%n)+e)})+B)}function rn(A,e,t){void 0===t&&(t=". ");var r=e.length;return an(Math.abs(A),r,!1,function(A){return e[Math.floor(A%r)]})+t}function Bn(A,e,t,r,B,n){if(A<-9999||9999<A)return un(A,4,0<B.length);var s=Math.abs(A),o=B;if(0===s)return e[0]+o;for(var i=0;0<s&&i<=4;i++){var Q=s%10;0==Q&&F(n,gn)&&""!==o?o=e[Q]+o:1<Q||1==Q&&0===i||1==Q&&1===i&&F(n,wn)||1==Q&&1===i&&F(n,ln)&&100<A||1==Q&&1<i&&F(n,Un)?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?r:"")+o}var nn,p,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=function(A,e,t,r){for(var B="";t||A--,B=r(A)+B,e<=(A/=e)*e;);return B},gn=1,wn=2,ln=4,Un=8,Cn="마이너스",un=function(A,e,t){var r=t?". ":"",B=t?"、":"",n=t?", ":"",s=t?" ":"";switch(e){case 0:return"•"+s;case 1:return"◦"+s;case 2:return"◾"+s;case 5:var o=f(A,48,57,!0,r);return o.length<4?"0"+o:o;case 4:return rn(A,"〇一二三四五六七八九",B);case 6:return tn(A,1,3999,sn,3,r).toLowerCase();case 7:return tn(A,1,3999,sn,3,r);case 8:return f(A,945,969,!1,r);case 9:return f(A,97,122,!1,r);case 10:return f(A,65,90,!1,r);case 11:return f(A,1632,1641,!0,r);case 12:case 49:return tn(A,1,9999,on,3,r);case 35:return tn(A,1,9999,on,3,r).toLowerCase();case 13:return f(A,2534,2543,!0,r);case 14:case 30:return f(A,6112,6121,!0,r);case 15:return rn(A,"子丑寅卯辰巳午未申酉戌亥",B);case 16:return rn(A,"甲乙丙丁戊己庚辛壬癸",B);case 17:case 48:return Bn(A,"零一二三四五六七八九","十百千萬","負",B,wn|ln|Un);case 47:return Bn(A,"零壹貳參肆伍陸柒捌玖","拾佰仟萬","負",B,gn|wn|ln|Un);case 42:return Bn(A,"零一二三四五六七八九","十百千萬","负",B,wn|ln|Un);case 41:return Bn(A,"零壹贰叁肆伍陆柒捌玖","拾佰仟萬","负",B,gn|wn|ln|Un);case 26:return Bn(A,"〇一二三四五六七八九","十百千万","マイナス",B,0);case 25:return Bn(A,"零壱弐参四伍六七八九","拾百千万","マイナス",B,gn|wn|ln);case 31:return Bn(A,"영일이삼사오육칠팔구","십백천만",Cn,n,gn|wn|ln);case 33:return Bn(A,"零一二三四五六七八九","十百千萬",Cn,n,0);case 32:return Bn(A,"零壹貳參四五六七八九","拾百千",Cn,n,gn|wn|ln);case 18:return f(A,2406,2415,!0,r);case 20:return tn(A,1,19999,cn,3,r);case 21:return f(A,2790,2799,!0,r);case 22:return f(A,2662,2671,!0,r);case 22:return tn(A,1,10999,Qn,3,r);case 23:return rn(A,"あいうえおかきくけこさしすせそたちつてとなにぬねのはひふへほまみむめもやゆよらりるれろわゐゑをん");case 24:return rn(A,"いろはにほへとちりぬるをわかよたれそつねならむうゐのおくやまけふこえてあさきゆめみしゑひもせす");case 27:return f(A,3302,3311,!0,r);case 28:return rn(A,"アイウエオカキクケコサシスセソタチツテトナニヌネノハヒフヘホマミムメモヤユヨラリルレロワヰヱヲン",B);case 29:return rn(A,"イロハニホヘトチリヌルヲワカヨタレソツネナラムウヰノオクヤマケフコエテアサキユメミシヱヒモセス",B);case 34:return f(A,3792,3801,!0,r);case 37:return f(A,6160,6169,!0,r);case 38:return f(A,4160,4169,!0,r);case 39:return f(A,2918,2927,!0,r);case 40:return f(A,1776,1785,!0,r);case 43:return f(A,3046,3055,!0,r);case 44:return f(A,3174,3183,!0,r);case 45:return f(A,3664,3673,!0,r);case 46:return f(A,3872,3881,!0,r);default:return f(A,48,57,!0,r)}},Fn="data-html2canvas-ignore",hn=(H.prototype.toIFrame=function(A,r){var e=this,B=fn(A,r);if(!B.contentWindow)return Promise.reject("Unable to find iframe window");var t=A.defaultView.pageXOffset,A=A.defaultView.pageYOffset,n=B.contentWindow,s=n.document,o=Hn(B).then(function(){return i(e,void 0,void 0,function(){var e,t;return K(this,function(A){switch(A.label){case 0:return(this.scrolledElements.forEach(mn),n&&(n.scrollTo(r.left,r.top),!/(iPad|iPhone|iPod)/g.test(navigator.userAgent)||n.scrollY===r.top&&n.scrollX===r.left||(this.context.logger.warn("Unable to restore scroll position for cloned document"),this.context.windowBounds=this.context.windowBounds.add(n.scrollX-r.left,n.scrollY-r.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")]:s.fonts&&s.fonts.ready?[4,s.fonts.ready]:[3,2];case 1:A.sent(),A.label=2;case 2:return/(AppleWebKit)/g.test(navigator.userAgent)?[4,pn(s)]:[3,4];case 3:A.sent(),A.label=4;case 4:return"function"==typeof e?[2,Promise.resolve().then(function(){return e(s,t)}).then(function(){return B})]:[2,B]}})})});return s.open(),s.write(yn(document.doctype)+"<html></html>"),Kn(this.referenceElement.ownerDocument,t,A),s.replaceChild(s.adoptNode(this.documentElement),s.documentElement),s.close(),o},H.prototype.createElementClone=function(A){if(Hr(A,2),ZB(A))return this.createCanvasClone(A);if(LB(A))return this.createVideoClone(A);if(bB(A))return this.createStyleClone(A);var e=A.cloneNode(!1);return _B(e)&&(_B(A)&&A.currentSrc&&A.currentSrc!==A.src&&(e.src=A.currentSrc,e.srcset=""),"lazy"===e.loading&&(e.loading="eager")),DB(e)?this.createCustomElementClone(e):e},H.prototype.createCustomElementClone=function(A){var e=document.createElement("html2canvascustomelement");return In(A.style,e),e},H.prototype.createStyleClone=function(A){try{var e,t,r=A.sheet;if(r&&r.cssRules)return e=[].slice.call(r.cssRules,0).reduce(function(A,e){return e&&"string"==typeof e.cssText?A+e.cssText:A},""),(t=A.cloneNode(!1)).textContent=e,t}catch(A){if(this.context.logger.error("Unable to access cssRules property",A),"SecurityError"!==A.name)throw A}return A.cloneNode(!1)},H.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 r,B,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):((r=null!=(A=e.getContext("webgl2"))?A:e.getContext("webgl"))&&!1===(null==(B=r.getContextAttributes())?void 0:B.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},H.prototype.createVideoClone=function(e){var A=e.ownerDocument.createElement("canvas"),t=(A.width=e.offsetWidth,A.height=e.offsetHeight,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)}t=e.ownerDocument.createElement("canvas");return t.width=e.offsetWidth,t.height=e.offsetHeight,t},H.prototype.appendChildNode=function(A,e,t){VB(e)&&("SCRIPT"===e.tagName||e.hasAttribute(Fn)||"function"==typeof this.options.ignoreElements&&this.options.ignoreElements(e))||this.options.copyStyles&&VB(e)&&bB(e)||A.appendChild(this.cloneNode(e,t))},H.prototype.cloneChildNodes=function(A,e,t){for(var r,B=this,n=(A.shadowRoot||A).firstChild;n;n=n.nextSibling)VB(n)&&$B(n)&&"function"==typeof n.assignedNodes?(r=n.assignedNodes()).length&&r.forEach(function(A){return B.appendChildNode(e,A,t)}):this.appendChildNode(e,n,t)},H.prototype.cloneNode=function(A,e){if(OB(A))return document.createTextNode(A.data);if(!A.ownerDocument)return A.cloneNode(!1);var t,r,B,n,s=A.ownerDocument.defaultView;return s&&VB(A)&&(kB(A)||RB(A))?((t=this.createElementClone(A)).style.transitionProperty="none",r=s.getComputedStyle(A),n=s.getComputedStyle(A,":before"),s=s.getComputedStyle(A,":after"),this.referenceElement===A&&kB(t)&&(this.clonedReferenceElement=t),WB(t)&&vn(t),B=this.counters.parse(new fr(this.context,r)),n=this.resolvePseudoContent(A,t,n,nn.BEFORE),DB(A)&&(e=!0),LB(A)||this.cloneChildNodes(A,t,e),n&&t.insertBefore(n,t.firstChild),(n=this.resolvePseudoContent(A,t,s,nn.AFTER))&&t.appendChild(n),this.counters.pop(B),(r&&(this.options.copyStyles||RB(A))&&!qB(A)||e)&&In(r,t),0===A.scrollTop&&0===A.scrollLeft||this.scrolledElements.push([t,A.scrollLeft,A.scrollTop]),(jB(A)||zB(A))&&(jB(t)||zB(t))&&(t.value=A.value),t):A.cloneNode(!1)},H.prototype.resolvePseudoContent=function(s,A,e,t){var o=this;if(e){var i,Q,r=e.content,c=A.ownerDocument;if(c&&r&&"none"!==r&&"-moz-alt-content"!==r&&"none"!==e.display)return this.counters.parse(new fr(this.context,e)),i=new dr(this.context,e),Q=c.createElement("html2canvaspseudoelement"),In(e,Q),i.content.forEach(function(A){if(0===A.type)Q.appendChild(c.createTextNode(A.value));else if(22===A.type){var e=c.createElement("img");e.src=A.value,e.style.opacity="1",Q.appendChild(e)}else if(18===A.type){var t,r,B,n;"attr"===A.name?(e=A.values.filter(l)).length&&Q.appendChild(c.createTextNode(s.getAttribute(e[0].value)||"")):"counter"===A.name?(B=(e=A.values.filter($A))[0],n=e[1],B&&l(B)&&(e=o.counters.getCounterValue(B.value),t=n&&l(n)?vt.parse(o.context,n.value):3,Q.appendChild(c.createTextNode(un(e,t,!1))))):"counters"===A.name&&(B=(e=A.values.filter($A))[0],t=e[1],n=e[2],B&&l(B)&&(e=o.counters.getCounterValues(B.value),r=n&&l(n)?vt.parse(o.context,n.value):3,B=t&&0===t.type?t.value:"",n=e.map(function(A){return un(A,r,!1)}).join(B),Q.appendChild(c.createTextNode(n))))}else if(20===A.type)switch(A.value){case"open-quote":Q.appendChild(c.createTextNode(We(i.quotes,o.quoteDepth++,!0)));break;case"close-quote":Q.appendChild(c.createTextNode(We(i.quotes,--o.quoteDepth,!1)));break;default:Q.appendChild(c.createTextNode(A.value))}}),Q.className=Ln+" "+bn,r=t===nn.BEFORE?" "+Ln:" "+bn,RB(A)?A.className.baseValue+=r:A.className+=r,Q}},H.destroy=function(A){return!!A.parentNode&&(A.parentNode.removeChild(A),!0)},H);function H(A,e,t){if(this.context=A,this.options=t,this.scrolledElements=[],this.referenceElement=e,this.counters=new An,this.quoteDepth=0,!e.ownerDocument)throw new Error("Cloned element does not have an owner document");this.documentElement=this.cloneNode(e.ownerDocument.documentElement,!1)}(p=nn=nn||{})[p.BEFORE=0]="BEFORE",p[p.AFTER=1]="AFTER";function dn(e){return new Promise(function(A){!e.complete&&e.src?(e.onload=A,e.onerror=A):A()})}var fn=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(Fn,"true"),A.body.appendChild(t),t},pn=function(A){return Promise.all([].slice.call(A.images,0).map(dn))},Hn=function(B){return new Promise(function(e,A){var t=B.contentWindow;if(!t)return A("No window assigned for iframe");var r=t.document;t.onload=B.onload=function(){t.onload=B.onload=null;var A=setInterval(function(){0<r.body.childNodes.length&&"complete"===r.readyState&&(clearInterval(A),e(B))},50)}})},En=["all","d","content"],In=function(A,e){for(var t=A.length-1;0<=t;t--){var r=A.item(t);-1===En.indexOf(r)&&e.style.setProperty(r,A.getPropertyValue(r))}return e},yn=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},Kn=function(A,e,t){A&&A.defaultView&&(e!==A.defaultView.pageXOffset||t!==A.defaultView.pageYOffset)&&A.defaultView.scrollTo(e,t)},mn=function(A){var e=A[0],t=A[1],A=A[2];e.scrollLeft=t,e.scrollTop=A},Ln="___html2canvas___pseudoelement_before",bn="___html2canvas___pseudoelement_after",Dn='{\n    content: "" !important;\n    display: none !important;\n}',vn=function(A){xn(A,"."+Ln+":before"+Dn+"\n         ."+bn+":after"+Dn)},xn=function(A,e){var t=A.ownerDocument;t&&((t=t.createElement("style")).textContent=e,A.appendChild(t))},Sn=(E.getOrigin=function(A){var e=E._link;return e?(e.href=A,e.href=e.href,e.protocol+e.hostname+e.port):"about:blank"},E.isSameOrigin=function(A){return E.getOrigin(A)===E._origin},E.setContext=function(A){E._link=A.document.createElement("a"),E._origin=E.getOrigin(A.location.href)},E._origin="about:blank",E);function E(){}Tn.prototype.addImage=function(A){var e=Promise.resolve();return this.has(A)||(Pn(A)||kn(A))&&(this._cache[A]=this.loadImage(A)).catch(function(){}),e},Tn.prototype.match=function(A){return this._cache[A]},Tn.prototype.loadImage=function(s){return i(this,void 0,void 0,function(){var e,r,t,B,n=this;return K(this,function(A){switch(A.label){case 0:return(e=Sn.isSameOrigin(s),r=!Rn(s)&&!0===this._options.useCORS&&d.SUPPORT_CORS_IMAGES&&!e,t=!Rn(s)&&!e&&!Pn(s)&&"string"==typeof this._options.proxy&&d.SUPPORT_CORS_XHR&&!r,e||!1!==this._options.allowTaint||Rn(s)||Pn(s)||t||r)?(B=s,t?[4,this.proxy(B)]:[3,2]):[2];case 1:B=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,(Nn(B)||r)&&(t.crossOrigin="anonymous"),t.src=B,!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()]}})})},Tn.prototype.has=function(A){return void 0!==this._cache[A]},Tn.prototype.keys=function(){return Promise.resolve(Object.keys(this._cache))},Tn.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 A,r=d.SUPPORT_RESPONSE_TYPE?"blob":"text",B=new XMLHttpRequest,n=(B.onload=function(){var A;200===B.status?"text"==r?e(B.response):((A=new FileReader).addEventListener("load",function(){return e(A.result)},!1),A.addEventListener("error",function(A){return t(A)},!1),A.readAsDataURL(B.response)):t("Failed to proxy resource "+Q+" with status code "+B.status)},B.onerror=t,-1<i.indexOf("?")?"&":"?");B.open("GET",i+n+"url="+encodeURIComponent(s)+"&responseType="+r),"text"!=r&&B instanceof XMLHttpRequest&&(B.responseType=r),o._options.imageTimeout&&(A=o._options.imageTimeout,B.timeout=A,B.ontimeout=function(){return t("Timed out ("+A+"ms) proxying "+Q)}),B.send()})};var Mn=Tn;function Tn(A,e){this.context=A,this._options=e,this._cache={}}var Gn=/^data:image\/svg\+xml/i,On=/^data:image\/.*;base64,/i,Vn=/^data:image\/.*/i,kn=function(A){return d.SUPPORT_SVG_DRAWING||!Jn(A)},Rn=function(A){return Vn.test(A)},Nn=function(A){return On.test(A)},Pn=function(A){return"blob"===A.substr(0,4)},Jn=function(A){return"svg"===A.substr(-3).toLowerCase()||Gn.test(A)},I=(Xn.prototype.add=function(A,e){return new Xn(this.x+A,this.y+e)},Xn);function Xn(A,e){this.type=0,this.x=A,this.y=e}function Yn(A,e,t){return new I(A.x+(e.x-A.x)*t,A.y+(e.y-A.y)*t)}Zn.prototype.subdivide=function(A,e){var t=Yn(this.start,this.startControl,A),r=Yn(this.startControl,this.endControl,A),B=Yn(this.endControl,this.end,A),n=Yn(t,r,A),r=Yn(r,B,A),A=Yn(n,r,A);return e?new Zn(this.start,t,n,A):new Zn(A,r,B,this.end)},Zn.prototype.add=function(A,e){return new Zn(this.start.add(A,e),this.startControl.add(A,e),this.endControl.add(A,e),this.end.add(A,e))},Zn.prototype.reverse=function(){return new Zn(this.end,this.endControl,this.startControl,this.start)};var Wn=Zn;function Zn(A,e,t,r){this.type=1,this.start=A,this.startControl=e,this.endControl=t,this.end=r}function _n(A){return[A.topLeftBorderBox,A.topRightBorderBox,A.bottomRightBorderBox,A.bottomLeftBorderBox]}function qn(A){return[A.topLeftPaddingBox,A.topRightPaddingBox,A.bottomRightPaddingBox,A.bottomLeftPaddingBox]}function jn(A){return 1===A.type}function zn(A,t){return A.length===t.length&&A.some(function(A,e){return A===t[e]})}var y,D,v=function(A){return 1===A.type},$n=function(A){var e=A.styles,t=A.bounds,r=(B=ae(e.borderTopLeftRadius,t.width,t.height))[0],B=B[1],n=(s=ae(e.borderTopRightRadius,t.width,t.height))[0],s=s[1],o=(i=ae(e.borderBottomRightRadius,t.width,t.height))[0],i=i[1],Q=(c=ae(e.borderBottomLeftRadius,t.width,t.height))[0],c=c[1];(a=[]).push((r+n)/t.width),a.push((Q+o)/t.width),a.push((B+c)/t.height),a.push((s+i)/t.height);1<(a=Math.max.apply(Math,a))&&(r/=a,B/=a,n/=a,s/=a,o/=a,i/=a,Q/=a,c/=a);var a=t.width-n,g=t.height-i,w=t.width-o,l=t.height-c,U=e.borderTopWidth,C=e.borderRightWidth,u=e.borderBottomWidth,F=e.borderLeftWidth,h=L(e.paddingTop,A.bounds.width),d=L(e.paddingRight,A.bounds.width),f=L(e.paddingBottom,A.bounds.width),e=L(e.paddingLeft,A.bounds.width);this.topLeftBorderDoubleOuterBox=0<r||0<B?x(t.left+F/3,t.top+U/3,r-F/3,B-U/3,y.TOP_LEFT):new I(t.left+F/3,t.top+U/3),this.topRightBorderDoubleOuterBox=0<r||0<B?x(t.left+a,t.top+U/3,n-C/3,s-U/3,y.TOP_RIGHT):new I(t.left+t.width-C/3,t.top+U/3),this.bottomRightBorderDoubleOuterBox=0<o||0<i?x(t.left+w,t.top+g,o-C/3,i-u/3,y.BOTTOM_RIGHT):new I(t.left+t.width-C/3,t.top+t.height-u/3),this.bottomLeftBorderDoubleOuterBox=0<Q||0<c?x(t.left+F/3,t.top+l,Q-F/3,c-u/3,y.BOTTOM_LEFT):new I(t.left+F/3,t.top+t.height-u/3),this.topLeftBorderDoubleInnerBox=0<r||0<B?x(t.left+2*F/3,t.top+2*U/3,r-2*F/3,B-2*U/3,y.TOP_LEFT):new I(t.left+2*F/3,t.top+2*U/3),this.topRightBorderDoubleInnerBox=0<r||0<B?x(t.left+a,t.top+2*U/3,n-2*C/3,s-2*U/3,y.TOP_RIGHT):new I(t.left+t.width-2*C/3,t.top+2*U/3),this.bottomRightBorderDoubleInnerBox=0<o||0<i?x(t.left+w,t.top+g,o-2*C/3,i-2*u/3,y.BOTTOM_RIGHT):new I(t.left+t.width-2*C/3,t.top+t.height-2*u/3),this.bottomLeftBorderDoubleInnerBox=0<Q||0<c?x(t.left+2*F/3,t.top+l,Q-2*F/3,c-2*u/3,y.BOTTOM_LEFT):new I(t.left+2*F/3,t.top+t.height-2*u/3),this.topLeftBorderStroke=0<r||0<B?x(t.left+F/2,t.top+U/2,r-F/2,B-U/2,y.TOP_LEFT):new I(t.left+F/2,t.top+U/2),this.topRightBorderStroke=0<r||0<B?x(t.left+a,t.top+U/2,n-C/2,s-U/2,y.TOP_RIGHT):new I(t.left+t.width-C/2,t.top+U/2),this.bottomRightBorderStroke=0<o||0<i?x(t.left+w,t.top+g,o-C/2,i-u/2,y.BOTTOM_RIGHT):new I(t.left+t.width-C/2,t.top+t.height-u/2),this.bottomLeftBorderStroke=0<Q||0<c?x(t.left+F/2,t.top+l,Q-F/2,c-u/2,y.BOTTOM_LEFT):new I(t.left+F/2,t.top+t.height-u/2),this.topLeftBorderBox=0<r||0<B?x(t.left,t.top,r,B,y.TOP_LEFT):new I(t.left,t.top),this.topRightBorderBox=0<n||0<s?x(t.left+a,t.top,n,s,y.TOP_RIGHT):new I(t.left+t.width,t.top),this.bottomRightBorderBox=0<o||0<i?x(t.left+w,t.top+g,o,i,y.BOTTOM_RIGHT):new I(t.left+t.width,t.top+t.height),this.bottomLeftBorderBox=0<Q||0<c?x(t.left,t.top+l,Q,c,y.BOTTOM_LEFT):new I(t.left,t.top+t.height),this.topLeftPaddingBox=0<r||0<B?x(t.left+F,t.top+U,Math.max(0,r-F),Math.max(0,B-U),y.TOP_LEFT):new I(t.left+F,t.top+U),this.topRightPaddingBox=0<n||0<s?x(t.left+Math.min(a,t.width-C),t.top+U,a>t.width+C?0:Math.max(0,n-C),Math.max(0,s-U),y.TOP_RIGHT):new I(t.left+t.width-C,t.top+U),this.bottomRightPaddingBox=0<o||0<i?x(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),y.BOTTOM_RIGHT):new I(t.left+t.width-C,t.top+t.height-u),this.bottomLeftPaddingBox=0<Q||0<c?x(t.left+F,t.top+Math.min(l,t.height-u),Math.max(0,Q-F),Math.max(0,c-u),y.BOTTOM_LEFT):new I(t.left+F,t.top+t.height-u),this.topLeftContentBox=0<r||0<B?x(t.left+F+e,t.top+U+h,Math.max(0,r-(F+e)),Math.max(0,B-(U+h)),y.TOP_LEFT):new I(t.left+F+e,t.top+U+h),this.topRightContentBox=0<n||0<s?x(t.left+Math.min(a,t.width+F+e),t.top+U+h,a>t.width+F+e?0:n-F+e,s-(U+h),y.TOP_RIGHT):new I(t.left+t.width-(C+d),t.top+U+h),this.bottomRightContentBox=0<o||0<i?x(t.left+Math.min(w,t.width-(F+e)),t.top+Math.min(g,t.height+U+h),Math.max(0,o-(C+d)),i-(u+f),y.BOTTOM_RIGHT):new I(t.left+t.width-(C+d),t.top+t.height-(u+f)),this.bottomLeftContentBox=0<Q||0<c?x(t.left+F+e,t.top+l,Math.max(0,Q-(F+e)),c-(u+f),y.BOTTOM_LEFT):new I(t.left+F+e,t.top+t.height-(u+f))},x=((D=y=y||{})[D.TOP_LEFT=0]="TOP_LEFT",D[D.TOP_RIGHT=1]="TOP_RIGHT",D[D.BOTTOM_RIGHT=2]="BOTTOM_RIGHT",D[D.BOTTOM_LEFT=3]="BOTTOM_LEFT",function(A,e,t,r,B){var n=(Math.sqrt(2)-1)/3*4,s=t*n,o=r*n,i=A+t,Q=e+r;switch(B){case y.TOP_LEFT:return new Wn(new I(A,Q),new I(A,Q-o),new I(i-s,e),new I(i,e));case y.TOP_RIGHT:return new Wn(new I(A,e),new I(A+s,e),new I(i,Q-o),new I(i,Q));case y.BOTTOM_RIGHT:return new Wn(new I(i,e),new I(i,e+o),new I(A+s,Q),new I(A,Q));default:y.BOTTOM_LEFT;return new Wn(new I(i,Q),new I(i-s,Q),new I(A,e+o),new I(A,e))}}),As=function(A,e,t){this.offsetX=A,this.offsetY=e,this.matrix=t,this.type=0,this.target=6},es=function(A,e){this.path=A,this.target=e,this.type=1},ts=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=[]},Bs=(ns.prototype.getEffects=function(e){for(var A=-1===[2,3].indexOf(this.container.styles.position),t=this.parent,r=this.effects.slice(0);t;){var B,n,s=t.effects.filter(function(A){return!jn(A)});A||0!==t.container.styles.position||!t.parent?(r.unshift.apply(r,s),A=-1===[2,3].indexOf(t.container.styles.position),0!==t.container.styles.overflowX&&(B=_n(t.curves),n=qn(t.curves),zn(B,n)||r.unshift(new es(n,6)))):r.unshift.apply(r,s),t=t.parent}return r.filter(function(A){return F(A.target,e)})},ns);function ns(A,e){var t;this.container=A,this.parent=e,this.effects=[],this.curves=new $n(this.container),this.container.styles.opacity<1&&this.effects.push(new ts(this.container.styles.opacity)),null!==this.container.styles.transform&&(A=this.container.bounds.left+this.container.styles.transformOrigin[0].number,e=this.container.bounds.top+this.container.styles.transformOrigin[1].number,t=this.container.styles.transform,this.effects.push(new As(A,e,t))),0!==this.container.styles.overflowX&&(A=_n(this.curves),e=qn(this.curves),zn(A,e)?this.effects.push(new es(A,6)):(this.effects.push(new es(A,2)),this.effects.push(new es(e,4))))}function ss(A,e){switch(e){case 0:return S(A.topLeftBorderBox,A.topLeftPaddingBox,A.topRightBorderBox,A.topRightPaddingBox);case 1:return S(A.topRightBorderBox,A.topRightPaddingBox,A.bottomRightBorderBox,A.bottomRightPaddingBox);case 2:return S(A.bottomRightBorderBox,A.bottomRightPaddingBox,A.bottomLeftBorderBox,A.bottomLeftPaddingBox);default:return S(A.bottomLeftBorderBox,A.bottomLeftPaddingBox,A.topLeftBorderBox,A.topLeftPaddingBox)}}function os(A,e){var t=[];return v(A)?t.push(A.subdivide(.5,!1)):t.push(A),v(e)?t.push(e.subdivide(.5,!0)):t.push(e),t}function S(A,e,t,r){var B=[];return v(A)?B.push(A.subdivide(.5,!1)):B.push(A),v(t)?B.push(t.subdivide(.5,!0)):B.push(t),v(r)?B.push(r.subdivide(.5,!0).reverse()):B.push(r),v(e)?B.push(e.subdivide(.5,!1).reverse()):B.push(e),B}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,A=A.bounds,t=L(e.paddingLeft,A.width),r=L(e.paddingRight,A.width),B=L(e.paddingTop,A.width),n=L(e.paddingBottom,A.width);return A.add(t+e.borderLeftWidth,B+e.borderTopWidth,-(e.borderRightWidth+e.borderLeftWidth+t+r),-(e.borderTopWidth+e.borderBottomWidth+B+n))}function cs(A,e,t){var r=Us(Fs(A.styles.backgroundOrigin,e),A),B=Cs(Fs(A.styles.backgroundClip,e),A),n=(t=us(Fs(A.styles.backgroundSize,e),t,r))[0],s=t[1],o=ae(Fs(A.styles.backgroundPosition,e),r.width-n,r.height-s);return[hs(Fs(A.styles.backgroundRepeat,e),o,t,r,B),Math.round(r.left+o[0]),Math.round(r.top+o[1]),n,s]}function as(A){return l(A)&&A.value===Ze.AUTO}function gs(A){return"number"==typeof A}var ws=function(Q,c,a,g){Q.container.elements.forEach(function(A){var e,t,r,B,n=F(A.flags,4),s=F(A.flags,2),o=new Bs(A,Q),i=(F(A.styles.display,2048)&&g.push(o),F(A.flags,8)?[]:g);n||s?(s=n||A.styles.isPositioned()?a:c,e=new rs(o),A.styles.isPositioned()||A.styles.opacity<1||A.styles.isTransformed()?(t=A.styles.zIndex.order)<0?(r=0,s.negativeZIndex.some(function(A,e){return t>A.element.container.styles.zIndex.order?(r=e,!1):0<r}),s.negativeZIndex.splice(r,0,e)):0<t?(B=0,s.positiveZIndex.some(function(A,e){return t>=A.element.container.styles.zIndex.order?(B=e+1,!1):0<B}),s.positiveZIndex.splice(B,0,e)):s.zeroOrAutoZIndexOrTransformedOrOpacity.push(e):(A.styles.isFloating()?s.nonPositionedFloats:s.nonPositionedInlineLevel).push(e),ws(o,e,n?e:a,i)):((A.styles.isInlineLevel()?c.inlineLevel:c.nonInlineLevel).push(o),ws(o,c,a,i)),F(A.flags,8)&&ls(A,i)})},ls=function(A,e){for(var t=A instanceof QB?A.start:1,r=A instanceof QB&&A.reversed,B=0;B<e.length;B++){var n=e[B];n.container instanceof sB&&"number"==typeof n.container.value&&0!==n.container.value&&(t=n.container.value),n.listValue=un(t,n.container.styles.listStyleType,!0),t+=r?-1:1}},Us=function(A,e){return 0===A?e.bounds:(2===A||3===A?Qs:is)(e)},Cs=function(A,e){return 0===A?e.bounds:(2===A||3===A?Qs:is)(e)},us=function(A,e,t){var r=e[0],B=e[1],e=e[2],n=A[0],A=A[1];if(!n)return[0,0];if(U(n)&&A&&U(A))return[L(n,t.width),L(A,t.height)];var s=gs(e);if(l(n)&&(n.value===Ze.CONTAIN||n.value===Ze.COVER))return gs(e)?t.width/t.height<e!=(n.value===Ze.COVER)?[t.width,t.width/e]:[t.height*e,t.height]:[t.width,t.height];var o=gs(r),i=gs(B),Q=o||i;if(as(n)&&(!A||as(A)))return o&&i?[r,B]:s||Q?Q&&s?[o?r:B*e,i?B:r/e]:[o?r:t.width,i?B:t.height]:[t.width,t.height];if(s)return s=Q=0,U(n)?Q=L(n,t.width):U(A)&&(s=L(A,t.height)),as(n)?Q=s*e:A&&!as(A)||(s=Q/e),[Q,s];e=null,Q=null;if(U(n)?e=L(n,t.width):A&&U(A)&&(Q=L(A,t.height)),null!==(e=null!==(Q=null===e||A&&!as(A)?Q:o&&i?e/r*B:t.height)&&as(n)?o&&i?Q/B*r:t.width:e)&&null!==Q)return[e,Q];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,r,B){var n=e[0],s=e[1],o=t[0],i=t[1];switch(A){case 2:return[new I(Math.round(r.left),Math.round(r.top+s)),new I(Math.round(r.left+r.width),Math.round(r.top+s)),new I(Math.round(r.left+r.width),Math.round(i+r.top+s)),new I(Math.round(r.left),Math.round(i+r.top+s))];case 3:return[new I(Math.round(r.left+n),Math.round(r.top)),new I(Math.round(r.left+n+o),Math.round(r.top)),new I(Math.round(r.left+n+o),Math.round(r.height+r.top)),new I(Math.round(r.left+n),Math.round(r.height+r.top))];case 1:return[new I(Math.round(r.left+n),Math.round(r.top+s)),new I(Math.round(r.left+n+o),Math.round(r.top+s)),new I(Math.round(r.left+n+o),Math.round(r.top+s+i)),new I(Math.round(r.left+n),Math.round(r.top+s+i))];default:return[new I(Math.round(B.left),Math.round(B.top)),new I(Math.round(B.left+B.width),Math.round(B.top)),new I(Math.round(B.left+B.width),Math.round(B.height+B.top)),new I(Math.round(B.left),Math.round(B.height+B.top))]}},ds="Hidden Text",fs=(ps.prototype.parseMetrics=function(A,e){var t=this._document.createElement("div"),r=this._document.createElement("img"),B=this._document.createElement("span"),n=this._document.body,A=(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),r.src="data:image/gif;base64,R0lGODlhAQABAIAAAAAAAP///yH5BAEAAAAALAAAAAABAAEAAAIBRAA7",r.width=1,r.height=1,r.style.margin="0",r.style.padding="0",r.style.verticalAlign="baseline",B.style.fontFamily=A,B.style.fontSize=e,B.style.margin="0",B.style.padding="0",B.appendChild(this._document.createTextNode(ds)),t.appendChild(B),t.appendChild(r),r.offsetTop-B.offsetTop+2),e=(t.removeChild(B),t.appendChild(this._document.createTextNode(ds)),t.style.lineHeight="normal",r.style.verticalAlign="super",r.offsetTop-t.offsetTop+2);return n.removeChild(t),{baseline:A,middle:e}},ps.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]},ps);function ps(A){this._data={},this._document=A}function Hs(A,e){this.context=A,this.options=e}A(M,Es=Hs),M.prototype.applyEffects=function(A){for(var e=this;this._activeEffects.length;)this.popEffect();A.forEach(function(A){return e.applyEffect(A)})},M.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)),jn(A)&&(this.path(A.path),this.ctx.clip()),this._activeEffects.push(A)},M.prototype.popEffect=function(){this._activeEffects.pop(),this.ctx.restore()},M.prototype.renderStack=function(e){return i(this,void 0,void 0,function(){return K(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]}})})},M.prototype.renderNode=function(e){return i(this,void 0,void 0,function(){return K(this,function(A){switch(A.label){case 0:return(F(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]}})})},M.prototype.renderTextWithLetterSpacing=function(t,A,r){var B=this;0===A?this.ctx.fillText(t.text,t.bounds.left,t.bounds.top+r):Jr(t.text).reduce(function(A,e){return B.ctx.fillText(e,A,t.bounds.top+r),A+B.ctx.measureText(e).width},t.bounds.left)},M.prototype.createFontStyle=function(A){var e=A.fontVariant.filter(function(A){return"normal"===A||"small-caps"===A}).join(""),t=Ds(A.fontFamily).join(", "),r=se(A.fontSize)?""+A.fontSize.number+A.fontSize.unit:A.fontSize.number+"px";return[[A.fontStyle,e,A.fontWeight,r,t].join(" "),t,r]},M.prototype.renderTextNode=function(h,d,A){return i(this,void 0,void 0,function(){for(var e,t,r,B,n,s,o,i,Q,c,a,g,w,l=this,U=0,A=0;A<h.textBounds.length;A++)U+=h.textBounds[A].bounds.width;var C=h.textBounds[0].bounds.left,u=h.textBounds[0].bounds.top,F=h.textBounds[0].bounds.height;return K(this,function(A){return t=this.createFontStyle(d),r=t[0],e=t[1],t=t[2],this.ctx.font=r,this.ctx.direction=1===d.direction?"rtl":"ltr",this.ctx.textAlign="left",this.ctx.textBaseline="alphabetic",r=this.fontMetrics.getMetrics(e,t),B=r.baseline,n=r.middle,s=d.paintOrder,h.textBounds.forEach(function(t){3==d.backgroundClip[0]?void 0===d.backgroundImage[0]?l.ctx.fillStyle=m(d.backgroundColor):(A=Ee(d.backgroundImage[0].angle,U,F),o=A[0],i=A[1],Q=A[2],c=A[3],a=A[4],(g=document.createElement("canvas")).width=U,g.height=F,g=g.getContext("2d"),w=g.createLinearGradient(C+i,u+c,C+Q,u+a),He(d.backgroundImage[0].stops,o).forEach(function(A){return w.addColorStop(A.stop,m(A.color))}),l.ctx.fillStyle=w,l.renderTextWithLetterSpacing(t,d.letterSpacing,B)):s.forEach(function(A){switch(A){case 0:l.ctx.fillStyle=m(d.color),l.renderTextWithLetterSpacing(t,d.letterSpacing,B);var e=d.textShadow;e.length&&t.text.trim().length&&(e.slice(0).reverse().forEach(function(A){l.ctx.shadowColor=m(A.color),l.ctx.shadowOffsetX=A.offsetX.number*l.options.scale,l.ctx.shadowOffsetY=A.offsetY.number*l.options.scale,l.ctx.shadowBlur=A.blur.number,l.renderTextWithLetterSpacing(t,d.letterSpacing,B)}),l.ctx.shadowColor="",l.ctx.shadowOffsetX=0,l.ctx.shadowOffsetY=0,l.ctx.shadowBlur=0),d.textDecorationLine.length&&(l.ctx.fillStyle=m(d.textDecorationColor||d.color),d.textDecorationLine.forEach(function(A){switch(A){case 1:l.ctx.fillRect(t.bounds.left,Math.round(t.bounds.top+B),t.bounds.width,1);break;case 2:l.ctx.fillRect(t.bounds.left,Math.round(t.bounds.top),t.bounds.width,1);break;case 3:l.ctx.fillRect(t.bounds.left,Math.ceil(t.bounds.top+n),t.bounds.width,1)}}));break;case 1:d.webkitTextStrokeWidth&&t.text.trim().length&&(l.ctx.strokeStyle=m(d.webkitTextStrokeColor),l.ctx.lineWidth=d.webkitTextStrokeWidth,l.ctx.lineJoin=window.chrome?"miter":"round",l.ctx.strokeText(t.text,t.bounds.left,t.bounds.top+B)),l.ctx.strokeStyle="",l.ctx.lineWidth=0,l.ctx.lineJoin="miter"}})}),[2]})})},M.prototype.renderReplacedElement=function(A,e,t){var r,B,n,s,o;t&&0<A.intrinsicWidth&&0<A.intrinsicHeight&&(B=r=30,n=(o=Qs(A)).left,s=o.top,A.intrinsicWidth/o.width<A.intrinsicHeight/o.height?(r=o.width,B=A.intrinsicHeight*(o.width/A.intrinsicWidth),s=o.top+(o.height-B)/2):(r=A.intrinsicWidth*(o.height/A.intrinsicHeight),B=o.height,n=o.left+(o.width-r)/2),o=qn(e),this.path(o),this.ctx.save(),this.ctx.clip(),this.ctx.drawImage(t,0,0,A.intrinsicWidth,A.intrinsicHeight,n,s,r,B),this.ctx.restore())},M.prototype.renderNodeContent=function(l){return i(this,void 0,void 0,function(){var e,t,r,B,n,s,o,i,Q,c,a,g,w;return K(this,function(A){switch(A.label){case 0:this.applyEffects(l.getEffects(4)),e=l.container,t=l.curves,r=e.styles,B=0,n=e.textNodes,A.label=1;case 1:return B<n.length?(s=n[B],[4,this.renderTextNode(s,r,e)]):[3,4];case 2:A.sent(),A.label=3;case 3:return B++,[3,1];case 4:if(!(e instanceof jr))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 c=A.sent(),this.renderReplacedElement(e,t,c),[3,8];case 7:return A.sent(),this.context.logger.error("Error loading image "+e.src),[3,8];case 8:if(e instanceof AB&&this.renderReplacedElement(e,t,e.canvas),!(e instanceof rB))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 c=A.sent(),this.renderReplacedElement(e,t,c),[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 KB&&e.tree?[4,new M(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 FB&&(o=Math.min(e.bounds.width,e.bounds.height),e.type===lB?e.checked&&(this.ctx.save(),this.path([new I(e.bounds.left+.39363*o,e.bounds.top+.79*o),new I(e.bounds.left+.16*o,e.bounds.top+.5549*o),new I(e.bounds.left+.27347*o,e.bounds.top+.44071*o),new I(e.bounds.left+.39694*o,e.bounds.top+.5649*o),new I(e.bounds.left+.72983*o,e.bounds.top+.23*o),new I(e.bounds.left+.84*o,e.bounds.top+.34085*o),new I(e.bounds.left+.39363*o,e.bounds.top+.79*o)]),this.ctx.fillStyle=m(uB),this.ctx.fill(),this.ctx.restore()):e.type===UB&&e.checked&&(this.ctx.save(),this.ctx.beginPath(),this.ctx.arc(e.bounds.left+o/2,e.bounds.top+o/2,o/4,0,2*Math.PI,!0),this.ctx.fillStyle=m(uB),this.ctx.fill(),this.ctx.restore())),Ks(e)&&e.value.length){switch(o=this.createFontStyle(r),g=o[0],a=o[1],a=this.fontMetrics.getMetrics(g,a).baseline,this.ctx.font=g,this.ctx.fillStyle=m(r.color),this.ctx.textBaseline="alphabetic",this.ctx.textAlign=Ls(e.styles.textAlign),w=Qs(e),i=0,e.styles.textAlign){case 1:i+=w.width/2;break;case 2:i+=w.width}Q=w.add(i,0,0,-w.height/2+1),this.ctx.save(),this.path([new I(w.left,w.top),new I(w.left+w.width,w.top),new I(w.left+w.width,w.top+w.height),new I(w.left,w.top+w.height)]),this.ctx.clip(),this.renderTextWithLetterSpacing(new Rr(e.value,Q),r.letterSpacing,a),this.ctx.restore(),this.ctx.textBaseline="alphabetic",this.ctx.textAlign="left"}if(!F(e.styles.display,2048))return[3,20];if(null===e.styles.listStyleImage)return[3,19];if(0!==(Q=e.styles.listStyleImage).type)return[3,18];c=void 0,a=Q.url,A.label=15;case 15:return A.trys.push([15,17,,18]),[4,this.context.cache.match(a)];case 16:return c=A.sent(),this.ctx.drawImage(c,e.bounds.left-(c.width+10),e.bounds.top),[3,18];case 17:return A.sent(),this.context.logger.error("Error loading list-style-image "+a),[3,18];case 18:return[3,20];case 19:l.listValue&&-1!==e.styles.listStyleType&&(g=this.createFontStyle(r)[0],this.ctx.font=g,this.ctx.fillStyle=m(r.color),this.ctx.textBaseline="middle",this.ctx.textAlign="right",w=new h(e.bounds.left,e.bounds.top+L(e.styles.paddingTop,e.bounds.width),e.bounds.width,Je(r.lineHeight,r.fontSize.number)/2+1),this.renderTextWithLetterSpacing(new Rr(l.listValue,w),r.letterSpacing,Je(r.lineHeight,r.fontSize.number)/2+2),this.ctx.textBaseline="bottom",this.ctx.textAlign="left"),A.label=20;case 20:return[2]}})})},M.prototype.renderStackContent=function(C){return i(this,void 0,void 0,function(){var e,t,r,B,n,s,o,i,Q,c,a,g,w,l,U;return K(this,function(A){switch(A.label){case 0:return F(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?(U=t[e],[4,this.renderStack(U)]):[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(),r=0,B=C.nonInlineLevel,A.label=7;case 7:return r<B.length?(U=B[r],[4,this.renderNode(U)]):[3,10];case 8:A.sent(),A.label=9;case 9:return r++,[3,7];case 10:n=0,s=C.nonPositionedFloats,A.label=11;case 11:return n<s.length?(U=s[n],[4,this.renderStack(U)]):[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?(U=i[o],[4,this.renderStack(U)]):[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?(U=c[Q],[4,this.renderNode(U)]):[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?(U=g[a],[4,this.renderStack(U)]):[3,26];case 24:A.sent(),A.label=25;case 25:return a++,[3,23];case 26:w=0,l=C.positiveZIndex,A.label=27;case 27:return w<l.length?(U=l[w],[4,this.renderStack(U)]):[3,30];case 28:A.sent(),A.label=29;case 29:return w++,[3,27];case 30:return[2]}})})},M.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()},M.prototype.path=function(A){this.ctx.beginPath(),this.formatPath(A),this.ctx.closePath()},M.prototype.formatPath=function(A){var r=this;A.forEach(function(A,e){var t=v(A)?A.start:A;0===e?r.ctx.moveTo(t.x,t.y):r.ctx.lineTo(t.x,t.y),v(A)&&r.ctx.bezierCurveTo(A.startControl.x,A.startControl.y,A.endControl.x,A.endControl.y,A.end.x,A.end.y)})},M.prototype.renderRepeat=function(A,e,t,r){this.path(A),this.ctx.fillStyle=e,this.ctx.translate(t,r),this.ctx.fill(),this.ctx.translate(-t,-r)},M.prototype.resizeImage=function(A,e,t){if(A.width===e&&A.height===t)return A;var r=(null!=(r=this.canvas.ownerDocument)?r:document).createElement("canvas");return r.width=Math.max(1,e),r.height=Math.max(1,t),r.getContext("2d").drawImage(A,0,0,A.width,A.height,0,0,e,t),r},M.prototype.renderBackgroundImage=function(y){return i(this,void 0,void 0,function(){var E,A,I,e,t,r;return K(this,function(H){switch(H.label){case 0:E=y.styles.backgroundImage.length-1,A=function(e){var t,r,B,n,s,o,i,Q,c,a,g,w,l,U,C,u,F,h,d,f,p;return K(this,function(A){switch(A.label){case 0:if(0!==e.type)return[3,5];t=void 0,r=e.url,A.label=1;case 1:return A.trys.push([1,3,,4]),[4,I.context.cache.match(r)];case 2:return t=A.sent(),[3,4];case 3:return A.sent(),I.context.logger.error("Error loading background-image "+r),[3,4];case 4:return t&&(w=cs(y,E,[t.width,t.height,t.width/t.height]),Q=w[0],U=w[1],C=w[2],g=w[3],w=w[4],o=I.ctx.createPattern(I.resizeImage(t,g,w),"repeat"),I.renderRepeat(Q,o,U,C)),[3,6];case 5:3==y.styles.backgroundClip[0]?(H=cs(y,E,[null,null,null]),Q=H[0],U=H[1],C=H[2],g=H[3],w=H[4],(B=document.createElement("canvas")).width=g,B.height=w,(n=B.getContext("2d")).globalAlpha=0,n.fillStyle="#000000",n.fillRect(0,0,g,w),0<g&&0<w&&(o=I.ctx.createPattern(B,"repeat"),I.renderRepeat(Q,o,U,C))):1===e.type?(l=cs(y,E,[null,null,null]),Q=l[0],U=l[1],C=l[2],g=l[3],w=l[4],l=Ee(e.angle,g,w),u=l[0],i=l[1],a=l[2],c=l[3],l=l[4],(B=document.createElement("canvas")).width=g,B.height=w,n=B.getContext("2d"),s=n.createLinearGradient(i,c,a,l),He(e.stops,u).forEach(function(A){return s.addColorStop(A.stop,m(A.color))}),n.fillStyle=s,n.fillRect(0,0,g,w),0<g&&0<w&&(o=I.ctx.createPattern(B,"repeat"),I.renderRepeat(Q,o,U,C))):2===e.type&&(i=cs(y,E,[null,null,null]),Q=i[0],c=i[1],a=i[2],g=i[3],w=i[4],l=0===e.position.length?[Qe]:e.position,U=L(l[0],g),C=L(l[l.length-1],w),u=function(A,e,t,r,B){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-r),Math.abs(t),Math.abs(t-B)):1===A.shape&&(Q=Math.min(Math.abs(e),Math.abs(e-r)),c=Math.min(Math.abs(t),Math.abs(t-B)));break;case 2:0===A.shape?Q=c=Math.min(b(e,t),b(e,t-B),b(e-r,t),b(e-r,t-B)):1===A.shape&&(n=Math.min(Math.abs(t),Math.abs(t-B))/Math.min(Math.abs(e),Math.abs(e-r)),o=(i=ve(r,B,e,t,!0))[0],i=i[1],c=n*(Q=b(o-e,(i-t)/n)));break;case 1:0===A.shape?Q=c=Math.max(Math.abs(e),Math.abs(e-r),Math.abs(t),Math.abs(t-B)):1===A.shape&&(Q=Math.max(Math.abs(e),Math.abs(e-r)),c=Math.max(Math.abs(t),Math.abs(t-B)));break;case 3:0===A.shape?Q=c=Math.max(b(e,t),b(e,t-B),b(e-r,t),b(e-r,t-B)):1===A.shape&&(n=Math.max(Math.abs(t),Math.abs(t-B))/Math.max(Math.abs(e),Math.abs(e-r)),o=(s=ve(r,B,e,t,!1))[0],i=s[1],c=n*(Q=b(o-e,(i-t)/n)))}return Array.isArray(A.size)&&(Q=L(A.size[0],r),c=2===A.size.length?L(A.size[1],B):Q),[Q,c]}(e,U,C,g,w),p=u[0],f=u[1],0<p&&0<f&&(F=I.ctx.createRadialGradient(c+U,a+C,0,c+U,a+C,p),He(e.stops,2*p).forEach(function(A){return F.addColorStop(A.stop,m(A.color))}),I.path(Q),I.ctx.fillStyle=F,p!==f?(h=y.bounds.left+.5*y.bounds.width,d=y.bounds.top+.5*y.bounds.height,p=1/(f=f/p),I.ctx.save(),I.ctx.translate(h,d),I.ctx.transform(1,0,0,f,0,0),I.ctx.translate(-h,-d),I.ctx.fillRect(c,p*(a-d)+d,g,w*p),I.ctx.restore()):I.ctx.fill())),A.label=6;case 6:return E--,[2]}})},I=this,e=0,t=y.styles.backgroundImage.slice(0).reverse(),H.label=1;case 1:return e<t.length?(r=t[e],[5,A(r)]):[3,4];case 2:H.sent(),H.label=3;case 3:return e++,[3,1];case 4:return[2]}})})},M.prototype.renderSolidBorder=function(e,t,r){return i(this,void 0,void 0,function(){return K(this,function(A){return this.path(ss(r,t)),this.ctx.fillStyle=m(e),this.ctx.fill(),[2]})})},M.prototype.renderDoubleBorder=function(t,r,B,n){return i(this,void 0,void 0,function(){var e;return K(this,function(A){switch(A.label){case 0:return r<3?[4,this.renderSolidBorder(t,B,n)]:[3,2];case 1:return A.sent(),[2];case 2:return e=function(A,e){switch(e){case 0:return S(A.topLeftBorderBox,A.topLeftBorderDoubleOuterBox,A.topRightBorderBox,A.topRightBorderDoubleOuterBox);case 1:return S(A.topRightBorderBox,A.topRightBorderDoubleOuterBox,A.bottomRightBorderBox,A.bottomRightBorderDoubleOuterBox);case 2:return S(A.bottomRightBorderBox,A.bottomRightBorderDoubleOuterBox,A.bottomLeftBorderBox,A.bottomLeftBorderDoubleOuterBox);default:return S(A.bottomLeftBorderBox,A.bottomLeftBorderDoubleOuterBox,A.topLeftBorderBox,A.topLeftBorderDoubleOuterBox)}}(n,B),this.path(e),this.ctx.fillStyle=m(t),this.ctx.fill(),e=function(A,e){switch(e){case 0:return S(A.topLeftBorderDoubleInnerBox,A.topLeftPaddingBox,A.topRightBorderDoubleInnerBox,A.topRightPaddingBox);case 1:return S(A.topRightBorderDoubleInnerBox,A.topRightPaddingBox,A.bottomRightBorderDoubleInnerBox,A.bottomRightPaddingBox);case 2:return S(A.bottomRightBorderDoubleInnerBox,A.bottomRightPaddingBox,A.bottomLeftBorderDoubleInnerBox,A.bottomLeftPaddingBox);default:return S(A.bottomLeftBorderDoubleInnerBox,A.bottomLeftPaddingBox,A.topLeftBorderDoubleInnerBox,A.topLeftPaddingBox)}}(n,B),this.path(e),this.ctx.fill(),[2]}})})},M.prototype.renderNodeBackgroundAndBorders=function(c){return i(this,void 0,void 0,function(){var e,t,r,B,n,s,o,i,Q=this;return K(this,function(A){switch(A.label){case 0:return(this.applyEffects(c.getEffects(2)),e=c.container.styles,t=!re(e.backgroundColor)||e.backgroundImage.length,r=[{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}],B=ms(Fs(e.backgroundClip,0),c.curves),t||e.boxShadow.length)?(this.ctx.save(),this.path(B),this.ctx.clip(),re(e.backgroundColor)||(this.ctx.fillStyle=m(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,r,B,n,e=_n(c.curves),s=A.inset?0:1e4,o=(t=-s+(A.inset?1:-1)*A.spread.number,r=(A.inset?1:-1)*A.spread.number,B=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,r);case 1:return A.add(t+B,r);case 2:return A.add(t+B,r+n);case 3:return A.add(t,r+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=m(A.color),Q.ctx.shadowBlur=A.blur.number,Q.ctx.fillStyle=A.inset?m(A.color):"rgba(0,0,0,1)",Q.ctx.fill(),Q.ctx.restore()}),A.label=2;case 2:s=n=0,o=r,A.label=3;case 3:return s<o.length?0!==(i=o[s]).style&&!re(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]}})})},M.prototype.renderDashedDottedBorder=function(g,w,l,U,C){return i(this,void 0,void 0,function(){var e,t,r,B,n,s,o,i,Q,c,a;return K(this,function(A){return this.ctx.save(),n=function(A,e){switch(e){case 0:return os(A.topLeftBorderStroke,A.topRightBorderStroke);case 1:return os(A.topRightBorderStroke,A.bottomRightBorderStroke);case 2:return os(A.bottomRightBorderStroke,A.bottomLeftBorderStroke);default:return os(A.bottomLeftBorderStroke,A.topLeftBorderStroke)}}(U,l),e=ss(U,l),2===C&&(this.path(e),this.ctx.clip()),Q=v(e[0])?(t=e[0].start.x,e[0].start.y):(t=e[0].x,e[0].y),B=v(e[1])?(r=e[1].end.x,e[1].end.y):(r=e[1].x,e[1].y),Q=0===l||2===l?Math.abs(t-r):Math.abs(Q-B),this.ctx.beginPath(),3===C?this.formatPath(n):this.formatPath(e.slice(0,2)),B=w<3?3*w:2*w,n=w<3?2*w:w,3===C&&(n=B=w),s=!0,Q<=2*B?s=!1:Q<=2*B+n?(B*=o=Q/(2*B+n),n*=o):(o=Math.floor((Q+n)/(B+n)),i=(Q-o*B)/(o-1),n=(Q=(Q-(o+1)*B)/o)<=0||Math.abs(n-i)<Math.abs(n-Q)?i:Q),s&&(3===C?this.ctx.setLineDash([0,B+n]):this.ctx.setLineDash([B,n])),3===C?(this.ctx.lineCap="round",this.ctx.lineWidth=w):this.ctx.lineWidth=2*w+1.1,this.ctx.strokeStyle=m(g),this.ctx.stroke(),this.ctx.setLineDash([]),2===C&&(v(e[0])&&(c=e[3],a=e[0],this.ctx.beginPath(),this.formatPath([new I(c.end.x,c.end.y),new I(a.start.x,a.start.y)]),this.ctx.stroke()),v(e[1])&&(c=e[1],a=e[2],this.ctx.beginPath(),this.formatPath([new I(c.end.x,c.end.y),new I(a.start.x,a.start.y)]),this.ctx.stroke())),this.ctx.restore(),[2]})})},M.prototype.render=function(B){return i(this,void 0,void 0,function(){return K(this,function(A){switch(A.label){case 0:return this.options.backgroundColor&&(this.ctx.fillStyle=m(this.options.backgroundColor),this.ctx.fillRect(this.options.x,this.options.y,this.options.width,this.options.height)),e=new Bs(e=B,null),t=new rs(e),ws(e,t,t,r=[]),ls(e.container,r),[4,this.renderStack(t)];case 1:return A.sent(),this.applyEffects([]),[2,this.canvas]}var e,t,r})})};var Es,Is=M;function M(A,e){A=Es.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="ideographic",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 EB||(A instanceof fB||A instanceof FB&&A.type!==UB&&A.type!==lB)},ms=function(A,e){switch(A){case 0:return _n(e);case 3:case 2:return[e.topLeftContentBox,e.topRightContentBox,e.bottomRightContentBox,e.bottomLeftContentBox];default:return qn(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=Hs),xs.prototype.render=function(t){return i(this,void 0,void 0,function(){var e;return K(this,function(A){switch(A.label){case 0:return e=Mr(this.options.width*this.options.scale,this.options.height*this.options.scale,this.options.scale,this.options.scale,t),[4,Ss(e)];case 1:return e=A.sent(),this.options.backgroundColor&&(this.ctx.fillStyle=m(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 Ss=function(r){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(r))})},Ms=(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,O([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,O([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,O([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,O([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()}Os.instanceCount=1;var Gs=Os;function Os(A,e){this.windowBounds=e,this.instanceName="#"+Os.instanceCount++,this.logger=new Ms({id:this.instanceName,enabled:A.logging}),this.cache=null!=(e=A.cache)?e:new Mn(this,A)}"undefined"!=typeof window&&Sn.setContext(window);var Vs=function(A,e,t){var r=e.ownerDocument,B=r.documentElement?fe(A,getComputedStyle(r.documentElement).backgroundColor):Le.TRANSPARENT,n=r.body?fe(A,getComputedStyle(r.body).backgroundColor):Le.TRANSPARENT,A="string"==typeof t?fe(A,t):null===t?Le.TRANSPARENT:4294967295;return e===r.documentElement?re(B)?re(n)?A:n:B:A};return function(A,e){return u=A,F=e=void 0===e?{}:e,i(void 0,void 0,void 0,function(){var e,t,r,B,n,s,o,i,Q,c,a,g,w,l,U,C;return K(this,function(A){switch(A.label){case 0:if(!u||"object"!=typeof u)return[2,Promise.reject("Invalid element provided as first argument")];if(!(w=u.ownerDocument))throw new Error("Element is not attached to a Document");if(e=w.defaultView)return l={allowTaint:null!=(l=F.allowTaint)&&l,imageTimeout:null!=(l=F.imageTimeout)?l:15e3,proxy:F.proxy,useCORS:null!=(l=F.useCORS)&&l},c=G({logging:null==(c=F.logging)||c,cache:F.cache},l),l={windowWidth:null!=(l=F.windowWidth)?l:e.innerWidth,windowHeight:null!=(l=F.windowHeight)?l:e.innerHeight,scrollX:null!=(l=F.scrollX)?l:e.pageXOffset,scrollY:null!=(l=F.scrollY)?l:e.pageYOffset},l=new h(l.scrollX,l.scrollY,l.windowWidth,l.windowHeight),c=new Gs(c,l),a=null!=(a=F.foreignObjectRendering)&&a,g={allowTaint:null!=(g=F.allowTaint)&&g,onclone:F.onclone,ignoreElements:F.ignoreElements,inlineImages:a,copyStyles:a},c.logger.debug("Starting document clone with size "+l.width+"x"+l.height+" scrolled to "+-l.left+","+-l.top),g=new hn(c,u,g),(t=g.clonedReferenceElement)?[4,g.toIFrame(w,l)]:[2,Promise.reject("Unable to find element in cloned iframe")];throw new Error("Document is not attached to a Window");case 1:return(r=A.sent(),g=WB(t)||XB(t)?k(t.ownerDocument):V(c,t),B=g.width,n=g.height,s=g.left,o=g.top,i=Vs(c,t,F.backgroundColor),U={canvas:F.canvas,backgroundColor:i,scale:null!=(l=null!=(w=F.scale)?w:e.devicePixelRatio)?l:1,x:(null!=(U=F.x)?U:0)+s,y:(null!=(U=F.y)?U:0)+o,width:null!=(U=F.width)?U:Math.ceil(B),height:null!=(U=F.height)?U:Math.ceil(n)},a)?(c.logger.debug("Document cloned, using foreign object rendering"),[4,new vs(c,U).render(t)]):[3,3];case 2:return Q=A.sent(),[3,5];case 3:return c.logger.debug("Document cloned, element located at "+s+","+o+" with size "+B+"x"+n+" using computed rendering"),c.logger.debug("Starting DOM parsing"),C=MB(c,t),i===C.styles.backgroundColor&&(C.styles.backgroundColor=Le.TRANSPARENT),c.logger.debug("Starting renderer for element at "+U.x+","+U.y+" with size "+U.width+"x"+U.height),[4,new Is(c,U).render(C)];case 4:Q=A.sent(),A.label=5;case 5:return null!=(C=F.removeContainer)&&!C||hn.destroy(r)||c.logger.error("Cannot detach cloned iframe as it is not in the DOM anymore"),c.logger.debug("Finished rendering"),[2,Q]}})});var u,F}});