From e9c3daeb5448424380b78f5761c78d4908b8a1bd Mon Sep 17 00:00:00 2001 From: xurxodev Date: Tue, 16 Apr 2024 12:39:38 +0200 Subject: [PATCH 01/12] fix. conflict error executing migrations because shortName is required - In 2.40 shortName is required in post constant endpoint --- src/data/storage/StorageConstantClient.ts | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/data/storage/StorageConstantClient.ts b/src/data/storage/StorageConstantClient.ts index 5b8be282c..f071f15df 100644 --- a/src/data/storage/StorageConstantClient.ts +++ b/src/data/storage/StorageConstantClient.ts @@ -134,6 +134,7 @@ export class StorageConstantClient extends StorageClient { id, code: formatKey(key), name: formatName(key), + shortName: formatName(key), description: JSON.stringify(value, null, 2), value: 1, ...sharing, @@ -184,6 +185,7 @@ type Constant = ObjectSharing & { id: string; code: string; name: string; + shortName: string; description: string; lastUpdated: Date; }; @@ -192,6 +194,7 @@ const apiFields = { id: true, code: true, name: true, + shortName: true, description: true, user: { id: true, name: true }, created: true, From ccf97b381027c08fb46eb8e12d95d94aab3b0ad7 Mon Sep 17 00:00:00 2001 From: mariaozamiz Date: Fri, 3 May 2024 13:13:59 +0200 Subject: [PATCH 02/12] chore: spare code related to feedback-tool --- public/feedback-tool/feedback-dhis2.min.js | 1 - public/feedback-tool/feedback-github.min.js | 1 - public/feedback-tool/feedback.min.css | 1 - public/feedback-tool/feedback.min.js | 6 --- public/feedback-tool/i18n/en.properties | 31 --------------- public/feedback-tool/i18n/es.properties | 31 --------------- public/feedback-tool/icons.png | Bin 2022 -> 0 bytes public/feedback-tool/spinner.gif | Bin 4663 -> 0 bytes public/index.html | 40 ++++++++------------ src/presentation/webapp/WebApp.tsx | 40 -------------------- 10 files changed, 15 insertions(+), 136 deletions(-) delete mode 100644 public/feedback-tool/feedback-dhis2.min.js delete mode 100644 public/feedback-tool/feedback-github.min.js delete mode 100644 public/feedback-tool/feedback.min.css delete mode 100644 public/feedback-tool/feedback.min.js delete mode 100644 public/feedback-tool/i18n/en.properties delete mode 100644 public/feedback-tool/i18n/es.properties delete mode 100644 public/feedback-tool/icons.png delete mode 100644 public/feedback-tool/spinner.gif diff --git a/public/feedback-tool/feedback-dhis2.min.js b/public/feedback-tool/feedback-dhis2.min.js deleted file mode 100644 index a2f134433..000000000 --- a/public/feedback-tool/feedback-dhis2.min.js +++ /dev/null @@ -1 +0,0 @@ -"use strict";function _classCallCheck(e,n){if(!(e instanceof n))throw new TypeError("Cannot call a class as a function")}var _createClass=function(){function e(e,n){for(var t=0;t.feedback-helper-inner{background:rgba(0,68,255,.1)}#feedback-close{background:url(icons.png) 0 -64px}.feedback-wizard-close{top:2px;right:2px;background:url(icons.png) 0 -34px;-webkit-opacity:.65;-moz-opacity:.65;opacity:.65}.feedback-wizard-close:hover{opacity:1}#feedback-overview-error,#feedback-welcome-error{display:none;color:#f13e3e;float:right;margin-right:30px;font-size:13px;line-height:29px}.feedback-btn-blue,.feedback-btn-gray{cursor:pointer;color:#fff;text-align:center;font-family:Roboto,sans-serif}#feedback-overview-error{margin-top:20px}#feedback-highlighter{display:none;bottom:100px;right:100px;position:fixed;height:275px}#feedback-overview{display:none;top:10%;left:50%;margin-left:-420px;position:fixed;width:840px!important;height:auto}#feedback-submit-error,#feedback-submit-success{top:30%;left:50%;margin-left:-300px;display:block;position:fixed;height:auto}.feedback-btn{padding:10px;outline:0;background-clip:padding-box;-webkit-box-shadow:0 4px 16px rgba(0,0,0,.2);-moz-box-shadow:0 4px 16px rgba(0,0,0,.2);box-shadow:0 4px 16px rgba(0,0,0,.2);z-index:40000}.feedback-btn-gray{border:1px solid #dcdcdc;border:1px solid rgba(0,0,0,.1);-webkit-border-radius:2px;-moz-border-radius:2px;border-radius:2px;-moz-background-clip:padding;-webkit-background-clip:padding-box;background-clip:padding-box;background-color:#ff9800;font-weight:600;letter-spacing:.5px}.feedback-btn-gray:hover{border:2px solid #ff9800}.feedback-btn-blue{-webkit-border-radius:2px;-moz-border-radius:2px;border-radius:2px;-moz-background-clip:padding;-webkit-background-clip:padding-box;background-clip:padding-box;background-color:#4d90fe;background:-webkit-gradient(linear,left top,left bottom,from(#4d90fe),to(#357ae8));background:-webkit-linear-gradient(top,#4d90fe,#357ae8);background:-moz-linear-gradient(top,#4d90fe,#357ae8);background:-ms-linear-gradient(top,#4d90fe,#357ae8);background:-o-linear-gradient(top,#4d90fe,#357ae8);border:1px solid #2f5bb7}#feedback-note,#feedback-note-tmp{resize:none}#feedback-highlighter,#feedback-overview,#feedback-submit-error,#feedback-submit-success,#feedback-welcome{font-family:Roboto,sans-serif;z-index:40000;padding:30px 42px;width:540px;border:1px solid rgba(0,0,0,.333);outline:0;-webkit-box-shadow:0 4px 16px rgba(0,0,0,.2);-moz-box-shadow:0 4px 16px rgba(0,0,0,.2);box-shadow:0 4px 16px rgba(0,0,0,.2);background:#fff;background-clip:padding-box;-webkit-box-sizing:border-box;-moz-box-sizing:border-box;box-sizing:border-box;-webkit-transform:translateZ();-moz-transform:translateZ();-ms-transform:translateZ();-o-transform:translateZ()}.feedback-setblackout,.feedback-sethighlight{-webkit-box-shadow:none;-moz-box-shadow:none;box-shadow:none;background-color:#f5f5f5;background:-webkit-gradient(linear,left top,left bottom,from(#f5f5f5),to(#f1f1f1));background:-webkit-linear-gradient(top,#f5f5f5,#f1f1f1);background:-moz-linear-gradient(top,#f5f5f5,#f1f1f1);background:-ms-linear-gradient(top,#f5f5f5,#f1f1f1);background:-o-linear-gradient(top,#f5f5f5,#f1f1f1);color:#444;border:1px solid #dcdcdc;border:1px solid rgba(0,0,0,.1);-webkit-border-radius:2px;-moz-border-radius:2px;border-radius:2px;-moz-background-clip:padding;-webkit-background-clip:padding-box;background-clip:padding-box;cursor:default;font-size:11px;font-weight:700;text-align:center;white-space:nowrap;margin-right:16px;height:30px;line-height:28px;min-width:90px;outline:0;padding:0 8px;display:inline-block;float:left}.feedback-setblackout{margin-top:10px;clear:both}.feedback-sethighlight div{background:url(icons.png) 0 -94px;width:16px;height:16px;margin-top:7px;float:left}.feedback-setblackout div{background:url(icons.png) -16px -94px;width:16px;height:16px;margin-top:7px;float:left}.feedback-setblackout:hover,.feedback-sethighlight:hover{-webkit-box-shadow:none;-moz-box-shadow:none;box-shadow:none;background-color:#f8f8f8;background:-webkit-gradient(linear,left top,left bottom,from(#f8f8f8),to(#f1f1f1));background:-webkit-linear-gradient(top,#f8f8f8,#f1f1f1);background:-moz-linear-gradient(top,#f8f8f8,#f1f1f1);background:-ms-linear-gradient(top,#f8f8f8,#f1f1f1);background:-o-linear-gradient(top,#f8f8f8,#f1f1f1);border:1px solid #c6c6c6;color:#333}.feedback-active{-webkit-box-shadow:inset 0 1px 2px rgba(0,0,0,.1);-moz-box-shadow:inset 0 1px 2px rgba(0,0,0,.1);box-shadow:inset 0 1px 2px rgba(0,0,0,.1);background-color:#eee;background:-webkit-gradient(linear,left top,left bottom,from(#eee),to(#e0e0e0));background:-webkit-linear-gradient(top,#eee,#e0e0e0);background:-moz-linear-gradient(top,#eee,#e0e0e0);background:-ms-linear-gradient(top,#eee,#e0e0e0);background:-o-linear-gradient(top,#eee,#e0e0e0);border:1px solid #ccc;color:#333}#feedback-highlighter label{float:left;margin:0 0 0 10px;line-height:30px;font-size:13px;font-weight:400}#feedback-highlighter label.lower{margin-top:10px}.feedback-buttons{float:right;margin-top:20px;clear:both}#feedback-module h3{font-weight:700;font-size:15px;margin:8px 0}#feedback-title{width:314px;padding:0 10px}.feedback-additional{margin-bottom:20px!important}#feedback-overview-description{float:left}#feedback-note{width:314px;padding:10px;height:150px;outline:0;font-family:Roboto,sans-serif;line-height:20px}#feedback-overview-screenshot{float:right}.feedback-screenshot{max-width:396px;padding:1px;border:1px solid #adadad}#feedback-overview-description-text span{font-size:14px;margin:8px 0 8px 26px;color:#666;padding-left:10px;background:url(icons.png) -30px -34px no-repeat}#feedback-additional-none,#feedback-browser-info,#feedback-page-info,#feedback-page-structure{margin-top:16px;display:none}.feedback-spinner{position:absolute;top:0;left:0;z-index:10000000;background:url(spinner.gif);width:32px;height:32px} \ No newline at end of file diff --git a/public/feedback-tool/feedback.min.js b/public/feedback-tool/feedback.min.js deleted file mode 100644 index 44f074572..000000000 --- a/public/feedback-tool/feedback.min.js +++ /dev/null @@ -1,6 +0,0 @@ -"use strict";function _classCallCheck(A,e){if(!(A instanceof e))throw new TypeError("Cannot call a class as a function")}var _createClass=function(){function A(A,e){for(var t=0;t0&&o[o.length-1])&&(6===t[0]||2===t[0])){B=0;continue}if(3===t[0]&&(!o||t[1]>o[0]&&t[1]=1&&(t-=1),t<1/6?(e-A)*t*6+A:t<.5?e:t<2/3?6*(e-A)*(2/3-t)+A:A}function n(A){return A.type!==h.FUNCTION||un[A.name]}for(var s=function(A,e){return(s=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(A,e){A.__proto__=e}||function(A,e){for(var t in e)e.hasOwnProperty(t)&&(A[t]=e[t])})(A,e)},o=function(){return o=Object.assign||function(A){for(var e,t=1,r=arguments.length;t=55296&&n<=56319&&t>10)+55296,o%1024+56320)),(n+1===t||r.length>16384)&&(s+=String.fromCharCode.apply(String,r),r.length=0)}return s},Q="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",l="undefined"==typeof Uint8Array?[]:new Uint8Array(256),w=0;w>4,c[B++]=(15&r)<<4|n>>2,c[B++]=(3&n)<<6|63&s;return a},d=function(A){for(var e=A.length,t=[],r=0;r>C,H=1<>C,m=p+K,b=m,v=32,I=b+v,T=65536>>f,R=1<=0){if(A<55296||A>56319&&A<=65535)return e=this.index[A>>C],e=(e<>C)],e=(e<>f),e=this.index[e],e+=A>>C&y,e=this.index[e],e=(e<_?(n.push(!0),o-=_):n.push(!1),["normal","auto","loose"].indexOf(e)!==-1&&[8208,8211,12316,12448].indexOf(A)!==-1)return r.push(s),t.push(AA);if(o===z||o===Y){if(0===s)return r.push(s),t.push(wA);var i=t[s-1];return SA.indexOf(i)===-1?(r.push(r[s-1]),t.push(i)):(r.push(s),t.push(wA))}return r.push(s),o===hA?t.push("strict"===e?sA:EA):o===KA?t.push(wA):o===lA?t.push(wA):o===mA?A>=131072&&A<=196605||A>=196608&&A<=262141?t.push(EA):t.push(wA):void t.push(o)}),[r,t,n]},kA=function(A,e,t,r){var n=r[t];if(Array.isArray(A)?A.indexOf(n)!==-1:A===n)for(var s=t;s<=r.length;){s++;var o=r[s];if(o===e)return!0;if(o!==W)break}if(n===W)for(var s=t;s>0;){s--;var i=r[s];if(Array.isArray(A)?A.indexOf(i)!==-1:A===i)for(var B=t;B<=r.length;){B++;var o=r[B];if(o===e)return!0;if(o!==W)break}if(i!==W)break}return!1},xA=function(A,e){for(var t=A;t>=0;){var r=e[t];if(r!==W)return r;t--}return 0},PA=function(A,e,t,r,n){if(0===t[r])return vA;var s=r-1;if(Array.isArray(n)&&n[s]===!0)return vA;var o=s-1,i=s+1,B=e[s],a=o>=0?e[o]:0,c=e[i];if(B===x&&c===P)return vA;if(yA.indexOf(B)!==-1)return bA;if(yA.indexOf(c)!==-1)return vA;if(LA.indexOf(c)!==-1)return vA;if(xA(s,e)===J)return IA;if(TA.get(A[s])===Y&&(c===EA||c===gA||c===dA))return vA;if(B===X||c===X)return vA;if(B===G)return vA;if([W,j,$].indexOf(B)===-1&&c===G)return vA;if([eA,tA,rA,BA,QA].indexOf(c)!==-1)return vA;if(xA(s,e)===oA)return vA;if(kA(iA,oA,s,e))return vA;if(kA([eA,tA],sA,s,e))return vA;if(kA(q,q,s,e))return vA;if(B===W)return IA;if(B===iA||c===iA)return vA;if(c===AA||B===AA)return IA;if([j,$,sA].indexOf(c)!==-1||B===Z)return vA;if(a===fA&&MA.indexOf(B)!==-1)return vA;if(B===QA&&c===fA)return vA;if(c===nA&&RA.concat(nA,rA,aA,EA,gA,dA).indexOf(B)!==-1)return vA;if(RA.indexOf(c)!==-1&&B===aA||RA.indexOf(B)!==-1&&c===aA)return vA;if(B===uA&&[EA,gA,dA].indexOf(c)!==-1||[EA,gA,dA].indexOf(B)!==-1&&c===cA)return vA;if(RA.indexOf(B)!==-1&&OA.indexOf(c)!==-1||OA.indexOf(B)!==-1&&RA.indexOf(c)!==-1)return vA;if([uA,cA].indexOf(B)!==-1&&(c===aA||[oA,$].indexOf(c)!==-1&&e[i+1]===aA)||[oA,$].indexOf(B)!==-1&&c===aA||B===aA&&[aA,QA,BA].indexOf(c)!==-1)return vA;if([aA,QA,BA,eA,tA].indexOf(c)!==-1)for(var u=s;u>=0;){var Q=e[u];if(Q===aA)return vA;if([QA,BA].indexOf(Q)===-1)break;u--}if([uA,cA].indexOf(c)!==-1)for(var u=[eA,tA].indexOf(B)!==-1?o:s;u>=0;){var Q=e[u];if(Q===aA)return vA;if([QA,BA].indexOf(Q)===-1)break;u--}if(FA===B&&[FA,pA,UA,CA].indexOf(c)!==-1||[pA,UA].indexOf(B)!==-1&&[pA,HA].indexOf(c)!==-1||[HA,CA].indexOf(B)!==-1&&c===HA)return vA;if(DA.indexOf(B)!==-1&&[nA,cA].indexOf(c)!==-1||DA.indexOf(c)!==-1&&B===uA)return vA;if(RA.indexOf(B)!==-1&&RA.indexOf(c)!==-1)return vA;if(B===BA&&RA.indexOf(c)!==-1)return vA;if(RA.concat(aA).indexOf(B)!==-1&&c===oA||RA.concat(aA).indexOf(c)!==-1&&B===tA)return vA;if(B===NA&&c===NA){for(var l=t[s],w=1;l>0&&(l--,e[l]===NA);)w++;if(w%2!==0)return vA}return B===gA&&c===dA?vA:IA},zA=function(A,e){e||(e={lineBreak:"normal",wordBreak:"normal"});var t=_A(A,e.lineBreak),r=t[0],n=t[1],s=t[2];"break-all"!==e.wordBreak&&"break-word"!==e.wordBreak||(n=n.map(function(A){return[aA,wA,KA].indexOf(A)!==-1?EA:A}));var o="keep-all"===e.wordBreak?s.map(function(e,t){return e&&A[t]>=19968&&A[t]<=40959}):void 0;return[r,n,o]},VA=function(){function A(A,e,t,r){this.codePoints=A,this.required=e===bA,this.start=t,this.end=r}return A.prototype.slice=function(){return u.apply(void 0,this.codePoints.slice(this.start,this.end))},A}(),XA=function(A,e){var t=c(A),r=zA(t,e),n=r[0],s=r[1],o=r[2],i=t.length,B=0,a=0;return{next:function(){if(a>=i)return{done:!0,value:null};for(var A=vA;a=_e&&A<=57},je=function(A){return A>=55296&&A<=57343},Ze=function(A){return qe(A)||A>=Xe&&A<=Ge||A>=ke&&A<=Pe},$e=function(A){return A>=ke&&A<=Ve},At=function(A){return A>=Xe&&A<=Ye},et=function(A){return $e(A)||At(A)},tt=function(A){return A>=He},rt=function(A){return A===jA||A===Ae||A===ee},nt=function(A){return et(A)||tt(A)||A===ce},st=function(A){return nt(A)||qe(A)||A===ue},ot=function(A){return A>=Re&&A<=ye||A===Le||A>=Oe&&A<=Se||A===De},it=function(A,e){return A===$A&&e!==jA},Bt=function(A,e,t){return A===ue?nt(e)||it(e,t):!!nt(A)||!(A!==$A||!it(A,e))},at=function(A,e,t){return A===me||A===ue?!!qe(e)||e===Te&&qe(t):qe(A===Te?e:A)},ct=function(A){var e=0,t=1;A[e]!==me&&A[e]!==ue||(A[e]===ue&&(t=-1),e++);for(var r=[];qe(A[e]);)r.push(A[e++]);var n=r.length?parseInt(u.apply(void 0,r),10):0;A[e]===Te&&e++;for(var s=[];qe(A[e]);)s.push(A[e++]);var o=s.length,i=o?parseInt(u.apply(void 0,s),10):0;A[e]!==Je&&A[e]!==xe||e++;var B=1;A[e]!==me&&A[e]!==ue||(A[e]===ue&&(B=-1),e++);for(var a=[];qe(A[e]);)a.push(A[e++]);var c=a.length?parseInt(u.apply(void 0,a),10):0;return t*(n+i*Math.pow(10,-o))*Math.pow(10,B*c)},ut={type:h.LEFT_PARENTHESIS_TOKEN},Qt={type:h.RIGHT_PARENTHESIS_TOKEN},lt={type:h.COMMA_TOKEN},wt={type:h.SUFFIX_MATCH_TOKEN},ht={type:h.PREFIX_MATCH_TOKEN},gt={type:h.COLUMN_TOKEN},dt={type:h.DASH_MATCH_TOKEN},Ut={type:h.INCLUDE_MATCH_TOKEN},Ct={type:h.LEFT_CURLY_BRACKET_TOKEN},ft={type:h.RIGHT_CURLY_BRACKET_TOKEN},Et={type:h.SUBSTRING_MATCH_TOKEN},Ft={type:h.BAD_URL_TOKEN},pt={type:h.BAD_STRING_TOKEN},Ht={type:h.CDO_TOKEN},Nt={type:h.CDC_TOKEN},Kt={type:h.COLON_TOKEN},mt={type:h.SEMICOLON_TOKEN},bt={type:h.LEFT_SQUARE_BRACKET_TOKEN},vt={type:h.RIGHT_SQUARE_BRACKET_TOKEN},It={type:h.WHITESPACE_TOKEN},Tt={type:h.EOF_TOKEN},Rt=function(){function A(){this._value=[]}return A.prototype.write=function(A){this._value=this._value.concat(c(A))},A.prototype.read=function(){for(var A=[],e=this.consumeToken();e!==Tt;)A.push(e),e=this.consumeToken();return A},A.prototype.consumeToken=function(){var A=this.consumeCodePoint();switch(A){case te:return this.consumeStringToken(te);case ne:var e=this.peekCodePoint(0),t=this.peekCodePoint(1),r=this.peekCodePoint(2);if(st(e)||it(t,r)){var n=Bt(e,t,r)?WA:GA,s=this.consumeName();return{type:h.HASH_TOKEN,value:s,flags:n}}break;case se:if(this.peekCodePoint(0)===re)return this.consumeCodePoint(),wt;break;case ie:return this.consumeStringToken(ie);case Be:return ut;case ae:return Qt;case Ke:if(this.peekCodePoint(0)===re)return this.consumeCodePoint(),Et;break;case me:if(at(A,this.peekCodePoint(0),this.peekCodePoint(1)))return this.reconsumeCodePoint(A),this.consumeNumericToken();break;case be:return lt;case ue:var o=A,i=this.peekCodePoint(0),B=this.peekCodePoint(1);if(at(o,i,B))return this.reconsumeCodePoint(A),this.consumeNumericToken();if(Bt(o,i,B))return this.reconsumeCodePoint(A),this.consumeIdentLikeToken();if(i===ue&&B===we)return this.consumeCodePoint(),this.consumeCodePoint(),Nt;break;case Te:if(at(A,this.peekCodePoint(0),this.peekCodePoint(1)))return this.reconsumeCodePoint(A),this.consumeNumericToken();break;case ZA:if(this.peekCodePoint(0)===Ke)for(this.consumeCodePoint();;){var a=this.consumeCodePoint();if(a===Ke&&(a=this.consumeCodePoint(),a===ZA))return this.consumeToken();if(a===Me)return this.consumeToken()}break;case ve:return Kt;case Ie:return mt;case le:if(this.peekCodePoint(0)===Qe&&this.peekCodePoint(1)===ue&&this.peekCodePoint(2)===ue)return this.consumeCodePoint(),this.consumeCodePoint(),Ht;break;case he:var c=this.peekCodePoint(0),Q=this.peekCodePoint(1),l=this.peekCodePoint(2);if(Bt(c,Q,l)){var s=this.consumeName();return{type:h.AT_KEYWORD_TOKEN,value:s}}break;case ge:return bt;case $A:if(it(A,this.peekCodePoint(0)))return this.reconsumeCodePoint(A),this.consumeIdentLikeToken();break;case de:return vt;case Ue:if(this.peekCodePoint(0)===re)return this.consumeCodePoint(),ht;break;case Ce:return Ct;case Ee:return ft;case ze:case We:var w=this.peekCodePoint(0),g=this.peekCodePoint(1);return w!==me||!Ze(g)&&g!==fe||(this.consumeCodePoint(),this.consumeUnicodeRangeToken()),this.reconsumeCodePoint(A),this.consumeIdentLikeToken();case Fe:if(this.peekCodePoint(0)===re)return this.consumeCodePoint(),dt;if(this.peekCodePoint(0)===Fe)return this.consumeCodePoint(),gt;break;case pe:if(this.peekCodePoint(0)===re)return this.consumeCodePoint(),Ut;break;case Me:return Tt}return rt(A)?(this.consumeWhiteSpace(),It):qe(A)?(this.reconsumeCodePoint(A),this.consumeNumericToken()):nt(A)?(this.reconsumeCodePoint(A),this.consumeIdentLikeToken()):{type:h.DELIM_TOKEN,value:u(A)}},A.prototype.consumeCodePoint=function(){var A=this._value.shift();return"undefined"==typeof A?-1:A},A.prototype.reconsumeCodePoint=function(A){this._value.unshift(A)},A.prototype.peekCodePoint=function(A){return A>=this._value.length?-1:this._value[A]},A.prototype.consumeUnicodeRangeToken=function(){for(var A=[],e=this.consumeCodePoint();Ze(e)&&A.length<6;)A.push(e),e=this.consumeCodePoint();for(var t=!1;e===fe&&A.length<6;)A.push(e),e=this.consumeCodePoint(),t=!0;if(t){var r=parseInt(u.apply(void 0,A.map(function(A){return A===fe?_e:A})),16),n=parseInt(u.apply(void 0,A.map(function(A){return A===fe?Ge:A})),16);return{type:h.UNICODE_RANGE_TOKEN,start:r,end:n}}var s=parseInt(u.apply(void 0,A),16);if(this.peekCodePoint(0)===ue&&Ze(this.peekCodePoint(1))){this.consumeCodePoint(),e=this.consumeCodePoint();for(var o=[];Ze(e)&&o.length<6;)o.push(e),e=this.consumeCodePoint();var n=parseInt(u.apply(void 0,o),16);return{type:h.UNICODE_RANGE_TOKEN,start:s,end:n}}return{type:h.UNICODE_RANGE_TOKEN,start:s,end:s}},A.prototype.consumeIdentLikeToken=function(){var A=this.consumeName();return"url"===A.toLowerCase()&&this.peekCodePoint(0)===Be?(this.consumeCodePoint(),this.consumeUrlToken()):this.peekCodePoint(0)===Be?(this.consumeCodePoint(),{type:h.FUNCTION_TOKEN,value:A}):{type:h.IDENT_TOKEN,value:A}},A.prototype.consumeUrlToken=function(){var A=[];if(this.consumeWhiteSpace(),this.peekCodePoint(0)===Me)return{type:h.URL_TOKEN,value:""};var e=this.peekCodePoint(0);if(e===ie||e===te){var t=this.consumeStringToken(this.consumeCodePoint());return t.type===h.STRING_TOKEN&&(this.consumeWhiteSpace(),this.peekCodePoint(0)===Me||this.peekCodePoint(0)===ae)?(this.consumeCodePoint(),{type:h.URL_TOKEN,value:t.value}):(this.consumeBadUrlRemnants(),Ft)}for(;;){var r=this.consumeCodePoint();if(r===Me||r===ae)return{type:h.URL_TOKEN,value:u.apply(void 0,A)};if(rt(r))return this.consumeWhiteSpace(),this.peekCodePoint(0)===Me||this.peekCodePoint(0)===ae?(this.consumeCodePoint(),{type:h.URL_TOKEN,value:u.apply(void 0,A)}):(this.consumeBadUrlRemnants(),Ft);if(r===te||r===ie||r===Be||ot(r))return this.consumeBadUrlRemnants(),Ft;if(r===$A){if(!it(r,this.peekCodePoint(0)))return this.consumeBadUrlRemnants(),Ft;A.push(this.consumeEscapedCodePoint())}else A.push(r)}},A.prototype.consumeWhiteSpace=function(){for(;rt(this.peekCodePoint(0));)this.consumeCodePoint()},A.prototype.consumeBadUrlRemnants=function(){for(;;){var A=this.consumeCodePoint();if(A===ae||A===Me)return;it(A,this.peekCodePoint(0))&&this.consumeEscapedCodePoint()}},A.prototype.consumeStringSlice=function(A){for(var e=6e4,t="";A>0;){var r=Math.min(e,A);t+=u.apply(void 0,this._value.splice(0,r)),A-=r}return this._value.shift(),t},A.prototype.consumeStringToken=function(A){for(var e="",t=0;;){var r=this._value[t];if(r===Me||void 0===r||r===A)return e+=this.consumeStringSlice(t),{type:h.STRING_TOKEN,value:e};if(r===jA)return this._value.splice(0,t),pt;if(r===$A){var n=this._value[t+1];n!==Me&&void 0!==n&&(n===jA?(e+=this.consumeStringSlice(t),t=-1,this._value.shift()):it(r,n)&&(e+=this.consumeStringSlice(t),e+=u(this.consumeEscapedCodePoint()),t=-1))}t++}},A.prototype.consumeNumber=function(){var A=[],e=YA,t=this.peekCodePoint(0);for(t!==me&&t!==ue||A.push(this.consumeCodePoint());qe(this.peekCodePoint(0));)A.push(this.consumeCodePoint());t=this.peekCodePoint(0);var r=this.peekCodePoint(1);if(t===Te&&qe(r))for(A.push(this.consumeCodePoint(),this.consumeCodePoint()),e=qA;qe(this.peekCodePoint(0));)A.push(this.consumeCodePoint());t=this.peekCodePoint(0),r=this.peekCodePoint(1);var n=this.peekCodePoint(2);if((t===Je||t===xe)&&((r===me||r===ue)&&qe(n)||qe(r)))for(A.push(this.consumeCodePoint(),this.consumeCodePoint()),e=qA;qe(this.peekCodePoint(0));)A.push(this.consumeCodePoint());return[ct(A),e]},A.prototype.consumeNumericToken=function(){var A=this.consumeNumber(),e=A[0],t=A[1],r=this.peekCodePoint(0),n=this.peekCodePoint(1),s=this.peekCodePoint(2);if(Bt(r,n,s)){var o=this.consumeName();return{type:h.DIMENSION_TOKEN,number:e,flags:t,unit:o}}return r===oe?(this.consumeCodePoint(),{type:h.PERCENTAGE_TOKEN,number:e,flags:t}):{type:h.NUMBER_TOKEN,number:e,flags:t}},A.prototype.consumeEscapedCodePoint=function(){var A=this.consumeCodePoint();if(Ze(A)){for(var e=u(A);Ze(this.peekCodePoint(0))&&e.length<6;)e+=u(this.consumeCodePoint());rt(this.peekCodePoint(0))&&this.consumeCodePoint();var t=parseInt(e,16);return 0===t||je(t)||t>1114111?Ne:t}return A===Me?Ne:A},A.prototype.consumeName=function(){for(var A="";;){var e=this.consumeCodePoint();if(st(e))A+=u(e);else{if(!it(e,this.peekCodePoint(0)))return this.reconsumeCodePoint(e),A;A+=u(this.consumeEscapedCodePoint())}}},A}(),yt=function(){function A(A){this._tokens=A}return A.create=function(e){var t=new Rt;return t.write(e),new A(t.read())},A.parseValue=function(e){return A.create(e).parseComponentValue()},A.parseValues=function(e){return A.create(e).parseComponentValues()},A.prototype.parseComponentValue=function(){for(var A=this.consumeToken();A.type===h.WHITESPACE_TOKEN;)A=this.consumeToken();if(A.type===h.EOF_TOKEN)throw new SyntaxError("Error parsing CSS component value, unexpected EOF");this.reconsumeToken(A);var e=this.consumeComponentValue();do A=this.consumeToken();while(A.type===h.WHITESPACE_TOKEN);if(A.type===h.EOF_TOKEN)return e;throw new SyntaxError("Error parsing CSS component value, multiple values found when expecting only one")},A.prototype.parseComponentValues=function(){for(var A=[];;){var e=this.consumeComponentValue();if(e.type===h.EOF_TOKEN)return A;A.push(e),A.push()}},A.prototype.consumeComponentValue=function(){var A=this.consumeToken();switch(A.type){case h.LEFT_CURLY_BRACKET_TOKEN:case h.LEFT_SQUARE_BRACKET_TOKEN:case h.LEFT_PARENTHESIS_TOKEN:return this.consumeSimpleBlock(A.type);case h.FUNCTION_TOKEN:return this.consumeFunction(A)}return A},A.prototype.consumeSimpleBlock=function(A){for(var e={type:A,values:[]},t=this.consumeToken();;){if(t.type===h.EOF_TOKEN||Pt(t,A))return e;this.reconsumeToken(t),e.values.push(this.consumeComponentValue()),t=this.consumeToken()}},A.prototype.consumeFunction=function(A){for(var e={name:A.value,values:[],type:h.FUNCTION};;){var t=this.consumeToken();if(t.type===h.EOF_TOKEN||t.type===h.RIGHT_PARENTHESIS_TOKEN)return e;this.reconsumeToken(t),e.values.push(this.consumeComponentValue())}},A.prototype.consumeToken=function(){var A=this._tokens.shift();return"undefined"==typeof A?Tt:A},A.prototype.reconsumeToken=function(A){this._tokens.unshift(A)},A}(),Lt=function(A){return A.type===h.DIMENSION_TOKEN},Ot=function(A){return A.type===h.NUMBER_TOKEN},St=function(A){return A.type===h.IDENT_TOKEN},Dt=function(A){return A.type===h.STRING_TOKEN},Mt=function(A,e){return St(A)&&A.value===e},_t=function(A){return A.type!==h.WHITESPACE_TOKEN},kt=function(A){return A.type!==h.WHITESPACE_TOKEN&&A.type!==h.COMMA_TOKEN},xt=function(A){var e=[],t=[];return A.forEach(function(A){if(A.type===h.COMMA_TOKEN){if(0===t.length)throw new Error("Error parsing function args, zero tokens for arg");return e.push(t),void(t=[])}A.type!==h.WHITESPACE_TOKEN&&t.push(A)}),t.length&&e.push(t),e},Pt=function(A,e){return e===h.LEFT_CURLY_BRACKET_TOKEN&&A.type===h.RIGHT_CURLY_BRACKET_TOKEN||(e===h.LEFT_SQUARE_BRACKET_TOKEN&&A.type===h.RIGHT_SQUARE_BRACKET_TOKEN||e===h.LEFT_PARENTHESIS_TOKEN&&A.type===h.RIGHT_PARENTHESIS_TOKEN)},zt=function(A){return A.type===h.NUMBER_TOKEN||A.type===h.DIMENSION_TOKEN},Vt=function(A){return A.type===h.PERCENTAGE_TOKEN||zt(A)},Xt=function(A){return A.length>1?[A[0],A[1]]:[A[0]]},Jt={type:h.NUMBER_TOKEN,number:0,flags:YA},Gt={type:h.PERCENTAGE_TOKEN,number:50,flags:YA},Wt={type:h.PERCENTAGE_TOKEN,number:100,flags:YA},Yt=function(A,e,t){var r=A[0],n=A[1];return[qt(r,e),qt("undefined"!=typeof n?n:r,t)]},qt=function(A,e){if(A.type===h.PERCENTAGE_TOKEN)return A.number/100*e;if(Lt(A))switch(A.unit){case"rem":case"em":return 16*A.number;case"px":default:return A.number}return A.number},jt="deg",Zt="grad",$t="rad",Ar="turn",er={name:"angle",parse:function(A){if(A.type===h.DIMENSION_TOKEN)switch(A.unit){case jt:return Math.PI*A.number/180;case Zt:return Math.PI/200*A.number;case $t:return A.number;case Ar:return 2*Math.PI*A.number}throw new Error("Unsupported angle type")}},tr=function(A){return A.type===h.DIMENSION_TOKEN&&(A.unit===jt||A.unit===Zt||A.unit===$t||A.unit===Ar)},rr=function(A){var e=A.filter(St).map(function(A){return A.value}).join(" ");switch(e){case"to bottom right":case"to right bottom":case"left top":case"top left":return[Jt,Jt];case"to top":case"bottom":return nr(0);case"to bottom left":case"to left bottom":case"right top":case"top right":return[Jt,Wt];case"to right":case"left":return nr(90);case"to top left":case"to left top":case"right bottom":case"bottom right":return[Wt,Wt];case"to bottom":case"top":return nr(180);case"to top right":case"to right top":case"left bottom":case"bottom left":return[Wt,Jt];case"to left":case"right":return nr(270)}return 0},nr=function(A){return Math.PI*A/180},sr={name:"color",parse:function(A){if(A.type===h.FUNCTION){var e=Qr[A.name];if("undefined"==typeof e)throw new Error('Attempting to parse an unsupported color function "'+A.name+'"');return e(A.values)}if(A.type===h.HASH_TOKEN){if(3===A.value.length){var t=A.value.substring(0,1),r=A.value.substring(1,2),n=A.value.substring(2,3);return Br(parseInt(t+t,16),parseInt(r+r,16),parseInt(n+n,16),1)}if(4===A.value.length){var t=A.value.substring(0,1),r=A.value.substring(1,2),n=A.value.substring(2,3),s=A.value.substring(3,4);return Br(parseInt(t+t,16),parseInt(r+r,16),parseInt(n+n,16),parseInt(s+s,16)/255)}if(6===A.value.length){var t=A.value.substring(0,2),r=A.value.substring(2,4),n=A.value.substring(4,6);return Br(parseInt(t,16),parseInt(r,16),parseInt(n,16),1)}if(8===A.value.length){var t=A.value.substring(0,2),r=A.value.substring(2,4),n=A.value.substring(4,6),s=A.value.substring(6,8);return Br(parseInt(t,16),parseInt(r,16),parseInt(n,16),parseInt(s,16)/255)}}if(A.type===h.IDENT_TOKEN){var o=lr[A.value.toUpperCase()];if("undefined"!=typeof o)return o}return lr.TRANSPARENT}},or=function(A){return 0===(255&A)},ir=function(A){var e=255&A,t=255&A>>8,r=255&A>>16,n=255&A>>24;return e<255?"rgba("+n+","+r+","+t+","+e/255+")":"rgb("+n+","+r+","+t+")"},Br=function(A,e,t,r){return(A<<24|e<<16|t<<8|Math.round(255*r)<<0)>>>0},ar=function(A,e){if(A.type===h.NUMBER_TOKEN)return A.number;if(A.type===h.PERCENTAGE_TOKEN){var t=3===e?1:255;return 3===e?A.number/100*t:Math.round(A.number/100*t)}return 0},cr=function(A){var e=A.filter(kt);if(3===e.length){var t=e.map(ar),r=t[0],n=t[1],s=t[2];return Br(r,n,s,1)}if(4===e.length){var o=e.map(ar),r=o[0],n=o[1],s=o[2],i=o[3];return Br(r,n,s,i)}return 0},ur=function(A){var e=A.filter(kt),t=e[0],n=e[1],s=e[2],o=e[3],i=(t.type===h.NUMBER_TOKEN?nr(t.number):er.parse(t))/(2*Math.PI),B=Vt(n)?n.number/100:0,a=Vt(s)?s.number/100:0,c="undefined"!=typeof o&&Vt(o)?qt(o,1):1;if(0===B)return Br(255*a,255*a,255*a,1);var u=a<=.5?a*(B+1):a+B-a*B,Q=2*a-u,l=r(Q,u,i+1/3),w=r(Q,u,i),g=r(Q,u,i-1/3);return Br(255*l,255*w,255*g,c)},Qr={hsl:ur,hsla:ur,rgb:cr,rgba:cr},lr={ALICEBLUE:4042850303,ANTIQUEWHITE:4209760255,AQUA:16777215,AQUAMARINE:2147472639,AZURE:4043309055,BEIGE:4126530815,BISQUE:4293182719,BLACK:255,BLANCHEDALMOND:4293643775,BLUE:65535,BLUEVIOLET:2318131967,BROWN:2771004159,BURLYWOOD:3736635391,CADETBLUE:1604231423,CHARTREUSE:2147418367,CHOCOLATE:3530104575,CORAL:4286533887,CORNFLOWERBLUE:1687547391,CORNSILK:4294499583,CRIMSON:3692313855,CYAN:16777215,DARKBLUE:35839,DARKCYAN:9145343,DARKGOLDENROD:3095837695,DARKGRAY:2846468607,DARKGREEN:6553855,DARKGREY:2846468607,DARKKHAKI:3182914559,DARKMAGENTA:2332068863,DARKOLIVEGREEN:1433087999,DARKORANGE:4287365375,DARKORCHID:2570243327,DARKRED:2332033279,DARKSALMON:3918953215,DARKSEAGREEN:2411499519,DARKSLATEBLUE:1211993087,DARKSLATEGRAY:793726975,DARKSLATEGREY:793726975,DARKTURQUOISE:13554175,DARKVIOLET:2483082239,DEEPPINK:4279538687,DEEPSKYBLUE:12582911,DIMGRAY:1768516095,DIMGREY:1768516095,DODGERBLUE:512819199,FIREBRICK:2988581631,FLORALWHITE:4294635775,FORESTGREEN:579543807,FUCHSIA:4278255615,GAINSBORO:3705462015,GHOSTWHITE:4177068031,GOLD:4292280575,GOLDENROD:3668254975,GRAY:2155905279,GREEN:8388863,GREENYELLOW:2919182335,GREY:2155905279,HONEYDEW:4043305215,HOTPINK:4285117695,INDIANRED:3445382399,INDIGO:1258324735,IVORY:4294963455,KHAKI:4041641215,LAVENDER:3873897215,LAVENDERBLUSH:4293981695,LAWNGREEN:2096890111,LEMONCHIFFON:4294626815,LIGHTBLUE:2916673279,LIGHTCORAL:4034953471,LIGHTCYAN:3774873599,LIGHTGOLDENRODYELLOW:4210742015,LIGHTGRAY:3553874943,LIGHTGREEN:2431553791,LIGHTGREY:3553874943,LIGHTPINK:4290167295,LIGHTSALMON:4288707327,LIGHTSEAGREEN:548580095,LIGHTSKYBLUE:2278488831,LIGHTSLATEGRAY:2005441023,LIGHTSLATEGREY:2005441023,LIGHTSTEELBLUE:2965692159,LIGHTYELLOW:4294959359,LIME:16711935,LIMEGREEN:852308735,LINEN:4210091775,MAGENTA:4278255615,MAROON:2147483903,MEDIUMAQUAMARINE:1724754687,MEDIUMBLUE:52735,MEDIUMORCHID:3126187007,MEDIUMPURPLE:2473647103,MEDIUMSEAGREEN:1018393087,MEDIUMSLATEBLUE:2070474495,MEDIUMSPRINGGREEN:16423679,MEDIUMTURQUOISE:1221709055,MEDIUMVIOLETRED:3340076543,MIDNIGHTBLUE:421097727,MINTCREAM:4127193855,MISTYROSE:4293190143,MOCCASIN:4293178879,NAVAJOWHITE:4292783615,NAVY:33023,OLDLACE:4260751103,OLIVE:2155872511,OLIVEDRAB:1804477439,ORANGE:4289003775,ORANGERED:4282712319,ORCHID:3664828159,PALEGOLDENROD:4008225535,PALEGREEN:2566625535,PALETURQUOISE:2951671551,PALEVIOLETRED:3681588223,PAPAYAWHIP:4293907967,PEACHPUFF:4292524543,PERU:3448061951,PINK:4290825215,PLUM:3718307327,POWDERBLUE:2967529215,PURPLE:2147516671,REBECCAPURPLE:1714657791,RED:4278190335,ROSYBROWN:3163525119,ROYALBLUE:1097458175,SADDLEBROWN:2336560127,SALMON:4202722047,SANDYBROWN:4104413439,SEAGREEN:780883967,SEASHELL:4294307583,SIENNA:2689740287,SILVER:3233857791,SKYBLUE:2278484991,SLATEBLUE:1784335871,SLATEGRAY:1887473919,SLATEGREY:1887473919,SNOW:4294638335,SPRINGGREEN:16744447,STEELBLUE:1182971135,TAN:3535047935,TEAL:8421631,THISTLE:3636451583,TOMATO:4284696575,TRANSPARENT:0,TURQUOISE:1088475391,VIOLET:4001558271,WHEAT:4125012991,WHITE:4294967295,WHITESMOKE:4126537215,YELLOW:4294902015,YELLOWGREEN:2597139199};!function(A){A[A.VALUE=0]="VALUE",A[A.LIST=1]="LIST",A[A.IDENT_VALUE=2]="IDENT_VALUE",A[A.TYPE_VALUE=3]="TYPE_VALUE",A[A.TOKEN_VALUE=4]="TOKEN_VALUE"}(JA||(JA={}));var wr;!function(A){A[A.BORDER_BOX=0]="BORDER_BOX",A[A.PADDING_BOX=1]="PADDING_BOX",A[A.CONTENT_BOX=2]="CONTENT_BOX"}(wr||(wr={}));var hr,gr={name:"background-clip",initialValue:"border-box",prefix:!1,type:JA.LIST,parse:function(A){return A.map(function(A){if(St(A))switch(A.value){case"padding-box":return wr.PADDING_BOX;case"content-box":return wr.CONTENT_BOX}return wr.BORDER_BOX})}},dr={name:"background-color",initialValue:"transparent",prefix:!1,type:JA.TYPE_VALUE,format:"color"},Ur=function(A){var e=sr.parse(A[0]),t=A[1];return t&&Vt(t)?{color:e,stop:t}:{color:e,stop:null}},Cr=function(A,e){var t=A[0],r=A[A.length-1];null===t.stop&&(t.stop=Jt),null===r.stop&&(r.stop=Wt);for(var n=[],s=0,o=0;os?n.push(B):n.push(s),s=B}else n.push(null)}for(var a=null,o=0;oA.optimumDistance)?{optimumCorner:e,optimumDistance:i}:A},{optimumDistance:n?1/0:-(1/0),optimumCorner:null}).optimumCorner},Hr=function(A,e,t,r,n){var s=0,o=0;switch(A.size){case Bn.CLOSEST_SIDE:A.shape===nn.CIRCLE?s=o=Math.min(Math.abs(e),Math.abs(e-r),Math.abs(t),Math.abs(t-n)):A.shape===nn.ELLIPSE&&(s=Math.min(Math.abs(e),Math.abs(e-r)),o=Math.min(Math.abs(t),Math.abs(t-n)));break;case Bn.CLOSEST_CORNER:if(A.shape===nn.CIRCLE)s=o=Math.min(Fr(e,t),Fr(e,t-n),Fr(e-r,t),Fr(e-r,t-n));else if(A.shape===nn.ELLIPSE){var i=Math.min(Math.abs(t),Math.abs(t-n))/Math.min(Math.abs(e),Math.abs(e-r)),B=pr(r,n,e,t,!0),a=B[0],c=B[1];s=Fr(a-e,(c-t)/i),o=i*s}break;case Bn.FARTHEST_SIDE:A.shape===nn.CIRCLE?s=o=Math.max(Math.abs(e),Math.abs(e-r),Math.abs(t),Math.abs(t-n)):A.shape===nn.ELLIPSE&&(s=Math.max(Math.abs(e),Math.abs(e-r)),o=Math.max(Math.abs(t),Math.abs(t-n)));break;case Bn.FARTHEST_CORNER:if(A.shape===nn.CIRCLE)s=o=Math.max(Fr(e,t),Fr(e,t-n),Fr(e-r,t),Fr(e-r,t-n));else if(A.shape===nn.ELLIPSE){var i=Math.max(Math.abs(t),Math.abs(t-n))/Math.max(Math.abs(e),Math.abs(e-r)),u=pr(r,n,e,t,!1),a=u[0],c=u[1];s=Fr(a-e,(c-t)/i),o=i*s}}return Array.isArray(A.size)&&(s=qt(A.size[0],r),o=2===A.size.length?qt(A.size[1],n):s),[s,o]},Nr=function(A){var e=nr(180),t=[];return xt(A).forEach(function(A,r){if(0===r){var n=A[0];if(n.type===h.IDENT_TOKEN&&"to"===n.value)return void(e=rr(A));if(tr(n))return void(e=er.parse(n))}var s=Ur(A);t.push(s)}),{angle:e,stops:t,type:hr.LINEAR_GRADIENT}},Kr=function(A){var e=nr(180),t=[];return xt(A).forEach(function(A,r){if(0===r){var n=A[0];if(n.type===h.IDENT_TOKEN&&["top","left","right","bottom"].indexOf(n.value)!==-1)return void(e=rr(A));if(tr(n))return void(e=(er.parse(n)+nr(270))%nr(360))}var s=Ur(A);t.push(s)}),{angle:e,stops:t,type:hr.LINEAR_GRADIENT}},mr=function(A){var e=123;if(A.createRange){var t=A.createRange();if(t.getBoundingClientRect){var r=A.createElement("boundtest");r.style.height=e+"px",r.style.display="block",A.body.appendChild(r),t.selectNode(r);var n=t.getBoundingClientRect(),s=Math.round(n.height);if(A.body.removeChild(r),s===e)return!0}}return!1},br=function(){return"undefined"!=typeof(new Image).crossOrigin},vr=function(){return"string"==typeof(new XMLHttpRequest).responseType},Ir=function(A){var e=new Image,t=A.createElement("canvas"),r=t.getContext("2d");if(!r)return!1;e.src="data:image/svg+xml,";try{r.drawImage(e,0,0),t.toDataURL()}catch(n){return!1}return!0},Tr=function(A){return 0===A[0]&&255===A[1]&&0===A[2]&&255===A[3]},Rr=function(A){var e=A.createElement("canvas"),t=100;e.width=t,e.height=t;var r=e.getContext("2d");if(!r)return Promise.reject(!1);r.fillStyle="rgb(0, 255, 0)",r.fillRect(0,0,t,t);var n=new Image,s=e.toDataURL();n.src=s;var o=yr(t,t,0,0,n);return r.fillStyle="red",r.fillRect(0,0,t,t),Lr(o).then(function(e){r.drawImage(e,0,0);var n=r.getImageData(0,0,t,t).data;r.fillStyle="red",r.fillRect(0,0,t,t);var o=A.createElement("div");return o.style.backgroundImage="url("+s+")",o.style.height=t+"px",Tr(n)?Lr(yr(t,t,0,0,o)):Promise.reject(!1)}).then(function(A){return r.drawImage(A,0,0),Tr(r.getImageData(0,0,t,t).data)})["catch"](function(){return!1})},yr=function(A,e,t,r,n){var s="http://www.w3.org/2000/svg",o=document.createElementNS(s,"svg"),i=document.createElementNS(s,"foreignObject");return o.setAttributeNS(null,"width",A.toString()),o.setAttributeNS(null,"height",e.toString()),i.setAttributeNS(null,"width","100%"),i.setAttributeNS(null,"height","100%"),i.setAttributeNS(null,"x",t.toString()),i.setAttributeNS(null,"y",r.toString()),i.setAttributeNS(null,"externalResourcesRequired","true"),o.appendChild(i),i.appendChild(n),o},Lr=function(A){return new Promise(function(e,t){var r=new Image;r.onload=function(){return e(r)},r.onerror=t,r.src="data:image/svg+xml;charset=utf-8,"+encodeURIComponent((new XMLSerializer).serializeToString(A))})},Or={get SUPPORT_RANGE_BOUNDS(){var A=mr(document);return Object.defineProperty(Or,"SUPPORT_RANGE_BOUNDS",{value:A}),A},get SUPPORT_SVG_DRAWING(){var A=Ir(document);return Object.defineProperty(Or,"SUPPORT_SVG_DRAWING",{value:A}),A},get SUPPORT_FOREIGNOBJECT_DRAWING(){var A="function"==typeof Array.from&&"function"==typeof window.fetch?Rr(document):Promise.resolve(!1);return Object.defineProperty(Or,"SUPPORT_FOREIGNOBJECT_DRAWING",{value:A}),A},get SUPPORT_CORS_IMAGES(){var A=br();return Object.defineProperty(Or,"SUPPORT_CORS_IMAGES",{value:A}),A},get SUPPORT_RESPONSE_TYPE(){var A=vr();return Object.defineProperty(Or,"SUPPORT_RESPONSE_TYPE",{value:A}),A},get SUPPORT_CORS_XHR(){var A="withCredentials"in new XMLHttpRequest;return Object.defineProperty(Or,"SUPPORT_CORS_XHR",{value:A}),A}},Sr=function(){function A(A){var e=A.id,t=A.enabled;this.id=e,this.enabled=t,this.start=Date.now()}return A.prototype.debug=function(){for(var A=[],e=0;e0&&setTimeout(function(){return e("Timed out ("+o._options.imageTimeout+"ms) loading image")},o._options.imageTimeout)})];case 3:return[2,t.sent()]}})})},A.prototype.has=function(A){return"undefined"!=typeof this._cache[A]},A.prototype.keys=function(){return Promise.resolve(Object.keys(this._cache))},A.prototype.proxy=function(A){var e=this,t=this._options.proxy;if(!t)throw new Error("No proxy defined");var r=A.substring(0,256);return new Promise(function(n,s){var o=Or.SUPPORT_RESPONSE_TYPE?"blob":"text",i=new XMLHttpRequest;if(i.onload=function(){if(200===i.status)if("text"===o)n(i.response);else{var A=new FileReader;A.addEventListener("load",function(){return n(A.result)},!1),A.addEventListener("error",function(A){return s(A)},!1),A.readAsDataURL(i.response)}else s("Failed to proxy resource "+r+" with status code "+i.status)},i.onerror=s,i.open("GET",t+"?url="+encodeURIComponent(A)+"&responseType="+o),"text"!==o&&i instanceof XMLHttpRequest&&(i.responseType=o),e._options.imageTimeout){var B=e._options.imageTimeout;i.timeout=B,i.ontimeout=function(){return s("Timed out ("+B+"ms) proxying "+r)}}i.send()})},A}(),_r=/^data:image\/svg\+xml/i,kr=/^data:image\/.*;base64,/i,xr=/^data:image\/.*/i,Pr=function(A){return Or.SUPPORT_SVG_DRAWING||!Jr(A)},zr=function(A){return xr.test(A)},Vr=function(A){return kr.test(A)},Xr=function(A){return"blob"===A.substr(0,4)},Jr=function(A){return"svg"===A.substr(-3).toLowerCase()||_r.test(A)},Gr=function(A){var e=nr(180),t=[],r=hr.LINEAR_GRADIENT,n=nn.CIRCLE,s=Bn.FARTHEST_CORNER,o=[];return xt(A).forEach(function(A,e){var n=A[0];if(0===e){if(St(n)&&"linear"===n.value)return void(r=hr.LINEAR_GRADIENT);if(St(n)&&"radial"===n.value)return void(r=hr.RADIAL_GRADIENT)}if(n.type===h.FUNCTION)if("from"===n.name){var s=sr.parse(n.values[0]);t.push({stop:Jt,color:s})}else if("to"===n.name){var s=sr.parse(n.values[0]);t.push({stop:Wt,color:s})}else if("color-stop"===n.name){var o=n.values.filter(kt);if(2===o.length){var s=sr.parse(o[1]),i=o[0];Ot(i)&&t.push({stop:{type:h.PERCENTAGE_TOKEN,number:100*i.number,flags:i.flags},color:s})}}}),r===hr.LINEAR_GRADIENT?{angle:(e+nr(180))%nr(360),stops:t,type:r}:{size:s,shape:n,stops:t,position:o,type:r}},Wr="closest-side",Yr="farthest-side",qr="closest-corner",jr="farthest-corner",Zr="circle",$r="ellipse",An="cover",en="contain",tn=function(A){var e=nn.CIRCLE,t=Bn.FARTHEST_CORNER,r=[],n=[];return xt(A).forEach(function(A,s){var o=!0;if(0===s){var i=!1;o=A.reduce(function(A,r){if(i)if(St(r))switch(r.value){case"center":return n.push(Gt),A;case"top":case"left":return n.push(Jt),A;case"right":case"bottom":return n.push(Wt),A}else(Vt(r)||zt(r))&&n.push(r);else if(St(r))switch(r.value){case Zr:return e=nn.CIRCLE,!1;case $r:return e=nn.ELLIPSE,!1;case"at":return i=!0,!1;case Wr:return t=Bn.CLOSEST_SIDE,!1;case An:case Yr:return t=Bn.FARTHEST_SIDE,!1;case en:case qr:return t=Bn.CLOSEST_CORNER,!1;case jr:return t=Bn.FARTHEST_CORNER,!1}else if(zt(r)||Vt(r))return Array.isArray(t)||(t=[]),t.push(r),!1;return A},o)}if(o){var B=Ur(A);r.push(B)}}),{size:t,shape:e,stops:r,position:n,type:hr.RADIAL_GRADIENT}},rn=function(A){var e=nn.CIRCLE,t=Bn.FARTHEST_CORNER,r=[],n=[];return xt(A).forEach(function(A,s){var o=!0;if(0===s?o=A.reduce(function(A,e){if(St(e))switch(e.value){case"center":return n.push(Gt),!1;case"top":case"left":return n.push(Jt),!1;case"right":case"bottom":return n.push(Wt),!1}else if(Vt(e)||zt(e))return n.push(e),!1;return A},o):1===s&&(o=A.reduce(function(A,r){if(St(r))switch(r.value){case Zr:return e=nn.CIRCLE,!1;case $r:return e=nn.ELLIPSE,!1;case en:case Wr:return t=Bn.CLOSEST_SIDE,!1;case Yr:return t=Bn.FARTHEST_SIDE,!1;case qr:return t=Bn.CLOSEST_CORNER,!1;case An:case jr:return t=Bn.FARTHEST_CORNER,!1}else if(zt(r)||Vt(r))return Array.isArray(t)||(t=[]),t.push(r),!1;return A},o)),o){var i=Ur(A);r.push(i)}}),{size:t,shape:e,stops:r,position:n,type:hr.RADIAL_GRADIENT}};!function(A){A[A.URL=0]="URL",A[A.LINEAR_GRADIENT=1]="LINEAR_GRADIENT",A[A.RADIAL_GRADIENT=2]="RADIAL_GRADIENT"}(hr||(hr={}));var nn,sn=function(A){return A.type===hr.LINEAR_GRADIENT},on=function(A){return A.type===hr.RADIAL_GRADIENT};!function(A){A[A.CIRCLE=0]="CIRCLE",A[A.ELLIPSE=1]="ELLIPSE"}(nn||(nn={}));var Bn;!function(A){A[A.CLOSEST_SIDE=0]="CLOSEST_SIDE",A[A.FARTHEST_SIDE=1]="FARTHEST_SIDE",A[A.CLOSEST_CORNER=2]="CLOSEST_CORNER",A[A.FARTHEST_CORNER=3]="FARTHEST_CORNER"}(Bn||(Bn={}));var an,cn={name:"image",parse:function(A){if(A.type===h.URL_TOKEN){var e={url:A.value,type:hr.URL};return Dr.getInstance().addImage(A.value),e}if(A.type===h.FUNCTION){var t=un[A.name];if("undefined"==typeof t)throw new Error('Attempting to parse an unsupported image function "'+A.name+'"');return t(A.values)}throw new Error("Unsupported image type")}},un={"linear-gradient":Nr,"-moz-linear-gradient":Kr,"-ms-linear-gradient":Kr,"-o-linear-gradient":Kr,"-webkit-linear-gradient":Kr,"radial-gradient":tn,"-moz-radial-gradient":rn,"-ms-radial-gradient":rn,"-o-radial-gradient":rn,"-webkit-radial-gradient":rn,"-webkit-gradient":Gr},Qn={name:"background-image",initialValue:"none",type:JA.LIST,prefix:!1,parse:function(A){if(0===A.length)return[];var e=A[0];return e.type===h.IDENT_TOKEN&&"none"===e.value?[]:A.filter(function(A){return kt(A)&&n(A)}).map(cn.parse)}},ln={name:"background-origin",initialValue:"border-box",prefix:!1,type:JA.LIST,parse:function(A){return A.map(function(A){if(St(A))switch(A.value){case"padding-box":return 1;case"content-box":return 2}return 0})}},wn={name:"background-position",initialValue:"0% 0%",type:JA.LIST,prefix:!1,parse:function(A){return xt(A).map(function(A){return A.filter(Vt)}).map(Xt)}};!function(A){A[A.REPEAT=0]="REPEAT",A[A.NO_REPEAT=1]="NO_REPEAT",A[A.REPEAT_X=2]="REPEAT_X",A[A.REPEAT_Y=3]="REPEAT_Y"}(an||(an={}));var hn,gn={name:"background-repeat",initialValue:"repeat",prefix:!1,type:JA.LIST,parse:function(A){return xt(A).map(function(A){return A.filter(St).map(function(A){return A.value}).join(" ")}).map(dn)}},dn=function(A){switch(A){case"no-repeat":return an.NO_REPEAT;case"repeat-x":case"repeat no-repeat":return an.REPEAT_X;case"repeat-y":case"no-repeat repeat":return an.REPEAT_Y;case"repeat":default:return an.REPEAT}};!function(A){A.AUTO="auto",A.CONTAIN="contain",A.COVER="cover"}(hn||(hn={}));var Un,Cn={name:"background-size",initialValue:"0",prefix:!1,type:JA.LIST,parse:function(A){return xt(A).map(function(A){return A.filter(fn)})}},fn=function(A){return St(A)||Vt(A)},En=function(A){return{name:"border-"+A+"-color",initialValue:"transparent",prefix:!1,type:JA.TYPE_VALUE,format:"color"}},Fn=En("top"),pn=En("right"),Hn=En("bottom"),Nn=En("left"),Kn=function(A){return{name:"border-radius-"+A,initialValue:"0 0",prefix:!1,type:JA.LIST,parse:function(A){return Xt(A.filter(Vt))}}},mn=Kn("top-left"),bn=Kn("top-right"),vn=Kn("bottom-right"),In=Kn("bottom-left");!function(A){A[A.NONE=0]="NONE",A[A.SOLID=1]="SOLID"}(Un||(Un={}));var Tn,Rn=function(A){return{name:"border-"+A+"-style",initialValue:"solid",prefix:!1,type:JA.IDENT_VALUE,parse:function(A){switch(A){case"none":return Un.NONE}return Un.SOLID}}},yn=Rn("top"),Ln=Rn("right"),On=Rn("bottom"),Sn=Rn("left"),Dn=function(A){return{name:"border-"+A+"-width",initialValue:"0",type:JA.VALUE,prefix:!1,parse:function(A){return Lt(A)?A.number:0}}},Mn=Dn("top"),_n=Dn("right"),kn=Dn("bottom"),xn=Dn("left"),Pn={name:"color",initialValue:"transparent",prefix:!1,type:JA.TYPE_VALUE,format:"color"},zn={name:"display",initialValue:"inline-block",prefix:!1,type:JA.LIST,parse:function(A){return A.filter(St).reduce(function(A,e){return A|Vn(e.value)},0)}},Vn=function(A){switch(A){case"block":return 2;case"inline":return 4;case"run-in":return 8;case"flow":return 16;case"flow-root":return 32;case"table":return 64;case"flex":case"-webkit-flex":return 128;case"grid":case"-ms-grid":return 256;case"ruby":return 512;case"subgrid":return 1024;case"list-item":return 2048;case"table-row-group":return 4096;case"table-header-group":return 8192;case"table-footer-group":return 16384;case"table-row":return 32768;case"table-cell":return 65536;case"table-column-group":return 131072;case"table-column":return 262144;case"table-caption":return 524288;case"ruby-base":return 1048576;case"ruby-text":return 2097152;case"ruby-base-container":return 4194304;case"ruby-text-container":return 8388608;case"contents":return 16777216;case"inline-block":return 33554432;case"inline-list-item":return 67108864;case"inline-table":return 134217728;case"inline-flex":return 268435456;case"inline-grid":return 536870912}return 0};!function(A){A[A.NONE=0]="NONE",A[A.LEFT=1]="LEFT",A[A.RIGHT=2]="RIGHT",A[A.INLINE_START=3]="INLINE_START",A[A.INLINE_END=4]="INLINE_END"}(Tn||(Tn={}));var Xn,Jn={name:"float",initialValue:"none",prefix:!1,type:JA.IDENT_VALUE,parse:function(A){switch(A){case"left":return Tn.LEFT;case"right":return Tn.RIGHT;case"inline-start":return Tn.INLINE_START;case"inline-end":return Tn.INLINE_END}return Tn.NONE}},Gn={name:"letter-spacing",initialValue:"0",prefix:!1,type:JA.VALUE,parse:function(A){return A.type===h.IDENT_TOKEN&&"normal"===A.value?0:A.type===h.NUMBER_TOKEN?A.number:A.type===h.DIMENSION_TOKEN?A.number:0}};!function(A){A.NORMAL="normal",A.STRICT="strict"}(Xn||(Xn={}));var Wn,Yn={name:"line-break",initialValue:"normal",prefix:!1,type:JA.IDENT_VALUE,parse:function(A){switch(A){case"strict":return Xn.STRICT;case"normal":default:return Xn.NORMAL}}},qn={name:"line-height",initialValue:"normal",prefix:!1,type:JA.TOKEN_VALUE},jn=function(A,e){return St(A)&&"normal"===A.value?1.2*e:A.type===h.NUMBER_TOKEN?e*A.number:Vt(A)?qt(A,e):e},Zn={name:"list-style-image",initialValue:"none",type:JA.VALUE,prefix:!1,parse:function(A){return A.type===h.IDENT_TOKEN&&"none"===A.value?null:cn.parse(A)}};!function(A){A[A.INSIDE=0]="INSIDE",A[A.OUTSIDE=1]="OUTSIDE"}(Wn||(Wn={}));var $n,As={name:"list-style-position",initialValue:"outside",prefix:!1,type:JA.IDENT_VALUE,parse:function(A){switch(A){case"inside":return Wn.INSIDE;case"outside":default:return Wn.OUTSIDE}}};!function(A){A[A.NONE=-1]="NONE",A[A.DISC=0]="DISC",A[A.CIRCLE=1]="CIRCLE",A[A.SQUARE=2]="SQUARE",A[A.DECIMAL=3]="DECIMAL",A[A.CJK_DECIMAL=4]="CJK_DECIMAL",A[A.DECIMAL_LEADING_ZERO=5]="DECIMAL_LEADING_ZERO",A[A.LOWER_ROMAN=6]="LOWER_ROMAN",A[A.UPPER_ROMAN=7]="UPPER_ROMAN",A[A.LOWER_GREEK=8]="LOWER_GREEK",A[A.LOWER_ALPHA=9]="LOWER_ALPHA",A[A.UPPER_ALPHA=10]="UPPER_ALPHA",A[A.ARABIC_INDIC=11]="ARABIC_INDIC",A[A.ARMENIAN=12]="ARMENIAN",A[A.BENGALI=13]="BENGALI",A[A.CAMBODIAN=14]="CAMBODIAN",A[A.CJK_EARTHLY_BRANCH=15]="CJK_EARTHLY_BRANCH",A[A.CJK_HEAVENLY_STEM=16]="CJK_HEAVENLY_STEM",A[A.CJK_IDEOGRAPHIC=17]="CJK_IDEOGRAPHIC",A[A.DEVANAGARI=18]="DEVANAGARI",A[A.ETHIOPIC_NUMERIC=19]="ETHIOPIC_NUMERIC",A[A.GEORGIAN=20]="GEORGIAN",A[A.GUJARATI=21]="GUJARATI",A[A.GURMUKHI=22]="GURMUKHI",A[A.HEBREW=22]="HEBREW",A[A.HIRAGANA=23]="HIRAGANA",A[A.HIRAGANA_IROHA=24]="HIRAGANA_IROHA",A[A.JAPANESE_FORMAL=25]="JAPANESE_FORMAL",A[A.JAPANESE_INFORMAL=26]="JAPANESE_INFORMAL",A[A.KANNADA=27]="KANNADA",A[A.KATAKANA=28]="KATAKANA",A[A.KATAKANA_IROHA=29]="KATAKANA_IROHA",A[A.KHMER=30]="KHMER",A[A.KOREAN_HANGUL_FORMAL=31]="KOREAN_HANGUL_FORMAL",A[A.KOREAN_HANJA_FORMAL=32]="KOREAN_HANJA_FORMAL",A[A.KOREAN_HANJA_INFORMAL=33]="KOREAN_HANJA_INFORMAL",A[A.LAO=34]="LAO",A[A.LOWER_ARMENIAN=35]="LOWER_ARMENIAN",A[A.MALAYALAM=36]="MALAYALAM",A[A.MONGOLIAN=37]="MONGOLIAN",A[A.MYANMAR=38]="MYANMAR",A[A.ORIYA=39]="ORIYA",A[A.PERSIAN=40]="PERSIAN",A[A.SIMP_CHINESE_FORMAL=41]="SIMP_CHINESE_FORMAL",A[A.SIMP_CHINESE_INFORMAL=42]="SIMP_CHINESE_INFORMAL",A[A.TAMIL=43]="TAMIL",A[A.TELUGU=44]="TELUGU",A[A.THAI=45]="THAI",A[A.TIBETAN=46]="TIBETAN",A[A.TRAD_CHINESE_FORMAL=47]="TRAD_CHINESE_FORMAL",A[A.TRAD_CHINESE_INFORMAL=48]="TRAD_CHINESE_INFORMAL",A[A.UPPER_ARMENIAN=49]="UPPER_ARMENIAN",A[A.DISCLOSURE_OPEN=50]="DISCLOSURE_OPEN",A[A.DISCLOSURE_CLOSED=51]="DISCLOSURE_CLOSED"}($n||($n={}));var es,ts={name:"list-style-type",initialValue:"none",prefix:!1,type:JA.IDENT_VALUE,parse:function(A){switch(A){case"disc":return $n.DISC;case"circle":return $n.CIRCLE;case"square":return $n.SQUARE;case"decimal":return $n.DECIMAL;case"cjk-decimal":return $n.CJK_DECIMAL;case"decimal-leading-zero":return $n.DECIMAL_LEADING_ZERO;case"lower-roman":return $n.LOWER_ROMAN;case"upper-roman":return $n.UPPER_ROMAN;case"lower-greek":return $n.LOWER_GREEK;case"lower-alpha":return $n.LOWER_ALPHA;case"upper-alpha":return $n.UPPER_ALPHA;case"arabic-indic":return $n.ARABIC_INDIC;case"armenian":return $n.ARMENIAN;case"bengali":return $n.BENGALI;case"cambodian":return $n.CAMBODIAN;case"cjk-earthly-branch":return $n.CJK_EARTHLY_BRANCH;case"cjk-heavenly-stem":return $n.CJK_HEAVENLY_STEM;case"cjk-ideographic":return $n.CJK_IDEOGRAPHIC;case"devanagari":return $n.DEVANAGARI;case"ethiopic-numeric":return $n.ETHIOPIC_NUMERIC;case"georgian":return $n.GEORGIAN;case"gujarati":return $n.GUJARATI;case"gurmukhi":return $n.GURMUKHI;case"hebrew":return $n.HEBREW;case"hiragana":return $n.HIRAGANA;case"hiragana-iroha":return $n.HIRAGANA_IROHA;case"japanese-formal":return $n.JAPANESE_FORMAL;case"japanese-informal":return $n.JAPANESE_INFORMAL;case"kannada":return $n.KANNADA;case"katakana":return $n.KATAKANA;case"katakana-iroha":return $n.KATAKANA_IROHA;case"khmer":return $n.KHMER;case"korean-hangul-formal":return $n.KOREAN_HANGUL_FORMAL;case"korean-hanja-formal":return $n.KOREAN_HANJA_FORMAL;case"korean-hanja-informal":return $n.KOREAN_HANJA_INFORMAL;case"lao":return $n.LAO;case"lower-armenian":return $n.LOWER_ARMENIAN;case"malayalam":return $n.MALAYALAM;case"mongolian":return $n.MONGOLIAN;case"myanmar":return $n.MYANMAR;case"oriya":return $n.ORIYA;case"persian":return $n.PERSIAN;case"simp-chinese-formal":return $n.SIMP_CHINESE_FORMAL;case"simp-chinese-informal":return $n.SIMP_CHINESE_INFORMAL;case"tamil":return $n.TAMIL;case"telugu":return $n.TELUGU;case"thai":return $n.THAI;case"tibetan":return $n.TIBETAN;case"trad-chinese-formal":return $n.TRAD_CHINESE_FORMAL;case"trad-chinese-informal":return $n.TRAD_CHINESE_INFORMAL;case"upper-armenian":return $n.UPPER_ARMENIAN;case"disclosure-open":return $n.DISCLOSURE_OPEN;case"disclosure-closed":return $n.DISCLOSURE_CLOSED;case"none":default:return $n.NONE}}},rs=function(A){return{name:"margin-"+A,initialValue:"0",prefix:!1,type:JA.TOKEN_VALUE}},ns=rs("top"),ss=rs("right"),os=rs("bottom"),is=rs("left");!function(A){A[A.VISIBLE=0]="VISIBLE",A[A.HIDDEN=1]="HIDDEN",A[A.SCROLL=2]="SCROLL",A[A.AUTO=3]="AUTO"}(es||(es={}));var Bs,as={name:"overflow",initialValue:"visible",prefix:!1,type:JA.LIST,parse:function(A){return A.filter(St).map(function(A){switch(A.value){case"hidden":return es.HIDDEN;case"scroll":return es.SCROLL;case"auto":return es.AUTO;case"visible":default:return es.VISIBLE}})}};!function(A){A.NORMAL="normal",A.BREAK_WORD="break-word"}(Bs||(Bs={}));var cs,us={name:"overflow-wrap",initialValue:"normal",prefix:!1,type:JA.IDENT_VALUE,parse:function(A){switch(A){case"break-word":return Bs.BREAK_WORD;case"normal":default:return Bs.NORMAL}}},Qs=function(A){return{name:"padding-"+A,initialValue:"0",prefix:!1,type:JA.TYPE_VALUE,format:"length-percentage"}},ls=Qs("top"),ws=Qs("right"),hs=Qs("bottom"),gs=Qs("left");!function(A){A[A.LEFT=0]="LEFT",A[A.CENTER=1]="CENTER",A[A.RIGHT=2]="RIGHT"}(cs||(cs={}));var ds,Us={name:"text-align",initialValue:"left",prefix:!1,type:JA.IDENT_VALUE,parse:function(A){switch(A){case"right":return cs.RIGHT;case"center":case"justify":return cs.CENTER;case"left":default:return cs.LEFT}}};!function(A){A[A.STATIC=0]="STATIC",A[A.RELATIVE=1]="RELATIVE",A[A.ABSOLUTE=2]="ABSOLUTE",A[A.FIXED=3]="FIXED",A[A.STICKY=4]="STICKY"}(ds||(ds={}));var Cs,fs={name:"position",initialValue:"static",prefix:!1,type:JA.IDENT_VALUE,parse:function(A){switch(A){case"relative":return ds.RELATIVE;case"absolute":return ds.ABSOLUTE;case"fixed":return ds.FIXED;case"sticky":return ds.STICKY}return ds.STATIC}},Es={name:"text-shadow",initialValue:"none",type:JA.LIST,prefix:!1,parse:function(A){return 1===A.length&&Mt(A[0],"none")?[]:xt(A).map(function(A){for(var e={color:lr.TRANSPARENT,offsetX:Jt,offsetY:Jt,blur:Jt},t=0,r=0;r1?1:0],this.overflowWrap=eo(us,A.overflowWrap),this.paddingTop=eo(ls,A.paddingTop),this.paddingRight=eo(ws,A.paddingRight),this.paddingBottom=eo(hs,A.paddingBottom),this.paddingLeft=eo(gs,A.paddingLeft),this.position=eo(fs,A.position),this.textAlign=eo(Us,A.textAlign),this.textDecorationColor=eo(Ds,A.textDecorationColor||A.color),this.textDecorationLine=eo(Ms,A.textDecorationLine),this.textShadow=eo(Es,A.textShadow),this.textTransform=eo(ps,A.textTransform),this.transform=eo(Hs,A.transform),this.transformOrigin=eo(Is,A.transformOrigin),this.visibility=eo(Rs,A.visibility),this.wordBreak=eo(Ls,A.wordBreak),this.zIndex=eo(Os,A.zIndex)}return A.prototype.isVisible=function(){return this.display>0&&this.opacity>0&&this.visibility===Fs.VISIBLE},A.prototype.isTransparent=function(){return or(this.backgroundColor)},A.prototype.isTransformed=function(){return null!==this.transform},A.prototype.isPositioned=function(){return this.position!==ds.STATIC},A.prototype.isPositionedWithZIndex=function(){return this.isPositioned()&&!this.zIndex.auto},A.prototype.isFloating=function(){return this["float"]!==Tn.NONE},A.prototype.isInlineLevel=function(){return Xs(this.display,4)||Xs(this.display,33554432)||Xs(this.display,268435456)||Xs(this.display,536870912)||Xs(this.display,67108864)||Xs(this.display,134217728)},A}(),$s=function(){function A(A){this.content=eo(Js,A.content),this.quotes=eo(Ys,A.quotes)}return A}(),Ao=function(){function A(A){this.counterIncrement=eo(Gs,A.counterIncrement),this.counterReset=eo(Ws,A.counterReset)}return A}(),eo=function(A,e){var t=new Rt,r=null!==e&&"undefined"!=typeof e?e.toString():A.initialValue;t.write(r);var n=new yt(t.read());switch(A.type){case JA.IDENT_VALUE:var s=n.parseComponentValue();return A.parse(St(s)?s.value:A.initialValue);case JA.VALUE:return A.parse(n.parseComponentValue());case JA.LIST:return A.parse(n.parseComponentValues());case JA.TOKEN_VALUE:return n.parseComponentValue();case JA.TYPE_VALUE:switch(A.format){case"angle":return er.parse(n.parseComponentValue());case"color":return sr.parse(n.parseComponentValue());case"image":return cn.parse(n.parseComponentValue());case"length":var o=n.parseComponentValue();return zt(o)?o:Jt;case"length-percentage":var i=n.parseComponentValue();return Vt(i)?i:Jt}}throw new Error("Attempting to parse unsupported css format type "+A.format)},to=function(){function A(A){this.styles=new Zs(window.getComputedStyle(A,null)),this.textNodes=[],this.elements=[],null!==this.styles.transform&&ko(A)&&(A.style.transform="none"),this.bounds=B(A),this.flags=0}return A}(),ro=function(){function A(A,e){this.text=A,this.bounds=e}return A}(),no=function(A,e,t){var r=io(A,e),n=[],s=0;return r.forEach(function(A){if(e.textDecorationLine.length||A.trim().length>0)if(Or.SUPPORT_RANGE_BOUNDS)n.push(new ro(A,oo(t,s,A.length)));else{var r=t.splitText(A.length);n.push(new ro(A,so(t))),t=r}else Or.SUPPORT_RANGE_BOUNDS||(t=t.splitText(A.length));s+=A.length}),n},so=function(A){var e=A.ownerDocument;if(e){var t=e.createElement("html2canvaswrapper");t.appendChild(A.cloneNode(!0));var r=A.parentNode;if(r){r.replaceChild(t,A);var n=B(t);return t.firstChild&&r.replaceChild(t.firstChild,t),n}}return new i(0,0,0,0)},oo=function(A,e,t){var r=A.ownerDocument;if(!r)throw new Error("Node has no owner document");var n=r.createRange();return n.setStart(A,e),n.setEnd(A,e+t),i.fromClientRect(n.getBoundingClientRect())},io=function(A,e){return 0!==e.letterSpacing?c(A).map(function(A){return u(A)}):Bo(A,e)},Bo=function(A,e){for(var t,r=XA(A,{lineBreak:e.lineBreak,wordBreak:e.overflowWrap===Bs.BREAK_WORD?"break-word":e.wordBreak}),n=[];!(t=r.next()).done;)t.value&&n.push(t.value.slice());return n},ao=function(){function A(A,e){this.text=co(A.data,e.textTransform),this.textBounds=no(this.text,e,A)}return A}(),co=function(A,e){switch(e){case Cs.LOWERCASE:return A.toLowerCase();case Cs.CAPITALIZE:return A.replace(uo,Qo);case Cs.UPPERCASE:return A.toUpperCase();default:return A}},uo=/(^|\s|:|-|\(|\))([a-z])/g,Qo=function(A,e,t){return A.length>0?e+t.toUpperCase():A},lo=function(e){function t(A){var t=e.call(this,A)||this;return t.src=A.currentSrc||A.src,t.intrinsicWidth=A.naturalWidth,t.intrinsicHeight=A.naturalHeight,Dr.getInstance().addImage(t.src),t}return A(t,e),t}(to),wo=function(e){function t(A){var t=e.call(this,A)||this;return t.canvas=A,t.intrinsicWidth=A.width,t.intrinsicHeight=A.height,t}return A(t,e),t}(to),ho=function(e){function t(A){var t=e.call(this,A)||this,r=new XMLSerializer;return t.svg="data:image/svg+xml,"+encodeURIComponent(r.serializeToString(A)),t.intrinsicWidth=A.width.baseVal.value,t.intrinsicHeight=A.height.baseVal.value,Dr.getInstance().addImage(t.svg),t}return A(t,e),t}(to),go=function(e){function t(A){var t=e.call(this,A)||this;return t.value=A.value,t}return A(t,e),t}(to),Uo=function(e){function t(A){var t=e.call(this,A)||this;return t.start=A.start,t.reversed="boolean"==typeof A.reversed&&A.reversed===!0,t}return A(t,e),t}(to),Co=[{type:h.DIMENSION_TOKEN,flags:0,unit:"px",number:3}],fo=[{type:h.PERCENTAGE_TOKEN,flags:0,number:50}],Eo=function(A){return A.width>A.height?new i(A.left+(A.width-A.height)/2,A.top,A.height,A.height):A.width0)e.textNodes.push(new ao(r,e.styles));else if(_o(r)){var s=Lo(r);s.styles.isVisible()&&(So(r,s,t)?s.flags|=4:Do(s.styles)&&(s.flags|=2),Ro.indexOf(r.tagName)!==-1&&(s.flags|=8),e.elements.push(s),$o(r)||Jo(r)||Ai(r)||vB(r,s,t))}},Lo=function(A){return Yo(A)?new lo(A):Wo(A)?new wo(A):Jo(A)?new ho(A):Po(A)?new go(A):zo(A)?new Uo(A):Vo(A)?new mo(A):Ai(A)?new bo(A):$o(A)?new vo(A):qo(A)?new To(A):new to(A)},Oo=function(A){var e=Lo(A);return e.flags|=4,yo(A,e,e),e},So=function(A,e,t){return e.styles.isPositionedWithZIndex()||e.styles.opacity<1||e.styles.isTransformed()||Go(A)&&t.styles.isTransparent()},Do=function(A){return A.isPositioned()||A.isFloating()},Mo=function(A){return A.nodeType===Node.TEXT_NODE},_o=function(A){return A.nodeType===Node.ELEMENT_NODE},ko=function(A){return _o(A)&&"undefined"!=typeof A.style&&!xo(A)},xo=function(A){return"object"===_typeof(A.className)},Po=function(A){return"LI"===A.tagName},zo=function(A){return"OL"===A.tagName},Vo=function(A){return"INPUT"===A.tagName},Xo=function(A){return"HTML"===A.tagName},Jo=function(A){return"svg"===A.tagName},Go=function(A){return"BODY"===A.tagName},Wo=function(A){return"CANVAS"===A.tagName},Yo=function(A){return"IMG"===A.tagName},qo=function(A){return"IFRAME"===A.tagName},jo=function(A){return"STYLE"===A.tagName},Zo=function(A){return"SCRIPT"===A.tagName},$o=function(A){return"TEXTAREA"===A.tagName},Ai=function(A){return"SELECT"===A.tagName},ei=function(){function A(){this.counters={}}return A.prototype.getCounterValue=function(A){var e=this.counters[A];return e&&e.length?e[e.length-1]:1},A.prototype.getCounterValues=function(A){var e=this.counters[A];return e?e:[]},A.prototype.pop=function(A){var e=this;A.forEach(function(A){return e.counters[A].pop()})},A.prototype.parse=function(A){var e=this,t=A.counterIncrement,r=A.counterReset,n=!0;null!==t&&t.forEach(function(A){var t=e.counters[A.counter];t&&0!==A.increment&&(n=!1,t[Math.max(0,t.length-1)]+=A.increment)});var s=[];return n&&r.forEach(function(A){var t=e.counters[A.counter];s.push(A.counter),t||(t=e.counters[A.counter]=[]),t.push(A.reset)}),s},A}(),ti={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"]},ri={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:["Ք","Փ","Ւ","Ց","Ր","Տ","Վ","Ս","Ռ","Ջ","Պ","Չ","Ո","Շ","Ն","Յ","Մ","Ճ","Ղ","Ձ","Հ","Կ","Ծ","Խ","Լ","Ի","Ժ","Թ","Ը","Է","Զ","Ե","Դ","Գ","Բ","Ա"]},ni={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:["י׳","ט׳","ח׳","ז׳","ו׳","ה׳","ד׳","ג׳","ב׳","א׳","ת","ש","ר","ק","צ","פ","ע","ס","נ","מ","ל","כ","יט","יח","יז","טז","טו","י","ט","ח","ז","ו","ה","ד","ג","ב","א"]},si={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:["ჵ","ჰ","ჯ","ჴ","ხ","ჭ","წ","ძ","ც","ჩ","შ","ყ","ღ","ქ","ფ","ჳ","ტ","ს","რ","ჟ","პ","ო","ჲ","ნ","მ","ლ","კ","ი","თ","ჱ","ზ","ვ","ე","დ","გ","ბ","ა"]},oi=function(A,e,t,r,n,s){return At?Ci(A,n,s.length>0):r.integers.reduce(function(e,t,n){for(;A>=t;)A-=t,e+=r.values[n];return e},"")+s},ii=function(A,e,t,r){var n="";do t||A--,n=r(A)+n,A/=e;while(A*e>=e);return n},Bi=function(A,e,t,r,n){var s=t-e+1;return(A<0?"-":"")+(ii(Math.abs(A),s,r,function(A){return u(Math.floor(A%s)+e)})+n)},ai=function(A,e,t){void 0===t&&(t=". ");var r=e.length;return ii(Math.abs(A),r,!1,function(A){return e[Math.floor(A%r)]})+t},ci=1,ui=2,Qi=4,li=8,wi=function(A,e,t,r,n,s){if(A<-9999||A>9999)return Ci(A,$n.CJK_DECIMAL,n.length>0);var o=Math.abs(A),i=n;if(0===o)return e[0]+i;for(var B=0;o>0&&B<=4;B++){var a=o%10;0===a&&Xs(s,ci)&&""!==i?i=e[a]+i:a>1||1===a&&0===B||1===a&&1===B&&Xs(s,ui)||1===a&&1===B&&Xs(s,Qi)&&A>100||1===a&&B>1&&Xs(s,li)?i=e[a]+(B>0?t[B-1]:"")+i:1===a&&B>0&&(i=t[B-1]+i),o=Math.floor(o/10)}return(A<0?r:"")+i},hi="十百千萬",gi="拾佰仟萬",di="マイナス",Ui="마이너스",Ci=function(A,e,t){var r=t?". ":"",n=t?"、":"",s=t?", ":"",o=t?" ":"";switch(e){case $n.DISC:return"•"+o;case $n.CIRCLE:return"◦"+o;case $n.SQUARE:return"◾"+o;case $n.DECIMAL_LEADING_ZERO:var i=Bi(A,48,57,!0,r);return i.length<4?"0"+i:i;case $n.CJK_DECIMAL:return ai(A,"〇一二三四五六七八九",n);case $n.LOWER_ROMAN:return oi(A,1,3999,ti,$n.DECIMAL,r).toLowerCase();case $n.UPPER_ROMAN:return oi(A,1,3999,ti,$n.DECIMAL,r);case $n.LOWER_GREEK:return Bi(A,945,969,!1,r);case $n.LOWER_ALPHA:return Bi(A,97,122,!1,r);case $n.UPPER_ALPHA:return Bi(A,65,90,!1,r);case $n.ARABIC_INDIC:return Bi(A,1632,1641,!0,r);case $n.ARMENIAN:case $n.UPPER_ARMENIAN:return oi(A,1,9999,ri,$n.DECIMAL,r);case $n.LOWER_ARMENIAN:return oi(A,1,9999,ri,$n.DECIMAL,r).toLowerCase();case $n.BENGALI:return Bi(A,2534,2543,!0,r);case $n.CAMBODIAN:case $n.KHMER:return Bi(A,6112,6121,!0,r);case $n.CJK_EARTHLY_BRANCH:return ai(A,"子丑寅卯辰巳午未申酉戌亥",n);case $n.CJK_HEAVENLY_STEM:return ai(A,"甲乙丙丁戊己庚辛壬癸",n);case $n.CJK_IDEOGRAPHIC:case $n.TRAD_CHINESE_INFORMAL:return wi(A,"零一二三四五六七八九",hi,"負",n,ui|Qi|li);case $n.TRAD_CHINESE_FORMAL:return wi(A,"零壹貳參肆伍陸柒捌玖",gi,"負",n,ci|ui|Qi|li);case $n.SIMP_CHINESE_INFORMAL:return wi(A,"零一二三四五六七八九",hi,"负",n,ui|Qi|li);case $n.SIMP_CHINESE_FORMAL:return wi(A,"零壹贰叁肆伍陆柒捌玖",gi,"负",n,ci|ui|Qi|li);case $n.JAPANESE_INFORMAL:return wi(A,"〇一二三四五六七八九","十百千万",di,n,0);case $n.JAPANESE_FORMAL:return wi(A,"零壱弐参四伍六七八九","拾百千万",di,n,ci|ui|Qi);case $n.KOREAN_HANGUL_FORMAL:return wi(A,"영일이삼사오육칠팔구","십백천만",Ui,s,ci|ui|Qi);case $n.KOREAN_HANJA_INFORMAL:return wi(A,"零一二三四五六七八九","十百千萬",Ui,s,0);case $n.KOREAN_HANJA_FORMAL:return wi(A,"零壹貳參四五六七八九","拾百千",Ui,s,ci|ui|Qi);case $n.DEVANAGARI:return Bi(A,2406,2415,!0,r);case $n.GEORGIAN:return oi(A,1,19999,si,$n.DECIMAL,r);case $n.GUJARATI:return Bi(A,2790,2799,!0,r);case $n.GURMUKHI:return Bi(A,2662,2671,!0,r);case $n.HEBREW:return oi(A,1,10999,ni,$n.DECIMAL,r);case $n.HIRAGANA:return ai(A,"あいうえおかきくけこさしすせそたちつてとなにぬねのはひふへほまみむめもやゆよらりるれろわゐゑをん");case $n.HIRAGANA_IROHA:return ai(A,"いろはにほへとちりぬるをわかよたれそつねならむうゐのおくやまけふこえてあさきゆめみしゑひもせす");case $n.KANNADA:return Bi(A,3302,3311,!0,r);case $n.KATAKANA:return ai(A,"アイウエオカキクケコサシスセソタチツテトナニヌネノハヒフヘホマミムメモヤユヨラリルレロワヰヱヲン",n);case $n.KATAKANA_IROHA:return ai(A,"イロハニホヘトチリヌルヲワカヨタレソツネナラムウヰノオクヤマケフコエテアサキユメミシヱヒモセス",n);case $n.LAO:return Bi(A,3792,3801,!0,r);case $n.MONGOLIAN:return Bi(A,6160,6169,!0,r);case $n.MYANMAR:return Bi(A,4160,4169,!0,r);case $n.ORIYA:return Bi(A,2918,2927,!0,r);case $n.PERSIAN:return Bi(A,1776,1785,!0,r);case $n.TAMIL:return Bi(A,3046,3055,!0,r);case $n.TELUGU:return Bi(A,3174,3183,!0,r);case $n.THAI:return Bi(A,3664,3673,!0,r);case $n.TIBETAN:return Bi(A,3872,3881,!0,r);case $n.DECIMAL:default:return Bi(A,48,57,!0,r)}},fi="data-html2canvas-ignore",Ei=function(){function A(A,e){if(this.options=e,this.scrolledElements=[],this.referenceElement=A,this.counters=new ei,this.quoteDepth=0,!A.ownerDocument)throw new Error("Cloned element does not have an owner document");this.documentElement=this.cloneNode(A.ownerDocument.documentElement)}return A.prototype.toIFrame=function(A,r){var n=this,s=pi(A,r);if(!s.contentWindow)return Promise.reject("Unable to find iframe window");var o=A.defaultView.pageXOffset,i=A.defaultView.pageYOffset,B=s.contentWindow,a=B.document,c=Hi(s).then(function(){return e(n,void 0,void 0,function(){var A;return t(this,function(e){switch(e.label){case 0:return this.scrolledElements.forEach(bi),B&&(B.scrollTo(r.left,r.top),!/(iPad|iPhone|iPod)/g.test(navigator.userAgent)||B.scrollY===r.top&&B.scrollX===r.left||(a.documentElement.style.top=-r.top+"px",a.documentElement.style.left=-r.left+"px",a.documentElement.style.position="absolute")),A=this.options.onclone,"undefined"==typeof this.clonedReferenceElement?[2,Promise.reject("Error finding the "+this.referenceElement.nodeName+" in the cloned document")]:a.fonts&&a.fonts.ready?[4,a.fonts.ready]:[3,2];case 1:e.sent(),e.label=2;case 2:return"function"==typeof A?[2,Promise.resolve().then(function(){return A(a)}).then(function(){return s})]:[2,s]}})})});return a.open(),a.write(Ki(document.doctype)+""),mi(this.referenceElement.ownerDocument,o,i),a.replaceChild(a.adoptNode(this.documentElement),a.documentElement),a.close(),c},A.prototype.createElementClone=function(A){if(Wo(A))return this.createCanvasClone(A);if(jo(A))return this.createStyleClone(A);var e=A.cloneNode(!1);return Yo(e)&&"lazy"===e.loading&&(e.loading="eager"),e},A.prototype.createStyleClone=function(A){try{var e=A.sheet;if(e&&e.cssRules){var t=[].slice.call(e.cssRules,0).reduce(function(A,e){return e&&"string"==typeof e.cssText?A+e.cssText:A},""),r=A.cloneNode(!1);return r.textContent=t,r}}catch(n){if(Sr.getInstance(this.options.id).error("Unable to access cssRules property",n),"SecurityError"!==n.name)throw n}return A.cloneNode(!1)},A.prototype.createCanvasClone=function(A){if(this.options.inlineImages&&A.ownerDocument){var e=A.ownerDocument.createElement("img");try{return e.src=A.toDataURL(),e}catch(t){Sr.getInstance(this.options.id).info("Unable to clone canvas contents, canvas is tainted")}}var r=A.cloneNode(!1);try{r.width=A.width,r.height=A.height;var n=A.getContext("2d"),s=r.getContext("2d");return s&&(n?s.putImageData(n.getImageData(0,0,A.width,A.height),0,0):s.drawImage(A,0,0)),r}catch(t){}return r},A.prototype.cloneNode=function(A){if(Mo(A))return document.createTextNode(A.data);if(!A.ownerDocument)return A.cloneNode(!1);var e=A.ownerDocument.defaultView;if(e&&_o(A)&&(ko(A)||xo(A))){var t=this.createElementClone(A),r=e.getComputedStyle(A),n=e.getComputedStyle(A,":before"),s=e.getComputedStyle(A,":after");this.referenceElement===A&&ko(t)&&(this.clonedReferenceElement=t),Go(t)&&Li(t);for(var o=this.counters.parse(new Ao(r)),i=this.resolvePseudoContent(A,t,n,zs.BEFORE),B=A.firstChild;B;B=B.nextSibling)_o(B)&&(Zo(B)||B.hasAttribute(fi)||"function"==typeof this.options.ignoreElements&&this.options.ignoreElements(B))||this.options.copyStyles&&_o(B)&&jo(B)||t.appendChild(this.cloneNode(B));i&&t.insertBefore(i,t.firstChild);var a=this.resolvePseudoContent(A,t,s,zs.AFTER);return a&&t.appendChild(a),this.counters.pop(o),r&&(this.options.copyStyles||xo(A))&&!qo(A)&&Ni(r,t),0===A.scrollTop&&0===A.scrollLeft||this.scrolledElements.push([t,A.scrollLeft,A.scrollTop]),($o(A)||Ai(A))&&($o(t)||Ai(t))&&(t.value=A.value),t}return A.cloneNode(!1)},A.prototype.resolvePseudoContent=function(A,e,t,r){var n=this;if(t){var s=t.content,o=e.ownerDocument;if(o&&s&&"none"!==s&&"-moz-alt-content"!==s&&"none"!==t.display){this.counters.parse(new Ao(t));var i=new $s(t),B=o.createElement("html2canvaspseudoelement");Ni(t,B),i.content.forEach(function(e){if(e.type===h.STRING_TOKEN)B.appendChild(o.createTextNode(e.value));else if(e.type===h.URL_TOKEN){var t=o.createElement("img");t.src=e.value,t.style.opacity="1",B.appendChild(t)}else if(e.type===h.FUNCTION){if("attr"===e.name){var r=e.values.filter(St);r.length&&B.appendChild(o.createTextNode(A.getAttribute(r[0].value)||""))}else if("counter"===e.name){var s=e.values.filter(kt),a=s[0],c=s[1];if(a&&St(a)){var u=n.counters.getCounterValue(a.value),Q=c&&St(c)?ts.parse(c.value):$n.DECIMAL;B.appendChild(o.createTextNode(Ci(u,Q,!1)))}}else if("counters"===e.name){var l=e.values.filter(kt),a=l[0],w=l[1],c=l[2];if(a&&St(a)){var g=n.counters.getCounterValues(a.value),d=c&&St(c)?ts.parse(c.value):$n.DECIMAL,U=w&&w.type===h.STRING_TOKEN?w.value:"",C=g.map(function(A){return Ci(A,d,!1)}).join(U);B.appendChild(o.createTextNode(C))}}}else if(e.type===h.IDENT_TOKEN)switch(e.value){case"open-quote":B.appendChild(o.createTextNode(qs(i.quotes,n.quoteDepth++,!0)));break;case"close-quote":B.appendChild(o.createTextNode(qs(i.quotes,--n.quoteDepth,!1)));break;default:B.appendChild(o.createTextNode(e.value))}}),B.className=Ti+" "+Ri;var a=r===zs.BEFORE?" "+Ti:" "+Ri;return xo(e)?e.className.baseValue+=a:e.className+=a,B}}},A.destroy=function(A){return!!A.parentNode&&(A.parentNode.removeChild(A),!0)},A}();!function(A){A[A.BEFORE=0]="BEFORE",A[A.AFTER=1]="AFTER"}(zs||(zs={}));var Fi,pi=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(fi,"true"),A.body.appendChild(t),t},Hi=function(A){return new Promise(function(e,t){var r=A.contentWindow;if(!r)return t("No window assigned for iframe");var n=r.document;r.onload=A.onload=n.onreadystatechange=function(){r.onload=A.onload=n.onreadystatechange=null;var t=setInterval(function(){n.body.childNodes.length>0&&"complete"===n.readyState&&(clearInterval(t),e(A))},50)}})},Ni=function(A,e){for(var t=A.length-1;t>=0;t--){var r=A.item(t);"content"!==r&&e.style.setProperty(r,A.getPropertyValue(r))}return e},Ki=function(A){var e="";return A&&(e+=""),e},mi=function(A,e,t){A&&A.defaultView&&(e!==A.defaultView.pageXOffset||t!==A.defaultView.pageYOffset)&&A.defaultView.scrollTo(e,t)},bi=function(A){var e=A[0],t=A[1],r=A[2];e.scrollLeft=t,e.scrollTop=r},vi=":before",Ii=":after",Ti="___html2canvas___pseudoelement_before",Ri="___html2canvas___pseudoelement_after",yi='{\n content: "" !important;\n display: none !important;\n}',Li=function(A){Oi(A,"."+Ti+vi+yi+"\n ."+Ri+Ii+yi)},Oi=function(A,e){var t=A.ownerDocument;if(t){var r=t.createElement("style");r.textContent=e,A.appendChild(r)}};!function(A){A[A.VECTOR=0]="VECTOR",A[A.BEZIER_CURVE=1]="BEZIER_CURVE"}(Fi||(Fi={}));var Si,Di=function(A,e){return A.length===e.length&&A.some(function(A,t){return A===e[t]})},Mi=function(A,e,t,r,n){return A.map(function(A,s){switch(s){case 0:return A.add(e,t);case 1:return A.add(e+r,t);case 2:return A.add(e+r,t+n);case 3:return A.add(e,t+n)}return A})},_i=function(){function A(A,e){this.type=Fi.VECTOR,this.x=A,this.y=e}return A.prototype.add=function(e,t){return new A(this.x+e,this.y+t)},A}(),ki=function(A,e,t){return new _i(A.x+(e.x-A.x)*t,A.y+(e.y-A.y)*t)},xi=function(){function A(A,e,t,r){this.type=Fi.BEZIER_CURVE,this.start=A,this.startControl=e,this.endControl=t,this.end=r}return A.prototype.subdivide=function(e,t){var r=ki(this.start,this.startControl,e),n=ki(this.startControl,this.endControl,e),s=ki(this.endControl,this.end,e),o=ki(r,n,e),i=ki(n,s,e),B=ki(o,i,e);return t?new A(this.start,r,o,B):new A(B,i,s,this.end)},A.prototype.add=function(e,t){return new A(this.start.add(e,t),this.startControl.add(e,t),this.endControl.add(e,t),this.end.add(e,t))},A.prototype.reverse=function(){return new A(this.end,this.endControl,this.startControl,this.start)},A}(),Pi=function(A){return A.type===Fi.BEZIER_CURVE},zi=function(){function A(A){var e=A.styles,t=A.bounds,r=Yt(e.borderTopLeftRadius,t.width,t.height),n=r[0],s=r[1],o=Yt(e.borderTopRightRadius,t.width,t.height),i=o[0],B=o[1],a=Yt(e.borderBottomRightRadius,t.width,t.height),c=a[0],u=a[1],Q=Yt(e.borderBottomLeftRadius,t.width,t.height),l=Q[0],w=Q[1],h=[];h.push((n+i)/t.width),h.push((l+c)/t.width),h.push((s+w)/t.height),h.push((B+u)/t.height);var g=Math.max.apply(Math,h);g>1&&(n/=g,s/=g,i/=g,B/=g,c/=g,u/=g,l/=g,w/=g);var d=t.width-i,U=t.height-u,C=t.width-c,f=t.height-w,E=e.borderTopWidth,F=e.borderRightWidth,p=e.borderBottomWidth,H=e.borderLeftWidth,N=qt(e.paddingTop,A.bounds.width),K=qt(e.paddingRight,A.bounds.width),m=qt(e.paddingBottom,A.bounds.width),b=qt(e.paddingLeft,A.bounds.width);this.topLeftBorderBox=n>0||s>0?Vi(t.left,t.top,n,s,Si.TOP_LEFT):new _i(t.left,t.top),this.topRightBorderBox=i>0||B>0?Vi(t.left+d,t.top,i,B,Si.TOP_RIGHT):new _i(t.left+t.width,t.top),this.bottomRightBorderBox=c>0||u>0?Vi(t.left+C,t.top+U,c,u,Si.BOTTOM_RIGHT):new _i(t.left+t.width,t.top+t.height),this.bottomLeftBorderBox=l>0||w>0?Vi(t.left,t.top+f,l,w,Si.BOTTOM_LEFT):new _i(t.left,t.top+t.height),this.topLeftPaddingBox=n>0||s>0?Vi(t.left+H,t.top+E,Math.max(0,n-H),Math.max(0,s-E),Si.TOP_LEFT):new _i(t.left+H,t.top+E),this.topRightPaddingBox=i>0||B>0?Vi(t.left+Math.min(d,t.width+H),t.top+E,d>t.width+H?0:i-H,B-E,Si.TOP_RIGHT):new _i(t.left+t.width-F,t.top+E),this.bottomRightPaddingBox=c>0||u>0?Vi(t.left+Math.min(C,t.width-H),t.top+Math.min(U,t.height+E),Math.max(0,c-F),u-p,Si.BOTTOM_RIGHT):new _i(t.left+t.width-F,t.top+t.height-p),this.bottomLeftPaddingBox=l>0||w>0?Vi(t.left+H,t.top+f,Math.max(0,l-H),w-p,Si.BOTTOM_LEFT):new _i(t.left+H,t.top+t.height-p),this.topLeftContentBox=n>0||s>0?Vi(t.left+H+b,t.top+E+N,Math.max(0,n-(H+b)),Math.max(0,s-(E+N)),Si.TOP_LEFT):new _i(t.left+H+b,t.top+E+N),this.topRightContentBox=i>0||B>0?Vi(t.left+Math.min(d,t.width+H+b),t.top+E+N,d>t.width+H+b?0:i-H+b,B-(E+N),Si.TOP_RIGHT):new _i(t.left+t.width-(F+K),t.top+E+N),this.bottomRightContentBox=c>0||u>0?Vi(t.left+Math.min(C,t.width-(H+b)),t.top+Math.min(U,t.height+E+N),Math.max(0,c-(F+K)),u-(p+m),Si.BOTTOM_RIGHT):new _i(t.left+t.width-(F+K),t.top+t.height-(p+m)),this.bottomLeftContentBox=l>0||w>0?Vi(t.left+H+b,t.top+f,Math.max(0,l-(H+b)),w-(p+m),Si.BOTTOM_LEFT):new _i(t.left+H+b,t.top+t.height-(p+m))}return A}();!function(A){A[A.TOP_LEFT=0]="TOP_LEFT",A[A.TOP_RIGHT=1]="TOP_RIGHT",A[A.BOTTOM_RIGHT=2]="BOTTOM_RIGHT",A[A.BOTTOM_LEFT=3]="BOTTOM_LEFT"}(Si||(Si={}));var Vi=function(A,e,t,r,n){var s=4*((Math.sqrt(2)-1)/3),o=t*s,i=r*s,B=A+t,a=e+r;switch(n){case Si.TOP_LEFT:return new xi(new _i(A,a),new _i(A,a-i),new _i(B-o,e),new _i(B,e));case Si.TOP_RIGHT:return new xi(new _i(A,e),new _i(A+o,e),new _i(B,a-i),new _i(B,a));case Si.BOTTOM_RIGHT:return new xi(new _i(B,e),new _i(B,e+i),new _i(A+o,a),new _i(A,a));case Si.BOTTOM_LEFT:default:return new xi(new _i(B,a),new _i(B-o,a),new _i(A,e+i),new _i(A,e))}},Xi=function(A){return[A.topLeftBorderBox,A.topRightBorderBox,A.bottomRightBorderBox,A.bottomLeftBorderBox]},Ji=function(A){return[A.topLeftContentBox,A.topRightContentBox,A.bottomRightContentBox,A.bottomLeftContentBox]},Gi=function(A){return[A.topLeftPaddingBox,A.topRightPaddingBox,A.bottomRightPaddingBox,A.bottomLeftPaddingBox]},Wi=function(){function A(A,e,t){this.type=0,this.offsetX=A,this.offsetY=e,this.matrix=t,this.target=6}return A}(),Yi=function(){function A(A,e){this.type=1,this.target=e,this.path=A}return A}(),qi=function(A){return 0===A.type},ji=function(A){return 1===A.type},Zi=function(){function A(A){this.element=A,this.inlineLevel=[],this.nonInlineLevel=[],this.negativeZIndex=[],this.zeroOrAutoZIndexOrTransformedOrOpacity=[],this.positiveZIndex=[],this.nonPositionedFloats=[],this.nonPositionedInlineLevel=[]}return A}(),$i=function(){function A(A,e){if(this.container=A,this.effects=e.slice(0),this.curves=new zi(A),null!==A.styles.transform){var t=A.bounds.left+A.styles.transformOrigin[0].number,r=A.bounds.top+A.styles.transformOrigin[1].number,n=A.styles.transform;this.effects.push(new Wi(t,r,n))}if(A.styles.overflowX!==es.VISIBLE){var s=Xi(this.curves),o=Gi(this.curves);Di(s,o)?this.effects.push(new Yi(s,6)):(this.effects.push(new Yi(s,2)),this.effects.push(new Yi(o,4)))}}return A.prototype.getParentEffects=function(){var A=this.effects.slice(0);if(this.container.styles.overflowX!==es.VISIBLE){var e=Xi(this.curves),t=Gi(this.curves);Di(e,t)||A.push(new Yi(t,6))}return A},A}(),AB=function IB(A,e,t,r){A.container.elements.forEach(function(n){var s=Xs(n.flags,4),o=Xs(n.flags,2),i=new $i(n,A.getParentEffects());Xs(n.styles.display,2048)&&r.push(i);var B=Xs(n.flags,8)?[]:r;if(s||o){var a=s||n.styles.isPositioned()?t:e,c=new Zi(i);if(n.styles.isPositioned()||n.styles.opacity<1||n.styles.isTransformed()){var u=n.styles.zIndex.order;if(u<0){var Q=0;a.negativeZIndex.some(function(A,e){return u>A.element.container.styles.zIndex.order?(Q=e,!1):Q>0}),a.negativeZIndex.splice(Q,0,c)}else if(u>0){var l=0;a.positiveZIndex.some(function(A,e){return u>=A.element.container.styles.zIndex.order?(l=e+1,!1):l>0}),a.positiveZIndex.splice(l,0,c)}else a.zeroOrAutoZIndexOrTransformedOrOpacity.push(c)}else n.styles.isFloating()?a.nonPositionedFloats.push(c):a.nonPositionedInlineLevel.push(c);IB(i,c,s?c:t,B)}else n.styles.isInlineLevel()?e.inlineLevel.push(i):e.nonInlineLevel.push(i),IB(i,e,t,B);Xs(n.flags,8)&&eB(n,B)})},eB=function(A,e){for(var t=A instanceof Uo?A.start:1,r=A instanceof Uo&&A.reversed,n=0;n0&&A.intrinsicHeight>0){var r=oB(A),n=Gi(e);this.path(n),this.ctx.save(),this.ctx.clip(),this.ctx.drawImage(t,0,0,A.intrinsicWidth,A.intrinsicHeight,r.left,r.top,r.width,r.height),this.ctx.restore()}},A.prototype.renderNodeContent=function(r){return e(this,void 0,void 0,function(){var e,n,s,o,B,a,c,u,c,Q,l,w,h,g,d,U,C,c,f,E,g;return t(this,function(t){switch(t.label){case 0:this.applyEffects(r.effects,4),e=r.container,n=r.curves,s=e.styles,o=0,B=e.textNodes,t.label=1;case 1:return o0&&l>0&&(w=n.ctx.createPattern(F,"repeat"),n.renderRepeat(a,w,c,u))):on(r)&&(N=aB(A,e,[null,null,null]),a=N[0],K=N[1],m=N[2],Q=N[3],l=N[4],b=0===r.position.length?[Gt]:r.position,c=qt(b[0],Q),u=qt(b[b.length-1],l),v=Hr(r,c,u,Q,l),I=v[0],T=v[1],I>0&&I>0&&(R=n.ctx.createRadialGradient(K+c,m+u,0,K+c,m+u,I),Cr(r.stops,2*I).forEach(function(A){return R.addColorStop(A.stop,ir(A.color))}),n.path(a),n.ctx.fillStyle=R,I!==T?(y=A.bounds.left+.5*A.bounds.width,L=A.bounds.top+.5*A.bounds.height,O=T/I,S=1/O,n.ctx.save(),n.ctx.translate(y,L),n.ctx.transform(1,0,0,O,0,0),n.ctx.translate(-y,-L),n.ctx.fillRect(K,S*(m-L)+L,Q,l*S),n.ctx.restore()):n.ctx.fill())),t.label=6;case 6:return e--,[2]}})},n=this,s=0,o=A.styles.backgroundImage.slice(0).reverse(),B.label=1;case 1:return s",{"class":"feedback-spinner"}))},u=function(){e(".feedback-spinner").remove()};e.feedback=function(A){function s(){R=!1,e(document).off("mouseenter mouseleave",".feedback-helper"),e(document).off("mouseup keyup"),e(document).off("mousedown",".feedback-setblackout"),e(document).off("mousedown",".feedback-sethighlight"),e(document).off("mousedown click","#feedback-close"),e(document).off("mousedown","#feedback-canvas"),e(document).off("click","#feedback-highlighter-next"),e(document).off("click","#feedback-highlighter-back"),e(document).off("click","#feedback-welcome-next"),e(document).off("click","#feedback-overview-back"),e(document).off("mouseleave","body"),e(document).off("mouseenter",".feedback-helper"),e(document).off("selectstart dragstart",document),e("#feedback-module").off("click",".feedback-wizard-close,.feedback-close-btn"),e(document).off("click","#feedback-submit"),h.highlightElement&&(e(document).off("click","#feedback-canvas"),e(document).off("mousemove","#feedback-canvas")),e('[data-highlighted="true"]').removeAttr("data-highlight-id").removeAttr("data-highlighted"),e("#feedback-module").remove(),e(".feedback-btn").show(),h.onClose.call(this)}function Q(A,t){t="undefined"==typeof t||t,A.clearRect(0,0,e("#feedback-canvas").width(),e("#feedback-canvas").height()),A.fillStyle="rgba(102,102,102,0.5)",A.fillRect(0,0,e("#feedback-canvas").width(),e("#feedback-canvas").height()),e(".feedback-helper").each(function(){"highlight"==e(this).attr("data-type")&&t&&l(A,parseInt(e(this).css("left"),10),parseInt(e(this).css("top"),10),e(this).width(),e(this).height())}),e(".feedback-helper").each(function(){"highlight"==e(this).attr("data-type")&&A.clearRect(parseInt(e(this).css("left"),10),parseInt(e(this).css("top"),10),e(this).width(),e(this).height())}),e(".feedback-helper").each(function(){"blackout"==e(this).attr("data-type")&&(A.fillStyle="rgba(0,0,0,1)",A.fillRect(parseInt(e(this).css("left"),10),parseInt(e(this).css("top"),10),e(this).width(),e(this).height()))})}function l(A,e,t,r,n){A.strokeStyle=h.strokeStyle,A.shadowColor=h.shadowColor,A.shadowOffsetX=h.shadowOffsetX,A.shadowOffsetY=h.shadowOffsetY,A.shadowBlur=h.shadowBlur,A.lineJoin=h.lineJoin,A.lineWidth=h.lineWidth,A.strokeRect(e,t,r,n),A.shadowOffsetX=0,A.shadowOffsetY=0,A.shadowBlur=0,A.lineWidth=1}var w=B(A.i18nProperties||i),h=e.extend({ajaxURL:"",postBrowserInfo:!0,postHTML:!0,postURL:!0,proxy:void 0,letterRendering:!1,descriptionTemplate:"",initButtonText:w.send_feedback,strokeStyle:"black",shadowColor:"black",shadowOffsetX:1,shadowOffsetY:1,shadowBlur:10,lineJoin:"bevel",lineWidth:3,feedbackButton:".feedback-btn",isDraggable:!0,onScreenshotTaken:function(){},tpl:{highlighter:a(t.highlighter,w),overview:a(t.overview,w),submitSuccess:a(t.submitSuccess,w),submitError:a(t.submitError,w)},onClose:function(){},screenshotStroke:!0,highlightElement:!0},A),g=!!window.HTMLCanvasElement,d=".feedback-btn"==h.feedbackButton,U=void 0,C=void 0,f=void 0,E=void 0,F=void 0,p=void 0,H=void 0,N=void 0,K=void 0,m=void 0,b=void 0,v=void 0,I=void 0,T=void 0,R=void 0;g&&(d&&e("body").append('"),e(document).on("click",h.feedbackButton,function(){e("div[tabindex='-1']").removeAttr("tabindex"),d&&e(this).hide();var A=!1,t="",i=e(document).height(),B=e(document).width(),a='
';a+=h.tpl.highlighter+h.tpl.overview+'
',e("body").append(a);var w=new o(e("#feedback-highlighter").get(0)),g=new o(e("#feedback-highlighter").get(0).parentNode);if(U={position:"absolute",left:"0px",top:"0px"},C={width:B,height:i},e("#feedback-module").css(U),e("#feedback-canvas").attr(C).css("z-index","30000"),e("#feedback-highlighter-back").remove(),A=!0,e("#feedback-canvas").css("cursor","crosshair"),e("#feedback-helpers").show(),e("#feedback-welcome").hide(),e("#feedback-highlighter").show(),h.isDraggable){var R=null;w.on_pointer_events(function(A){var t=A.touches?A.touches[0]:A,r=e("#feedback-highlighter").addClass("feedback-draggable"),n=r.outerHeight(),s=r.outerWidth(),o=r.offset().top+n-t.pageY,i=r.offset().left+s-t.pageX;r.css("z-index",4e4),R=function(A){var t=A.touches?A.touches[0]:A;f=t.pageY+o-n,E=t.pageX+i-s,F=n-t.pageY,p=s-t.pageX,E<0&&(E=0),f<0&&(f=0),p>e(window).width()&&(E=e(window).width()-s),E>e(window).width()-s&&(E=e(window).width()-s),F>e(document).height()&&(f=e(document).height()-n),f>e(document).height()-n&&(f=e(document).height()-n),e(".feedback-draggable").offset({top:f,left:E}).on("mouseup",function(){e(this).removeClass("feedback-draggable")})},g.on_pointer_events(R,"move"),A.preventDefault()},"down").on_pointer_events(function(A){e("#feedback-highlighter").removeClass("feedback-draggable"),g.off_pointer_events(R,"move")},"up")}var y=e("#feedback-canvas")[0].getContext("2d");if(y.fillStyle="rgba(102,102,102,0.5)",y.fillRect(0,0,e("#feedback-canvas").width(),e("#feedback-canvas").height()),H={},N=!1,K=1,m={},h.postBrowserInfo&&(m.browser={},m.browser.appCodeName=navigator.appCodeName,m.browser.appName=navigator.appName,m.browser.appVersion=navigator.appVersion,m.browser.cookieEnabled=navigator.cookieEnabled,m.browser.onLine=navigator.onLine,m.browser.platform=navigator.platform,m.browser.userAgent=navigator.userAgent,m.browser.plugins=[],e.each(navigator.plugins,function(A){m.browser.plugins.push(navigator.plugins[A].name)}),e("#feedback-browser-info").show()),h.postURL&&(m.url=document.URL,e("#feedback-page-info").show()),h.postHTML&&(m.html=e("html").html(),e("#feedback-page-structure").show()),h.postBrowserInfo||h.postURL||h.postHTML||e("#feedback-additional-none").show(),e(document).on("mousedown","#feedback-canvas",function(t){A&&(H.startX=t.pageX-e(this).offset().left,H.startY=t.pageY-e(this).offset().top,H.w=0,H.h=0,N=!0)}),e(document).on("mouseup",function(){if(A){N=!1;var t=H.startY,r=H.startX,n=H.w,s=H.h;if(b="highlight",0==n||0==s)return;n<0&&(r+=n,n*=-1),s<0&&(t+=s,s*=-1),t+s>e(document).height()&&(s=e(document).height()-t),r+n>e(document).width()&&(n=e(document).width()-r),0==K&&(b="blackout"),e("#feedback-helpers").append(''),Q(y),H.w=0}}),e(document).on("mousemove",function(t){A&&N&&(e("#feedback-highlighter").css("cursor","default"),H.w=t.pageX-e("#feedback-canvas").offset().left-H.startX,H.h=t.pageY-e("#feedback-canvas").offset().top-H.startY,y.clearRect(0,0,e("#feedback-canvas").width(),e("#feedback-canvas").height()),y.fillStyle="rgba(102,102,102,0.5)",y.fillRect(0,0,e("#feedback-canvas").width(),e("#feedback-canvas").height()),e(".feedback-helper").each(function(){"highlight"==e(this).attr("data-type")&&l(y,parseInt(e(this).css("left"),10),parseInt(e(this).css("top"),10),e(this).width(),e(this).height())}),1==K&&(l(y,H.startX,H.startY,H.w,H.h),y.clearRect(H.startX,H.startY,H.w,H.h)),e(".feedback-helper").each(function(){"highlight"==e(this).attr("data-type")&&y.clearRect(parseInt(e(this).css("left"),10),parseInt(e(this).css("top"),10),e(this).width(),e(this).height())}),e(".feedback-helper").each(function(){"blackout"==e(this).attr("data-type")&&(y.fillStyle="rgba(0,0,0,1)",y.fillRect(parseInt(e(this).css("left"),10),parseInt(e(this).css("top"),10),e(this).width(),e(this).height()))}),0==K&&(y.fillStyle="rgba(0,0,0,0.5)",y.fillRect(H.startX,H.startY,H.w,H.h)))}),h.highlightElement){var L=[],O=[],S=0;e(document).on("mousemove click","#feedback-canvas",function(t){if(A){Q(y),O=[],e("#feedback-canvas").css("cursor","crosshair"),e("* :not(body,script,iframe,div,section,.feedback-btn,#feedback-module *)").each(function(){"true"!==e(this).attr("data-highlighted")&&t.pageX>e(this).offset().left&&t.pageXe(this).offset().top+parseInt(e(this).css("padding-top"),10)&&t.pageY