1 |
- (window["webpackJsonp"]=window["webpackJsonp"]||[]).push([["vendors~canvg"],{1276:function(t,e,r){"use strict";var n=r("d784"),i=r("44e7"),a=r("825a"),o=r("1d80"),u=r("4840"),s=r("8aa5"),c=r("50c4"),l=r("14c3"),h=r("9263"),f=r("d039"),y=[].push,g=Math.min,p=4294967295,d=!f((function(){return!RegExp(p,"y")}));n("split",2,(function(t,e,r){var n;return n="c"=="abbc".split(/(b)*/)[1]||4!="test".split(/(?:)/,-1).length||2!="ab".split(/(?:ab)*/).length||4!=".".split(/(.?)(.?)/).length||".".split(/()()/).length>1||"".split(/.?/).length?function(t,r){var n=String(o(this)),a=void 0===r?p:r>>>0;if(0===a)return[];if(void 0===t)return[n];if(!i(t))return e.call(n,t,a);var u,s,c,l=[],f=(t.ignoreCase?"i":"")+(t.multiline?"m":"")+(t.unicode?"u":"")+(t.sticky?"y":""),g=0,d=new RegExp(t.source,f+"g");while(u=h.call(d,n)){if(s=d.lastIndex,s>g&&(l.push(n.slice(g,u.index)),u.length>1&&u.index<n.length&&y.apply(l,u.slice(1)),c=u[0].length,g=s,l.length>=a))break;d.lastIndex===u.index&&d.lastIndex++}return g===n.length?!c&&d.test("")||l.push(""):l.push(n.slice(g)),l.length>a?l.slice(0,a):l}:"0".split(void 0,0).length?function(t,r){return void 0===t&&0===r?[]:e.call(this,t,r)}:e,[function(e,r){var i=o(this),a=void 0==e?void 0:e[t];return void 0!==a?a.call(e,i,r):n.call(String(i),e,r)},function(t,i){var o=r(n,t,this,i,n!==e);if(o.done)return o.value;var h=a(t),f=String(this),y=u(h,RegExp),v=h.unicode,m=(h.ignoreCase?"i":"")+(h.multiline?"m":"")+(h.unicode?"u":"")+(d?"y":"g"),x=new y(d?h:"^(?:"+h.source+")",m),b=void 0===i?p:i>>>0;if(0===b)return[];if(0===f.length)return null===l(x,f)?[f]:[];var w=0,k=0,S=[];while(k<f.length){x.lastIndex=d?k:0;var P,R=l(x,d?f:f.slice(k));if(null===R||(P=g(c(x.lastIndex+(d?0:k)),f.length))===w)k=s(f,k,v);else{if(S.push(f.slice(w,k)),S.length===b)return S;for(var A=1;A<=R.length-1;A++)if(S.push(R[A]),S.length===b)return S;k=w=P}}return S.push(f.slice(w)),S}]}),!d)},"26e9":function(t,e,r){"use strict";var n=r("23e7"),i=r("e8b5"),a=[].reverse,o=[1,2];n({target:"Array",proto:!0,forced:String(o)===String(o.reverse())},{reverse:function(){return i(this)&&(this.length=this.length),a.call(this)}})},"36c6":function(t,e,r){function n(e){return t.exports=n=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)},t.exports.__esModule=!0,t.exports["default"]=t.exports,n(e)}r("3410"),r("131a"),t.exports=n,t.exports.__esModule=!0,t.exports["default"]=t.exports},"3c96":function(t,e){function r(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}t.exports=r,t.exports.__esModule=!0,t.exports["default"]=t.exports},4160:function(t,e,r){"use strict";var n=r("23e7"),i=r("17c2");n({target:"Array",proto:!0,forced:[].forEach!=i},{forEach:i})},"45fc":function(t,e,r){"use strict";var n=r("23e7"),i=r("b727").some,a=r("a640"),o=r("ae40"),u=a("some"),s=o("some");n({target:"Array",proto:!0,forced:!u||!s},{some:function(t){return i(this,t,arguments.length>1?arguments[1]:void 0)}})},"4a4b":function(t,e,r){function n(e,r){return t.exports=n=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t},t.exports.__esModule=!0,t.exports["default"]=t.exports,n(e,r)}r("131a"),t.exports=n,t.exports.__esModule=!0,t.exports["default"]=t.exports},"4ec9":function(t,e,r){"use strict";var n=r("6d61"),i=r("6566");t.exports=n("Map",(function(t){return function(){return t(this,arguments.length?arguments[0]:void 0)}}),i)},"5bc3":function(t,e,r){var n=r("a395");function i(t,e){for(var r=0;r<e.length;r++){var i=e[r];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(t,n(i.key),i)}}function a(t,e,r){return e&&i(t.prototype,e),r&&i(t,r),Object.defineProperty(t,"prototype",{writable:!1}),t}t.exports=a,t.exports.__esModule=!0,t.exports["default"]=t.exports},"5d41":function(t,e,r){var n=r("23e7"),i=r("861d"),a=r("825a"),o=r("5135"),u=r("06cf"),s=r("e163");function c(t,e){var r,n,l=arguments.length<3?t:arguments[2];return a(t)===l?t[e]:(r=u.f(t,e))?o(r,"value")?r.value:void 0===r.get?void 0:r.get.call(l):i(n=s(t))?c(n,e,l):void 0}n({target:"Reflect",stat:!0},{get:c})},"6b58":function(t,e,r){var n=r("7037")["default"],i=r("3c96");function a(t,e){if(e&&("object"===n(e)||"function"===typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");return i(t)}t.exports=a,t.exports.__esModule=!0,t.exports["default"]=t.exports},"7f78":function(t,e,r){var n=r("23e7"),i=r("825a"),a=r("e163"),o=r("e177");n({target:"Reflect",stat:!0,sham:!o},{getPrototypeOf:function(t){return a(i(t))}})},8890:function(t,e,r){"use strict";r.r(e),function(t){r.d(e,"AElement",(function(){return Ar})),r.d(e,"AnimateColorElement",(function(){return rr})),r.d(e,"AnimateElement",(function(){return Ke})),r.d(e,"AnimateTransformElement",(function(){return ar})),r.d(e,"BoundingBox",(function(){return $t})),r.d(e,"CB1",(function(){return K})),r.d(e,"CB2",(function(){return tt})),r.d(e,"CB3",(function(){return et})),r.d(e,"CB4",(function(){return rt})),r.d(e,"Canvg",(function(){return Bn})),r.d(e,"CircleElement",(function(){return ge})),r.d(e,"ClipPathElement",(function(){return on})),r.d(e,"DefsElement",(function(){return Ne})),r.d(e,"DescElement",(function(){return Cn})),r.d(e,"Document",(function(){return Ln})),r.d(e,"Element",(function(){return Ot})),r.d(e,"EllipseElement",(function(){return ve})),r.d(e,"FeColorMatrixElement",(function(){return Jr})),r.d(e,"FeCompositeElement",(function(){return mn})),r.d(e,"FeDropShadowElement",(function(){return fn})),r.d(e,"FeGaussianBlurElement",(function(){return wn})),r.d(e,"FeMorphologyElement",(function(){return pn})),r.d(e,"FilterElement",(function(){return cn})),r.d(e,"Font",(function(){return _t})),r.d(e,"FontElement",(function(){return hr})),r.d(e,"FontFaceElement",(function(){return gr})),r.d(e,"GElement",(function(){return Ie})),r.d(e,"GlyphElement",(function(){return br})),r.d(e,"GradientElement",(function(){return _e})),r.d(e,"ImageElement",(function(){return Nr})),r.d(e,"LineElement",(function(){return be})),r.d(e,"LinearGradientElement",(function(){return Ge})),r.d(e,"MarkerElement",(function(){return Te})),r.d(e,"MaskElement",(function(){return en})),r.d(e,"Matrix",(function(){return bt})),r.d(e,"MissingGlyphElement",(function(){return vr})),r.d(e,"Mouse",(function(){return lt})),r.d(e,"PSEUDO_ZERO",(function(){return U})),r.d(e,"Parser",(function(){return dt})),r.d(e,"PathElement",(function(){return ae})),r.d(e,"PathParser",(function(){return re})),r.d(e,"PatternElement",(function(){return Ee})),r.d(e,"Point",(function(){return ct})),r.d(e,"PolygonElement",(function(){return Ae})),r.d(e,"PolylineElement",(function(){return Se})),r.d(e,"Property",(function(){return ut})),r.d(e,"QB1",(function(){return nt})),r.d(e,"QB2",(function(){return it})),r.d(e,"QB3",(function(){return at})),r.d(e,"RadialGradientElement",(function(){return He})),r.d(e,"RectElement",(function(){return he})),r.d(e,"RenderedElement",(function(){return Xt})),r.d(e,"Rotate",(function(){return mt})),r.d(e,"SVGElement",(function(){return se})),r.d(e,"SVGFontLoader",(function(){return Fr})),r.d(e,"Scale",(function(){return xt})),r.d(e,"Screen",(function(){return yt})),r.d(e,"Skew",(function(){return St})),r.d(e,"SkewX",(function(){return At})),r.d(e,"SkewY",(function(){return Et})),r.d(e,"StopElement",(function(){return Qe})),r.d(e,"StyleElement",(function(){return $r})),r.d(e,"SymbolElement",(function(){return Ir})),r.d(e,"TRefElement",(function(){return Sr})),r.d(e,"TSpanElement",(function(){return Zt})),r.d(e,"TextElement",(function(){return Yt})),r.d(e,"TextPathElement",(function(){return Tr})),r.d(e,"TitleElement",(function(){return Pn})),r.d(e,"Transform",(function(){return Tt})),r.d(e,"Translate",(function(){return vt})),r.d(e,"UnknownElement",(function(){return zt})),r.d(e,"UseElement",(function(){return Xr})),r.d(e,"ViewPort",(function(){return st})),r.d(e,"compressSpaces",(function(){return T})),r.d(e,"getSelectorSpecificity",(function(){return Y})),r.d(e,"normalizeAttributeName",(function(){return B})),r.d(e,"normalizeColor",(function(){return F})),r.d(e,"parseExternalUrl",(function(){return I})),r.d(e,"presets",(function(){return jn})),r.d(e,"toNumbers",(function(){return N})),r.d(e,"trimLeft",(function(){return O})),r.d(e,"trimRight",(function(){return L})),r.d(e,"vectorMagnitude",(function(){return Q})),r.d(e,"vectorsAngle",(function(){return J})),r.d(e,"vectorsRatio",(function(){return Z}));r("d81d"),r("ac1f"),r("466d"),r("5319"),r("2ca0"),r("a15b");var n=r("278c"),i=r.n(n),a=(r("a4d3"),r("4de4"),r("4160"),r("e439"),r("dbb4"),r("b64b"),r("159b"),r("a34a")),o=r.n(a),u=r("c973"),s=r.n(u),c=r("9523"),l=r.n(c),h=r("970b"),f=r.n(h),y=r("5bc3"),g=r.n(y),p=(r("99af"),r("a6231"),r("13d5"),r("d3b7"),r("e6cf"),r("1276"),r("c449")),d=r.n(p),v=(r("b0c0"),r("58e1")),m=r.n(v),x=(r("4ae1"),r("25f0"),r("6b58")),b=r.n(x),w=r("36c6"),k=r.n(w),S=r("ed6d"),P=r.n(S),R=(r("a630"),r("caad"),r("45fc"),r("2532"),r("3ca3"),r("498a"),r("448a")),A=r.n(R),C=(r("c975"),r("26e9"),r("8962")),M=r.n(C),E=(r("a9e3"),r("cb29"),r("ac16"),r("3c96")),V=r.n(E),D=(r("e260"),r("ddb0"),r("e01a"),r("d28b"),r("fb6a"),r("4ec9"),r("a6fd"),r("7f78"),r("5e9e"));function T(t){return t.replace(/(?!\u3000)\s+/gm," ")}function O(t){return t.replace(/^[\n \t]+/,"")}function L(t){return t.replace(/[\n \t]+$/,"")}function N(t){var e=(t||"").match(/-?(\d+(?:\.\d*(?:[eE][+-]?\d+)?)?|\.\d+)(?=\D|$)/gm)||[];return e.map(parseFloat)}var z=/^[A-Z-]+$/;function B(t){return z.test(t)?t.toLowerCase():t}function I(t){var e=t.match(/url\(('([^']+)'|"([^"]+)"|([^'"\)]+))\)/)||[];return e[2]||e[3]||e[4]}function F(t){if(!t.startsWith("rgb"))return t;var e=3,r=t.replace(/\d+(\.\d+)?/g,(function(t,r){return e--&&r?String(Math.round(parseFloat(t))):t}));return r}var j=/(\[[^\]]+\])/g,_=/(#[^\s\+>~\.\[:]+)/g,$=/(\.[^\s\+>~\.\[:]+)/g,q=/(::[^\s\+>~\.\[:]+|:first-line|:first-letter|:before|:after)/gi,G=/(:[\w-]+\([^\)]*\))/gi,X=/(:[^\s\+>~\.\[:]+)/g,W=/([^\s\+>~\.\[:]+)/g;function H(t,e){var r=t.match(e);return r?[t.replace(e," "),r.length]:[t,0]}function Y(t){var e=[0,0,0],r=t.replace(/:not\(([^\)]*)\)/g," $1 ").replace(/{[\s\S]*/gm," "),n=0,a=H(r,j),o=i()(a,2);r=o[0],n=o[1],e[1]+=n;var u=H(r,_),s=i()(u,2);r=s[0],n=s[1],e[0]+=n;var c=H(r,$),l=i()(c,2);r=l[0],n=l[1],e[1]+=n;var h=H(r,q),f=i()(h,2);r=f[0],n=f[1],e[2]+=n;var y=H(r,G),g=i()(y,2);r=g[0],n=g[1],e[1]+=n;var p=H(r,X),d=i()(p,2);r=d[0],n=d[1],e[1]+=n,r=r.replace(/[\*\s\+>~]/g," ").replace(/[#\.]/g," ");var v=H(r,W),m=i()(v,2);return r=m[0],n=m[1],e[2]+=n,e.join("")}var U=1e-8;function Q(t){return Math.sqrt(Math.pow(t[0],2)+Math.pow(t[1],2))}function Z(t,e){return(t[0]*e[0]+t[1]*e[1])/(Q(t)*Q(e))}function J(t,e){return(t[0]*e[1]<t[1]*e[0]?-1:1)*Math.acos(Z(t,e))}function K(t){return t*t*t}function tt(t){return 3*t*t*(1-t)}function et(t){return 3*t*(1-t)*(1-t)}function rt(t){return(1-t)*(1-t)*(1-t)}function nt(t){return t*t}function it(t){return 2*t*(1-t)}function at(t){return(1-t)*(1-t)}function ot(t,e){return e={exports:{}},t(e,e.exports),e.exports}ot((function(t){var e=function(t){var e,r=Object.prototype,n=r.hasOwnProperty,i="function"===typeof Symbol?Symbol:{},a=i.iterator||"@@iterator",o=i.asyncIterator||"@@asyncIterator",u=i.toStringTag||"@@toStringTag";function s(t,e,r,n){var i=e&&e.prototype instanceof p?e:p,a=Object.create(i.prototype),o=new M(n||[]);return a._invoke=P(t,r,o),a}function c(t,e,r){try{return{type:"normal",arg:t.call(e,r)}}catch(n){return{type:"throw",arg:n}}}t.wrap=s;var l="suspendedStart",h="suspendedYield",f="executing",y="completed",g={};function p(){}function d(){}function v(){}var m={};m[a]=function(){return this};var x=Object.getPrototypeOf,b=x&&x(x(E([])));b&&b!==r&&n.call(b,a)&&(m=b);var w=v.prototype=p.prototype=Object.create(m);function k(t){["next","throw","return"].forEach((function(e){t[e]=function(t){return this._invoke(e,t)}}))}function S(t,e){function r(i,a,o,u){var s=c(t[i],t,a);if("throw"!==s.type){var l=s.arg,h=l.value;return h&&"object"===typeof h&&n.call(h,"__await")?e.resolve(h.__await).then((function(t){r("next",t,o,u)}),(function(t){r("throw",t,o,u)})):e.resolve(h).then((function(t){l.value=t,o(l)}),(function(t){return r("throw",t,o,u)}))}u(s.arg)}var i;function a(t,n){function a(){return new e((function(e,i){r(t,n,e,i)}))}return i=i?i.then(a,a):a()}this._invoke=a}function P(t,e,r){var n=l;return function(i,a){if(n===f)throw new Error("Generator is already running");if(n===y){if("throw"===i)throw a;return V()}r.method=i,r.arg=a;while(1){var o=r.delegate;if(o){var u=R(o,r);if(u){if(u===g)continue;return u}}if("next"===r.method)r.sent=r._sent=r.arg;else if("throw"===r.method){if(n===l)throw n=y,r.arg;r.dispatchException(r.arg)}else"return"===r.method&&r.abrupt("return",r.arg);n=f;var s=c(t,e,r);if("normal"===s.type){if(n=r.done?y:h,s.arg===g)continue;return{value:s.arg,done:r.done}}"throw"===s.type&&(n=y,r.method="throw",r.arg=s.arg)}}}function R(t,r){var n=t.iterator[r.method];if(n===e){if(r.delegate=null,"throw"===r.method){if(t.iterator["return"]&&(r.method="return",r.arg=e,R(t,r),"throw"===r.method))return g;r.method="throw",r.arg=new TypeError("The iterator does not provide a 'throw' method")}return g}var i=c(n,t.iterator,r.arg);if("throw"===i.type)return r.method="throw",r.arg=i.arg,r.delegate=null,g;var a=i.arg;return a?a.done?(r[t.resultName]=a.value,r.next=t.nextLoc,"return"!==r.method&&(r.method="next",r.arg=e),r.delegate=null,g):a:(r.method="throw",r.arg=new TypeError("iterator result is not an object"),r.delegate=null,g)}function A(t){var e={tryLoc:t[0]};1 in t&&(e.catchLoc=t[1]),2 in t&&(e.finallyLoc=t[2],e.afterLoc=t[3]),this.tryEntries.push(e)}function C(t){var e=t.completion||{};e.type="normal",delete e.arg,t.completion=e}function M(t){this.tryEntries=[{tryLoc:"root"}],t.forEach(A,this),this.reset(!0)}function E(t){if(t){var r=t[a];if(r)return r.call(t);if("function"===typeof t.next)return t;if(!isNaN(t.length)){var i=-1,o=function r(){while(++i<t.length)if(n.call(t,i))return r.value=t[i],r.done=!1,r;return r.value=e,r.done=!0,r};return o.next=o}}return{next:V}}function V(){return{value:e,done:!0}}return d.prototype=w.constructor=v,v.constructor=d,v[u]=d.displayName="GeneratorFunction",t.isGeneratorFunction=function(t){var e="function"===typeof t&&t.constructor;return!!e&&(e===d||"GeneratorFunction"===(e.displayName||e.name))},t.mark=function(t){return Object.setPrototypeOf?Object.setPrototypeOf(t,v):(t.__proto__=v,u in t||(t[u]="GeneratorFunction")),t.prototype=Object.create(w),t},t.awrap=function(t){return{__await:t}},k(S.prototype),S.prototype[o]=function(){return this},t.AsyncIterator=S,t.async=function(e,r,n,i,a){void 0===a&&(a=Promise);var o=new S(s(e,r,n,i),a);return t.isGeneratorFunction(r)?o:o.next().then((function(t){return t.done?t.value:o.next()}))},k(w),w[u]="Generator",w[a]=function(){return this},w.toString=function(){return"[object Generator]"},t.keys=function(t){var e=[];for(var r in t)e.push(r);return e.reverse(),function r(){while(e.length){var n=e.pop();if(n in t)return r.value=n,r.done=!1,r}return r.done=!0,r}},t.values=E,M.prototype={constructor:M,reset:function(t){if(this.prev=0,this.next=0,this.sent=this._sent=e,this.done=!1,this.delegate=null,this.method="next",this.arg=e,this.tryEntries.forEach(C),!t)for(var r in this)"t"===r.charAt(0)&&n.call(this,r)&&!isNaN(+r.slice(1))&&(this[r]=e)},stop:function(){this.done=!0;var t=this.tryEntries[0],e=t.completion;if("throw"===e.type)throw e.arg;return this.rval},dispatchException:function(t){if(this.done)throw t;var r=this;function i(n,i){return u.type="throw",u.arg=t,r.next=n,i&&(r.method="next",r.arg=e),!!i}for(var a=this.tryEntries.length-1;a>=0;--a){var o=this.tryEntries[a],u=o.completion;if("root"===o.tryLoc)return i("end");if(o.tryLoc<=this.prev){var s=n.call(o,"catchLoc"),c=n.call(o,"finallyLoc");if(s&&c){if(this.prev<o.catchLoc)return i(o.catchLoc,!0);if(this.prev<o.finallyLoc)return i(o.finallyLoc)}else if(s){if(this.prev<o.catchLoc)return i(o.catchLoc,!0)}else{if(!c)throw new Error("try statement without catch or finally");if(this.prev<o.finallyLoc)return i(o.finallyLoc)}}}},abrupt:function(t,e){for(var r=this.tryEntries.length-1;r>=0;--r){var i=this.tryEntries[r];if(i.tryLoc<=this.prev&&n.call(i,"finallyLoc")&&this.prev<i.finallyLoc){var a=i;break}}a&&("break"===t||"continue"===t)&&a.tryLoc<=e&&e<=a.finallyLoc&&(a=null);var o=a?a.completion:{};return o.type=t,o.arg=e,a?(this.method="next",this.next=a.finallyLoc,g):this.complete(o)},complete:function(t,e){if("throw"===t.type)throw t.arg;return"break"===t.type||"continue"===t.type?this.next=t.arg:"return"===t.type?(this.rval=this.arg=t.arg,this.method="return",this.next="end"):"normal"===t.type&&e&&(this.next=e),g},finish:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var r=this.tryEntries[e];if(r.finallyLoc===t)return this.complete(r.completion,r.afterLoc),C(r),g}},catch:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var r=this.tryEntries[e];if(r.tryLoc===t){var n=r.completion;if("throw"===n.type){var i=n.arg;C(r)}return i}}throw new Error("illegal catch attempt")},delegateYield:function(t,r,n){return this.delegate={iterator:E(t),resultName:r,nextLoc:n},"next"===this.method&&(this.arg=e),g}},t}(t.exports);try{regeneratorRuntime=e}catch(r){Function("r","regeneratorRuntime = r")(e)}}));var ut=function(){function t(e,r,n){f()(this,t),this.document=e,this.name=r,this.value=n,this.isNormalizedColor=!1}return g()(t,[{key:"hasValue",value:function(){var t=this.value;return null!==t&&""!==t&&0!==t&&"undefined"!==typeof t}},{key:"isString",value:function(t){var e=this.value,r="string"===typeof e;return r&&t?t.test(e):r}},{key:"isUrlDefinition",value:function(){return this.isString(/^url\(/)}},{key:"isPixels",value:function(){if(!this.hasValue())return!1;var t=this.getString();switch(!0){case/px$/.test(t):case/^[0-9]+$/.test(t):return!0;default:return!1}}},{key:"setValue",value:function(t){return this.value=t,this}},{key:"getValue",value:function(t){return"undefined"===typeof t||this.hasValue()?this.value:t}},{key:"getNumber",value:function(t){if(!this.hasValue())return"undefined"===typeof t?0:parseFloat(t);var e=this.value,r=parseFloat(e);return this.isString(/%$/)&&(r/=100),r}},{key:"getString",value:function(t){return"undefined"===typeof t||this.hasValue()?"undefined"===typeof this.value?"":String(this.value):String(t)}},{key:"getColor",value:function(t){var e=this.getString(t);return this.isNormalizedColor||(this.isNormalizedColor=!0,e=F(e),this.value=e),e}},{key:"getDpi",value:function(){return 96}},{key:"getRem",value:function(){return this.document.rootEmSize}},{key:"getEm",value:function(){return this.document.emSize}},{key:"getUnits",value:function(){return this.getString().replace(/[0-9\.\-]/g,"")}},{key:"getPixels",value:function(t){var e=arguments.length>1&&void 0!==arguments[1]&&arguments[1];if(!this.hasValue())return 0;var r="boolean"===typeof t?[void 0,t]:[t],n=i()(r,2),a=n[0],o=n[1],u=this.document.screen.viewPort;switch(!0){case this.isString(/vmin$/):return this.getNumber()/100*Math.min(u.computeSize("x"),u.computeSize("y"));case this.isString(/vmax$/):return this.getNumber()/100*Math.max(u.computeSize("x"),u.computeSize("y"));case this.isString(/vw$/):return this.getNumber()/100*u.computeSize("x");case this.isString(/vh$/):return this.getNumber()/100*u.computeSize("y");case this.isString(/rem$/):return this.getNumber()*this.getRem();case this.isString(/em$/):return this.getNumber()*this.getEm();case this.isString(/ex$/):return this.getNumber()*this.getEm()/2;case this.isString(/px$/):return this.getNumber();case this.isString(/pt$/):return this.getNumber()*this.getDpi()*(1/72);case this.isString(/pc$/):return 15*this.getNumber();case this.isString(/cm$/):return this.getNumber()*this.getDpi()/2.54;case this.isString(/mm$/):return this.getNumber()*this.getDpi()/25.4;case this.isString(/in$/):return this.getNumber()*this.getDpi();case this.isString(/%$/)&&o:return this.getNumber()*this.getEm();case this.isString(/%$/):return this.getNumber()*u.computeSize(a);default:var s=this.getNumber();return e&&s<1?s*u.computeSize(a):s}}},{key:"getMilliseconds",value:function(){return this.hasValue()?this.isString(/ms$/)?this.getNumber():1e3*this.getNumber():0}},{key:"getRadians",value:function(){if(!this.hasValue())return 0;switch(!0){case this.isString(/deg$/):return this.getNumber()*(Math.PI/180);case this.isString(/grad$/):return this.getNumber()*(Math.PI/200);case this.isString(/rad$/):return this.getNumber();default:return this.getNumber()*(Math.PI/180)}}},{key:"getDefinition",value:function(){var t=this.getString(),e=t.match(/#([^\)'"]+)/);return e&&(e=e[1]),e||(e=t),this.document.definitions[e]}},{key:"getFillStyleDefinition",value:function(t,e){var r=this.getDefinition();if(!r)return null;if("function"===typeof r.createGradient)return r.createGradient(this.document.ctx,t,e);if("function"===typeof r.createPattern){if(r.getHrefAttribute().hasValue()){var n=r.getAttribute("patternTransform");r=r.getHrefAttribute().getDefinition(),n.hasValue()&&r.getAttribute("patternTransform",!0).setValue(n.value)}return r.createPattern(this.document.ctx,t,e)}return null}},{key:"getTextBaseline",value:function(){return this.hasValue()?t.textBaselineMapping[this.getString()]:null}},{key:"addOpacity",value:function(e){for(var r=this.getColor(),n=r.length,i=0,a=0;a<n;a++)if(","===r[a]&&i++,3===i)break;if(e.hasValue()&&this.isString()&&3!==i){var o=new m.a(r);o.ok&&(o.alpha=e.getNumber(),r=o.toRGBA())}return new t(this.document,this.name,r)}}],[{key:"empty",value:function(e){return new t(e,"EMPTY","")}}]),t}();ut.textBaselineMapping={baseline:"alphabetic","before-edge":"top","text-before-edge":"top",middle:"middle",central:"middle","after-edge":"bottom","text-after-edge":"bottom",ideographic:"ideographic",alphabetic:"alphabetic",hanging:"hanging",mathematical:"alphabetic"};var st=function(){function t(){f()(this,t),this.viewPorts=[]}return g()(t,[{key:"clear",value:function(){this.viewPorts=[]}},{key:"setCurrent",value:function(t,e){this.viewPorts.push({width:t,height:e})}},{key:"removeCurrent",value:function(){this.viewPorts.pop()}},{key:"getCurrent",value:function(){var t=this.viewPorts;return t[t.length-1]}},{key:"computeSize",value:function(t){return"number"===typeof t?t:"x"===t?this.width:"y"===t?this.height:Math.sqrt(Math.pow(this.width,2)+Math.pow(this.height,2))/Math.sqrt(2)}},{key:"width",get:function(){return this.getCurrent().width}},{key:"height",get:function(){return this.getCurrent().height}}]),t}(),ct=function(){function t(e,r){f()(this,t),this.x=e,this.y=r}return g()(t,[{key:"angleTo",value:function(t){return Math.atan2(t.y-this.y,t.x-this.x)}},{key:"applyTransform",value:function(t){var e=this.x,r=this.y,n=e*t[0]+r*t[2]+t[4],i=e*t[1]+r*t[3]+t[5];this.x=n,this.y=i}}],[{key:"parse",value:function(e){var r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0,n=N(e),a=i()(n,2),o=a[0],u=void 0===o?r:o,s=a[1],c=void 0===s?r:s;return new t(u,c)}},{key:"parseScale",value:function(e){var r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:1,n=N(e),a=i()(n,2),o=a[0],u=void 0===o?r:o,s=a[1],c=void 0===s?u:s;return new t(u,c)}},{key:"parsePath",value:function(e){for(var r=N(e),n=r.length,i=[],a=0;a<n;a+=2)i.push(new t(r[a],r[a+1]));return i}}]),t}(),lt=function(){function t(e){f()(this,t),this.screen=e,this.working=!1,this.events=[],this.eventElements=[],this.onClick=this.onClick.bind(this),this.onMouseMove=this.onMouseMove.bind(this)}return g()(t,[{key:"isWorking",value:function(){return this.working}},{key:"start",value:function(){if(!this.working){var t=this.screen,e=this.onClick,r=this.onMouseMove,n=t.ctx.canvas;n.onclick=e,n.onmousemove=r,this.working=!0}}},{key:"stop",value:function(){if(this.working){var t=this.screen.ctx.canvas;this.working=!1,t.onclick=null,t.onmousemove=null}}},{key:"hasEvents",value:function(){return this.working&&this.events.length>0}},{key:"runEvents",value:function(){if(this.working){var t=this.screen,e=this.events,r=this.eventElements,n=t.ctx.canvas.style;n&&(n.cursor=""),e.forEach((function(t,e){var n=t.run,i=r[e];while(i)n(i),i=i.parent})),this.events=[],this.eventElements=[]}}},{key:"checkPath",value:function(t,e){if(this.working&&e){var r=this.events,n=this.eventElements;r.forEach((function(r,i){var a=r.x,o=r.y;!n[i]&&e.isPointInPath&&e.isPointInPath(a,o)&&(n[i]=t)}))}}},{key:"checkBoundingBox",value:function(t,e){if(this.working&&e){var r=this.events,n=this.eventElements;r.forEach((function(r,i){var a=r.x,o=r.y;!n[i]&&e.isPointInBox(a,o)&&(n[i]=t)}))}}},{key:"mapXY",value:function(t,e){var r=this.screen,n=r.window,i=r.ctx,a=new ct(t,e),o=i.canvas;while(o)a.x-=o.offsetLeft,a.y-=o.offsetTop,o=o.offsetParent;return n.scrollX&&(a.x+=n.scrollX),n.scrollY&&(a.y+=n.scrollY),a}},{key:"onClick",value:function(t){var e=this.mapXY((t||event).clientX,(t||event).clientY),r=e.x,n=e.y;this.events.push({type:"onclick",x:r,y:n,run:function(t){t.onClick&&t.onClick()}})}},{key:"onMouseMove",value:function(t){var e=this.mapXY((t||event).clientX,(t||event).clientY),r=e.x,n=e.y;this.events.push({type:"onmousemove",x:r,y:n,run:function(t){t.onMouseMove&&t.onMouseMove()}})}}]),t}(),ht="undefined"!==typeof window?window:null,ft="undefined"!==typeof fetch?fetch.bind(void 0):null,yt=function(){function t(e){var r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=r.fetch,i=void 0===n?ft:n,a=r.window,o=void 0===a?ht:a;f()(this,t),this.ctx=e,this.FRAMERATE=30,this.MAX_VIRTUAL_PIXELS=3e4,this.CLIENT_WIDTH=800,this.CLIENT_HEIGHT=600,this.viewPort=new st,this.mouse=new lt(this),this.animations=[],this.waits=[],this.frameDuration=0,this.isReadyLock=!1,this.isFirstRender=!0,this.intervalId=null,this.window=o,this.fetch=i}return g()(t,[{key:"wait",value:function(t){this.waits.push(t)}},{key:"ready",value:function(){return this.readyPromise?this.readyPromise:Promise.resolve()}},{key:"isReady",value:function(){if(this.isReadyLock)return!0;var t=this.waits.every((function(t){return t()}));return t&&(this.waits=[],this.resolveReady&&this.resolveReady()),this.isReadyLock=t,t}},{key:"setDefaults",value:function(t){t.strokeStyle="rgba(0,0,0,0)",t.lineCap="butt",t.lineJoin="miter",t.miterLimit=4}},{key:"setViewBox",value:function(t){var e=t.document,r=t.ctx,n=t.aspectRatio,a=t.width,o=t.desiredWidth,u=t.height,s=t.desiredHeight,c=t.minX,l=void 0===c?0:c,h=t.minY,f=void 0===h?0:h,y=t.refX,g=t.refY,p=t.clip,d=void 0!==p&&p,v=t.clipX,m=void 0===v?0:v,x=t.clipY,b=void 0===x?0:x,w=T(n).replace(/^defer\s/,""),k=w.split(" "),S=i()(k,2),P=S[0],R=S[1],A=P||"xMidYMid",C=R||"meet",M=a/o,E=u/s,V=Math.min(M,E),D=Math.max(M,E),O=o,L=s;"meet"===C&&(O*=V,L*=V),"slice"===C&&(O*=D,L*=D);var N=new ut(e,"refX",y),z=new ut(e,"refY",g),B=N.hasValue()&&z.hasValue();if(B&&r.translate(-V*N.getPixels("x"),-V*z.getPixels("y")),d){var I=V*m,F=V*b;r.beginPath(),r.moveTo(I,F),r.lineTo(a,F),r.lineTo(a,u),r.lineTo(I,u),r.closePath(),r.clip()}if(!B){var j="meet"===C&&V===E,_="slice"===C&&D===E,$="meet"===C&&V===M,q="slice"===C&&D===M;/^xMid/.test(A)&&(j||_)&&r.translate(a/2-O/2,0),/YMid$/.test(A)&&($||q)&&r.translate(0,u/2-L/2),/^xMax/.test(A)&&(j||_)&&r.translate(a-O,0),/YMax$/.test(A)&&($||q)&&r.translate(0,u-L)}switch(!0){case"none"===A:r.scale(M,E);break;case"meet"===C:r.scale(V,V);break;case"slice"===C:r.scale(D,D);break}r.translate(-l,-f)}},{key:"start",value:function(t){var e=this,r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=r.enableRedraw,i=void 0!==n&&n,a=r.ignoreMouse,o=void 0!==a&&a,u=r.ignoreAnimation,s=void 0!==u&&u,c=r.ignoreDimensions,l=void 0!==c&&c,h=r.ignoreClear,f=void 0!==h&&h,y=r.forceRedraw,g=r.scaleWidth,p=r.scaleHeight,v=r.offsetX,m=r.offsetY,x=this.FRAMERATE,b=this.mouse,w=1e3/x;if(this.frameDuration=w,this.readyPromise=new Promise((function(t){e.resolveReady=t})),this.isReady()&&this.render(t,l,f,g,p,v,m),i){var k=Date.now(),S=k,P=0,R=function r(){k=Date.now(),P=k-S,P>=w&&(S=k-P%w,e.shouldUpdate(s,y)&&(e.render(t,l,f,g,p,v,m),b.runEvents())),e.intervalId=d()(r)};o||b.start(),this.intervalId=d()(R)}}},{key:"stop",value:function(){this.intervalId&&(d.a.cancel(this.intervalId),this.intervalId=null),this.mouse.stop()}},{key:"shouldUpdate",value:function(t,e){if(!t){var r=this.frameDuration,n=this.animations.reduce((function(t,e){return e.update(r)||t}),!1);if(n)return!0}return!("function"!==typeof e||!e())||(!(this.isReadyLock||!this.isReady())||!!this.mouse.hasEvents())}},{key:"render",value:function(t,e,r,n,i,a,o){var u=this.CLIENT_WIDTH,s=this.CLIENT_HEIGHT,c=this.viewPort,l=this.ctx,h=this.isFirstRender,f=l.canvas;c.clear(),f.width&&f.height?c.setCurrent(f.width,f.height):c.setCurrent(u,s);var y=t.getStyle("width"),g=t.getStyle("height");!e&&(h||"number"!==typeof n&&"number"!==typeof i)&&(y.hasValue()&&(f.width=y.getPixels("x"),f.style&&(f.style.width="".concat(f.width,"px"))),g.hasValue()&&(f.height=g.getPixels("y"),f.style&&(f.style.height="".concat(f.height,"px"))));var p=f.clientWidth||f.width,d=f.clientHeight||f.height;if(e&&y.hasValue()&&g.hasValue()&&(p=y.getPixels("x"),d=g.getPixels("y")),c.setCurrent(p,d),"number"===typeof a&&t.getAttribute("x",!0).setValue(a),"number"===typeof o&&t.getAttribute("y",!0).setValue(o),"number"===typeof n||"number"===typeof i){var v=N(t.getAttribute("viewBox").getString()),m=0,x=0;if("number"===typeof n){var b=t.getStyle("width");b.hasValue()?m=b.getPixels("x")/n:isNaN(v[2])||(m=v[2]/n)}if("number"===typeof i){var w=t.getStyle("height");w.hasValue()?x=w.getPixels("y")/i:isNaN(v[3])||(x=v[3]/i)}m||(m=x),x||(x=m),t.getAttribute("width",!0).setValue(n),t.getAttribute("height",!0).setValue(i);var k=t.getStyle("transform",!0,!0);k.setValue("".concat(k.getString()," scale(").concat(1/m,", ").concat(1/x,")"))}r||l.clearRect(0,0,p,d),t.render(l),h&&(this.isFirstRender=!1)}}]),t}();yt.defaultWindow=ht,yt.defaultFetch=ft;var gt=yt.defaultFetch,pt="undefined"!==typeof DOMParser?DOMParser:null,dt=function(){function t(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},r=e.fetch,n=void 0===r?gt:r,i=e.DOMParser,a=void 0===i?pt:i;f()(this,t),this.fetch=n,this.DOMParser=a}return g()(t,[{key:"parse",value:function(){var t=s()(o.a.mark((function t(e){return o.a.wrap((function(t){while(1)switch(t.prev=t.next){case 0:if(!/^</.test(e)){t.next=2;break}return t.abrupt("return",this.parseFromString(e));case 2:return t.abrupt("return",this.load(e));case 3:case"end":return t.stop()}}),t,this)})));function e(e){return t.apply(this,arguments)}return e}()},{key:"parseFromString",value:function(t){var e=new this.DOMParser;try{return this.checkDocument(e.parseFromString(t,"image/svg+xml"))}catch(r){return this.checkDocument(e.parseFromString(t,"text/xml"))}}},{key:"checkDocument",value:function(t){var e=t.getElementsByTagName("parsererror")[0];if(e)throw new Error(e.textContent);return t}},{key:"load",value:function(){var t=s()(o.a.mark((function t(e){var r,n;return o.a.wrap((function(t){while(1)switch(t.prev=t.next){case 0:return t.next=2,this.fetch(e);case 2:return r=t.sent,t.next=5,r.text();case 5:return n=t.sent,t.abrupt("return",this.parseFromString(n));case 7:case"end":return t.stop()}}),t,this)})));function e(e){return t.apply(this,arguments)}return e}()}]),t}(),vt=function(){function t(e,r){f()(this,t),this.type="translate",this.point=null,this.point=ct.parse(r)}return g()(t,[{key:"apply",value:function(t){var e=this.point,r=e.x,n=e.y;t.translate(r||0,n||0)}},{key:"unapply",value:function(t){var e=this.point,r=e.x,n=e.y;t.translate(-1*r||0,-1*n||0)}},{key:"applyToPoint",value:function(t){var e=this.point,r=e.x,n=e.y;t.applyTransform([1,0,0,1,r||0,n||0])}}]),t}(),mt=function(){function t(e,r){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:[];f()(this,t),this.type="rotate",this.angle=null,this.cx=0,this.cy=0;var i=N(r);this.angle=new ut(e,"angle",i[0]),this.cx=(i[1]||0)+(n[0]||0),this.cy=(i[2]||0)+(n[1]||0)}return g()(t,[{key:"apply",value:function(t){var e=this.cx,r=this.cy,n=this.angle;t.translate(e,r),t.rotate(n.getRadians()),t.translate(-e,-r)}},{key:"unapply",value:function(t){var e=this.cx,r=this.cy,n=this.angle;t.translate(e,r),t.rotate(-1*n.getRadians()),t.translate(-e,-r)}},{key:"applyToPoint",value:function(t){var e=this.cx,r=this.cy,n=this.angle,i=n.getRadians();t.applyTransform([1,0,0,1,e||0,r||0]),t.applyTransform([Math.cos(i),Math.sin(i),-Math.sin(i),Math.cos(i),0,0]),t.applyTransform([1,0,0,1,-e||0,-r||0])}}]),t}(),xt=function(){function t(e,r){f()(this,t),this.type="scale",this.scale=null;var n=ct.parseScale(r);0!==n.x&&0!==n.y||(n.x=U,n.y=U),this.scale=n}return g()(t,[{key:"apply",value:function(t){var e=this.scale,r=e.x,n=e.y;t.scale(r,n||r)}},{key:"unapply",value:function(t){var e=this.scale,r=e.x,n=e.y;t.scale(1/r,1/n||r)}},{key:"applyToPoint",value:function(t){var e=this.scale,r=e.x,n=e.y;t.applyTransform([r||0,0,0,n||0,0,0])}}]),t}(),bt=function(){function t(e,r){f()(this,t),this.type="matrix",this.matrix=[],this.matrix=N(r)}return g()(t,[{key:"apply",value:function(t){var e=this.matrix;t.transform(e[0],e[1],e[2],e[3],e[4],e[5])}},{key:"unapply",value:function(t){var e=this.matrix,r=e[0],n=e[2],i=e[4],a=e[1],o=e[3],u=e[5],s=0,c=0,l=1,h=1/(r*(o*l-u*c)-n*(a*l-u*s)+i*(a*c-o*s));t.transform(h*(o*l-u*c),h*(u*s-a*l),h*(i*c-n*l),h*(r*l-i*s),h*(n*u-i*o),h*(i*a-r*u))}},{key:"applyToPoint",value:function(t){t.applyTransform(this.matrix)}}]),t}();function wt(t){return function(){var e,r=k()(t);if(kt()){var n=k()(this).constructor;e=Reflect.construct(r,arguments,n)}else e=r.apply(this,arguments);return b()(this,e)}}function kt(){if("undefined"===typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"===typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],(function(){}))),!0}catch(t){return!1}}var St=function(t){P()(r,t);var e=wt(r);function r(t,n){var i;return f()(this,r),i=e.call(this,t,n),i.type="skew",i.angle=null,i.angle=new ut(t,"angle",n),i}return r}(bt);function Pt(t){return function(){var e,r=k()(t);if(Rt()){var n=k()(this).constructor;e=Reflect.construct(r,arguments,n)}else e=r.apply(this,arguments);return b()(this,e)}}function Rt(){if("undefined"===typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"===typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],(function(){}))),!0}catch(t){return!1}}var At=function(t){P()(r,t);var e=Pt(r);function r(t,n){var i;return f()(this,r),i=e.call(this,t,n),i.type="skewX",i.matrix=[1,0,Math.tan(i.angle.getRadians()),1,0,0],i}return r}(St);function Ct(t){return function(){var e,r=k()(t);if(Mt()){var n=k()(this).constructor;e=Reflect.construct(r,arguments,n)}else e=r.apply(this,arguments);return b()(this,e)}}function Mt(){if("undefined"===typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"===typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],(function(){}))),!0}catch(t){return!1}}var Et=function(t){P()(r,t);var e=Ct(r);function r(t,n){var i;return f()(this,r),i=e.call(this,t,n),i.type="skewY",i.matrix=[1,Math.tan(i.angle.getRadians()),0,1,0,0],i}return r}(St);function Vt(t){return T(t).trim().replace(/\)([a-zA-Z])/g,") $1").replace(/\)(\s?,\s?)/g,") ").split(/\s(?=[a-z])/)}function Dt(t){var e=t.split("("),r=i()(e,2),n=r[0],a=r[1];return[n.trim(),a.trim().replace(")","")]}var Tt=function(){function t(e,r,n){var a=this;f()(this,t),this.document=e,this.transforms=[];var o=Vt(r),u=n?N(n):[];o.forEach((function(e){if("none"!==e){var r=Dt(e),n=i()(r,2),o=n[0],s=n[1],c=t.transformTypes[o];"undefined"!==typeof c&&a.transforms.push(new c(a.document,s,u))}}))}return g()(t,[{key:"apply",value:function(t){for(var e=this.transforms,r=e.length,n=0;n<r;n++)e[n].apply(t)}},{key:"unapply",value:function(t){for(var e=this.transforms,r=e.length,n=r-1;n>=0;n--)e[n].unapply(t)}},{key:"applyToPoint",value:function(t){for(var e=this.transforms,r=e.length,n=0;n<r;n++)e[n].applyToPoint(t)}}],[{key:"fromElement",value:function(e,r){var n=r.getStyle("transform",!1,!0),i=r.getStyle("transform-origin",!1,!0);return n.hasValue()?new t(e,n.getString(),i.getString()):null}}]),t}();Tt.transformTypes={translate:vt,rotate:mt,scale:xt,matrix:bt,skewX:At,skewY:Et};var Ot=function(){function t(e,r){var n=this,a=arguments.length>2&&void 0!==arguments[2]&&arguments[2];if(f()(this,t),this.document=e,this.node=r,this.captureTextNodes=a,this.attributes={},this.styles={},this.stylesSpecificity={},this.animationFrozen=!1,this.animationFrozenValue="",this.parent=null,this.children=[],r&&1===r.nodeType){if(Array.from(r.attributes).forEach((function(t){var r=B(t.nodeName);n.attributes[r]=new ut(e,r,t.value)})),this.addStylesFromStyleDefinition(),this.getAttribute("style").hasValue()){var o=this.getAttribute("style").getString().split(";").map((function(t){return t.trim()}));o.forEach((function(t){if(t){var r=t.split(":").map((function(t){return t.trim()})),a=i()(r,2),o=a[0],u=a[1];n.styles[o]=new ut(e,o,u)}}))}var u=e.definitions,s=this.getAttribute("id");s.hasValue()&&(u[s.getValue()]||(u[s.getValue()]=this)),Array.from(r.childNodes).forEach((function(t){if(1===t.nodeType)n.addChild(t);else if(a&&(3===t.nodeType||4===t.nodeType)){var r=e.createTextNode(t);r.getText().length>0&&n.addChild(r)}}))}}return g()(t,[{key:"getAttribute",value:function(t){var e=arguments.length>1&&void 0!==arguments[1]&&arguments[1],r=this.attributes[t];if(!r&&e){var n=new ut(this.document,t,"");return this.attributes[t]=n,n}return r||ut.empty(this.document)}},{key:"getHrefAttribute",value:function(){for(var t in this.attributes)if("href"===t||/:href$/.test(t))return this.attributes[t];return ut.empty(this.document)}},{key:"getStyle",value:function(t){var e=arguments.length>1&&void 0!==arguments[1]&&arguments[1],r=arguments.length>2&&void 0!==arguments[2]&&arguments[2],n=this.styles[t];if(n)return n;var i=this.getAttribute(t);if(i&&i.hasValue())return this.styles[t]=i,i;if(!r){var a=this.parent;if(a){var o=a.getStyle(t);if(o&&o.hasValue())return o}}if(e){var u=new ut(this.document,t,"");return this.styles[t]=u,u}return n||ut.empty(this.document)}},{key:"render",value:function(t){if("none"!==this.getStyle("display").getString()&&"hidden"!==this.getStyle("visibility").getString()){if(t.save(),this.getStyle("mask").hasValue()){var e=this.getStyle("mask").getDefinition();e&&(this.applyEffects(t),e.apply(t,this))}else if("none"!==this.getStyle("filter").getValue("none")){var r=this.getStyle("filter").getDefinition();r&&(this.applyEffects(t),r.apply(t,this))}else this.setContext(t),this.renderChildren(t),this.clearContext(t);t.restore()}}},{key:"setContext",value:function(t){}},{key:"applyEffects",value:function(t){var e=Tt.fromElement(this.document,this);e&&e.apply(t);var r=this.getStyle("clip-path",!1,!0);if(r.hasValue()){var n=r.getDefinition();n&&n.apply(t)}}},{key:"clearContext",value:function(t){}},{key:"renderChildren",value:function(t){this.children.forEach((function(e){e.render(t)}))}},{key:"addChild",value:function(e){var r=e instanceof t?e:this.document.createElement(e);r.parent=this,t.ignoreChildTypes.includes(r.type)||this.children.push(r)}},{key:"matchesSelector",value:function(t){var e=this.node;if("function"===typeof e.matches)return e.matches(t);var r=e.getAttribute("class");return!(!r||""===r)&&r.split(" ").some((function(e){if(".".concat(e)===t)return!0}))}},{key:"addStylesFromStyleDefinition",value:function(){var t=this.document,e=t.styles,r=t.stylesSpecificity;for(var n in e)if("@"!==n[0]&&this.matchesSelector(n)){var i=e[n],a=r[n];if(i)for(var o in i){var u=this.stylesSpecificity[o];"undefined"===typeof u&&(u="000"),a>=u&&(this.styles[o]=i[o],this.stylesSpecificity[o]=a)}}}},{key:"removeStyles",value:function(t,e){var r=e.reduce((function(e,r){var n=t.getStyle(r);if(!n.hasValue())return e;var i=n.getString();return n.setValue(""),[].concat(A()(e),[[r,i]])}),[]);return r}},{key:"restoreStyles",value:function(t,e){e.forEach((function(e){var r=i()(e,2),n=r[0],a=r[1];t.getStyle(n,!0).setValue(a)}))}}]),t}();function Lt(t){return function(){var e,r=k()(t);if(Nt()){var n=k()(this).constructor;e=Reflect.construct(r,arguments,n)}else e=r.apply(this,arguments);return b()(this,e)}}function Nt(){if("undefined"===typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"===typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],(function(){}))),!0}catch(t){return!1}}Ot.ignoreChildTypes=["title"];var zt=function(t){P()(r,t);var e=Lt(r);function r(t,n,i){var a;return f()(this,r),a=e.call(this,t,n,i),a}return r}(Ot);function Bt(t){var e=t.trim();return/^('|")/.test(e)?e:'"'.concat(e,'"')}function It(e){return"undefined"===typeof t?e:e.trim().split(",").map(Bt).join(",")}function Ft(t){if(!t)return"";var e=t.trim().toLowerCase();switch(e){case"normal":case"italic":case"oblique":case"inherit":case"initial":case"unset":return e;default:return/^oblique\s+(-|)\d+deg$/.test(e)?e:""}}function jt(t){if(!t)return"";var e=t.trim().toLowerCase();switch(e){case"normal":case"bold":case"lighter":case"bolder":case"inherit":case"initial":case"unset":return e;default:return/^[\d.]+$/.test(e)?e:""}}var _t=function(){function t(e,r,n,i,a,o){f()(this,t);var u=o?"string"===typeof o?t.parse(o):o:{};this.fontFamily=a||u.fontFamily,this.fontSize=i||u.fontSize,this.fontStyle=e||u.fontStyle,this.fontWeight=n||u.fontWeight,this.fontVariant=r||u.fontVariant}return g()(t,[{key:"toString",value:function(){return[Ft(this.fontStyle),this.fontVariant,jt(this.fontWeight),this.fontSize,It(this.fontFamily)].join(" ").trim()}}],[{key:"parse",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"",r=arguments.length>1?arguments[1]:void 0,n="",a="",o="",u="",s="",c=T(e).trim().split(" "),l={fontSize:!1,fontStyle:!1,fontWeight:!1,fontVariant:!1};return c.forEach((function(e){switch(!0){case!l.fontStyle&&t.styles.includes(e):"inherit"!==e&&(n=e),l.fontStyle=!0;break;case!l.fontVariant&&t.variants.includes(e):"inherit"!==e&&(a=e),l.fontStyle=!0,l.fontVariant=!0;break;case!l.fontWeight&&t.weights.includes(e):"inherit"!==e&&(o=e),l.fontStyle=!0,l.fontVariant=!0,l.fontWeight=!0;break;case!l.fontSize:if("inherit"!==e){var r=e.split("/"),c=i()(r,1);u=c[0]}l.fontStyle=!0,l.fontVariant=!0,l.fontWeight=!0,l.fontSize=!0;break;default:"inherit"!==e&&(s+=e)}})),new t(n,a,o,u,s,r)}}]),t}();_t.styles="normal|italic|oblique|inherit",_t.variants="normal|small-caps|inherit",_t.weights="normal|bold|bolder|lighter|100|200|300|400|500|600|700|800|900|inherit";var $t=function(){function t(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:Number.NaN,r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:Number.NaN,n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:Number.NaN,i=arguments.length>3&&void 0!==arguments[3]?arguments[3]:Number.NaN;f()(this,t),this.x1=e,this.y1=r,this.x2=n,this.y2=i,this.addPoint(e,r),this.addPoint(n,i)}return g()(t,[{key:"addPoint",value:function(t,e){"undefined"!==typeof t&&((isNaN(this.x1)||isNaN(this.x2))&&(this.x1=t,this.x2=t),t<this.x1&&(this.x1=t),t>this.x2&&(this.x2=t)),"undefined"!==typeof e&&((isNaN(this.y1)||isNaN(this.y2))&&(this.y1=e,this.y2=e),e<this.y1&&(this.y1=e),e>this.y2&&(this.y2=e))}},{key:"addX",value:function(t){this.addPoint(t,null)}},{key:"addY",value:function(t){this.addPoint(null,t)}},{key:"addBoundingBox",value:function(t){if(t){var e=t.x1,r=t.y1,n=t.x2,i=t.y2;this.addPoint(e,r),this.addPoint(n,i)}}},{key:"sumCubic",value:function(t,e,r,n,i){return Math.pow(1-t,3)*e+3*Math.pow(1-t,2)*t*r+3*(1-t)*Math.pow(t,2)*n+Math.pow(t,3)*i}},{key:"bezierCurveAdd",value:function(t,e,r,n,i){var a=6*e-12*r+6*n,o=-3*e+9*r-9*n+3*i,u=3*r-3*e;if(0!==o){var s=Math.pow(a,2)-4*u*o;if(!(s<0)){var c=(-a+Math.sqrt(s))/(2*o);0<c&&c<1&&(t?this.addX(this.sumCubic(c,e,r,n,i)):this.addY(this.sumCubic(c,e,r,n,i)));var l=(-a-Math.sqrt(s))/(2*o);0<l&&l<1&&(t?this.addX(this.sumCubic(l,e,r,n,i)):this.addY(this.sumCubic(l,e,r,n,i)))}}else{if(0===a)return;var h=-u/a;0<h&&h<1&&(t?this.addX(this.sumCubic(h,e,r,n,i)):this.addY(this.sumCubic(h,e,r,n,i)))}}},{key:"addBezierCurve",value:function(t,e,r,n,i,a,o,u){this.addPoint(t,e),this.addPoint(o,u),this.bezierCurveAdd(!0,t,r,i,o),this.bezierCurveAdd(!1,e,n,a,u)}},{key:"addQuadraticCurve",value:function(t,e,r,n,i,a){var o=t+2/3*(r-t),u=e+2/3*(n-e),s=o+1/3*(i-t),c=u+1/3*(a-e);this.addBezierCurve(t,e,o,s,u,c,i,a)}},{key:"isPointInBox",value:function(t,e){var r=this.x1,n=this.y1,i=this.x2,a=this.y2;return r<=t&&t<=i&&n<=e&&e<=a}},{key:"x",get:function(){return this.x1}},{key:"y",get:function(){return this.y1}},{key:"width",get:function(){return this.x2-this.x1}},{key:"height",get:function(){return this.y2-this.y1}}]),t}();function qt(t){return function(){var e,r=k()(t);if(Gt()){var n=k()(this).constructor;e=Reflect.construct(r,arguments,n)}else e=r.apply(this,arguments);return b()(this,e)}}function Gt(){if("undefined"===typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"===typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],(function(){}))),!0}catch(t){return!1}}var Xt=function(t){P()(r,t);var e=qt(r);function r(){var t;return f()(this,r),t=e.apply(this,arguments),t.modifiedEmSizeStack=!1,t}return g()(r,[{key:"calculateOpacity",value:function(){var t=1,e=this;while(e){var r=e.getStyle("opacity",!1,!0);r.hasValue()&&(t*=r.getNumber()),e=e.parent}return t}},{key:"setContext",value:function(t){var e=arguments.length>1&&void 0!==arguments[1]&&arguments[1];if(!e){var r=this.getStyle("fill"),n=this.getStyle("fill-opacity"),i=this.getStyle("stroke"),a=this.getStyle("stroke-opacity");if(r.isUrlDefinition()){var o=r.getFillStyleDefinition(this,n);o&&(t.fillStyle=o)}else if(r.hasValue()){"currentColor"===r.getString()&&r.setValue(this.getStyle("color").getColor());var u=r.getColor();"inherit"!==u&&(t.fillStyle="none"===u?"rgba(0,0,0,0)":u)}if(n.hasValue()){var s=new ut(this.document,"fill",t.fillStyle).addOpacity(n).getColor();t.fillStyle=s}if(i.isUrlDefinition()){var c=i.getFillStyleDefinition(this,a);c&&(t.strokeStyle=c)}else if(i.hasValue()){"currentColor"===i.getString()&&i.setValue(this.getStyle("color").getColor());var l=i.getString();"inherit"!==l&&(t.strokeStyle="none"===l?"rgba(0,0,0,0)":l)}if(a.hasValue()){var h=new ut(this.document,"stroke",t.strokeStyle).addOpacity(a).getString();t.strokeStyle=h}var f=this.getStyle("stroke-width");if(f.hasValue()){var y=f.getPixels();t.lineWidth=y||U}var g=this.getStyle("stroke-linecap"),p=this.getStyle("stroke-linejoin"),d=this.getStyle("stroke-miterlimit"),v=this.getStyle("paint-order"),m=this.getStyle("stroke-dasharray"),x=this.getStyle("stroke-dashoffset");if(g.hasValue()&&(t.lineCap=g.getString()),p.hasValue()&&(t.lineJoin=p.getString()),d.hasValue()&&(t.miterLimit=d.getNumber()),v.hasValue()&&(t.paintOrder=v.getValue()),m.hasValue()&&"none"!==m.getString()){var b=N(m.getString());"undefined"!==typeof t.setLineDash?t.setLineDash(b):"undefined"!==typeof t.webkitLineDash?t.webkitLineDash=b:"undefined"===typeof t.mozDash||1===b.length&&0===b[0]||(t.mozDash=b);var w=x.getPixels();"undefined"!==typeof t.lineDashOffset?t.lineDashOffset=w:"undefined"!==typeof t.webkitLineDashOffset?t.webkitLineDashOffset=w:"undefined"!==typeof t.mozDashOffset&&(t.mozDashOffset=w)}}if(this.modifiedEmSizeStack=!1,"undefined"!==typeof t.font){var k=this.getStyle("font"),S=this.getStyle("font-style"),P=this.getStyle("font-variant"),R=this.getStyle("font-weight"),A=this.getStyle("font-size"),C=this.getStyle("font-family"),M=new _t(S.getString(),P.getString(),R.getString(),A.hasValue()?"".concat(A.getPixels(!0),"px"):"",C.getString(),_t.parse(k.getString(),t.font));S.setValue(M.fontStyle),P.setValue(M.fontVariant),R.setValue(M.fontWeight),A.setValue(M.fontSize),C.setValue(M.fontFamily),t.font=M.toString(),A.isPixels()&&(this.document.emSize=A.getPixels(),this.modifiedEmSizeStack=!0)}e||(this.applyEffects(t),t.globalAlpha=this.calculateOpacity())}},{key:"clearContext",value:function(t){M()(k()(r.prototype),"clearContext",this).call(this,t),this.modifiedEmSizeStack&&this.document.popEmSize()}}]),r}(Ot);function Wt(t){return function(){var e,r=k()(t);if(Ht()){var n=k()(this).constructor;e=Reflect.construct(r,arguments,n)}else e=r.apply(this,arguments);return b()(this,e)}}function Ht(){if("undefined"===typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"===typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],(function(){}))),!0}catch(t){return!1}}var Yt=function(t){P()(r,t);var e=Wt(r);function r(t,n,i){var a;return f()(this,r),a=e.call(this,t,n,(this instanceof r?this.constructor:void 0)===r||i),a.type="text",a.x=0,a.y=0,a.measureCache=-1,a}return g()(r,[{key:"setContext",value:function(t){var e=arguments.length>1&&void 0!==arguments[1]&&arguments[1];M()(k()(r.prototype),"setContext",this).call(this,t,e);var n=this.getStyle("dominant-baseline").getTextBaseline()||this.getStyle("alignment-baseline").getTextBaseline();n&&(t.textBaseline=n)}},{key:"initializeCoordinates",value:function(t){this.x=this.getAttribute("x").getPixels("x"),this.y=this.getAttribute("y").getPixels("y");var e=this.getAttribute("dx"),r=this.getAttribute("dy");e.hasValue()&&(this.x+=e.getPixels("x")),r.hasValue()&&(this.y+=r.getPixels("y")),this.x+=this.getAnchorDelta(t,this,0)}},{key:"getBoundingBox",value:function(t){var e=this;if("text"!==this.type)return this.getTElementBoundingBox(t);this.initializeCoordinates(t);var r=null;return this.children.forEach((function(n,i){var a=e.getChildBoundingBox(t,e,e,i);r?r.addBoundingBox(a):r=a})),r}},{key:"getFontSize",value:function(){var t=this.document,e=this.parent,r=_t.parse(t.ctx.font).fontSize,n=e.getStyle("font-size").getNumber(r);return n}},{key:"getTElementBoundingBox",value:function(t){var e=this.getFontSize();return new $t(this.x,this.y-e,this.x+this.measureText(t),this.y)}},{key:"getGlyph",value:function(t,e,r){var n=e[r],i=null;if(t.isArabic){var a=e.length,o=e[r-1],u=e[r+1],s="isolated";(0===r||" "===o)&&r<a-2&&" "!==u&&(s="terminal"),r>0&&" "!==o&&r<a-2&&" "!==u&&(s="medial"),r>0&&" "!==o&&(r===a-1||" "===u)&&(s="initial"),"undefined"!==typeof t.glyphs[n]&&(i=t.glyphs[n][s],i||"glyph"!==t.glyphs[n].type||(i=t.glyphs[n]))}else i=t.glyphs[n];return i||(i=t.missingGlyph),i}},{key:"getText",value:function(){return""}},{key:"getTextFromNode",value:function(t){var e=t||this.node,r=Array.from(e.parentNode.childNodes),n=r.indexOf(e),i=r.length-1,a=T(e.value||e.text||e.textContent||"");return 0===n&&(a=O(a)),n===i&&(a=L(a)),a}},{key:"renderChildren",value:function(t){var e=this;if("text"===this.type){this.initializeCoordinates(t),this.children.forEach((function(r,n){e.renderChild(t,e,e,n)}));var r=this.document.screen.mouse;r.isWorking()&&r.checkBoundingBox(this,this.getBoundingBox(t))}else this.renderTElementChildren(t)}},{key:"renderTElementChildren",value:function(t){var e=this.document,r=this.parent,n=this.getText(),i=r.getStyle("font-family").getDefinition();if(i)for(var a=i.fontFace.unitsPerEm,o=_t.parse(e.ctx.font),u=r.getStyle("font-size").getNumber(o.fontSize),s=r.getStyle("font-style").getString(o.fontStyle),c=u/a,l=i.isRTL?n.split("").reverse().join(""):n,h=N(r.getAttribute("dx").getString()),f=l.length,y=0;y<f;y++){var g=this.getGlyph(i,l,y);t.translate(this.x,this.y),t.scale(c,-c);var p=t.lineWidth;t.lineWidth=t.lineWidth*a/u,"italic"===s&&t.transform(1,0,.4,1,0,0),g.render(t),"italic"===s&&t.transform(1,0,-.4,1,0,0),t.lineWidth=p,t.scale(1/c,-1/c),t.translate(-this.x,-this.y),this.x+=u*(g.horizAdvX||i.horizAdvX)/a,"undefined"===typeof h[y]||isNaN(h[y])||(this.x+=h[y])}else{var d=this.x,v=this.y;"stroke"===t.paintOrder?(t.strokeStyle&&t.strokeText(n,d,v),t.fillStyle&&t.fillText(n,d,v)):(t.fillStyle&&t.fillText(n,d,v),t.strokeStyle&&t.strokeText(n,d,v))}}},{key:"getAnchorDelta",value:function(t,e,r){var n=this.getStyle("text-anchor").getString("start");if("start"!==n){for(var i=e.children,a=i.length,o=null,u=0,s=r;s<a;s++){if(o=i[s],s>r&&o.getAttribute("x").hasValue()||o.getAttribute("text-anchor").hasValue())break;u+=o.measureTextRecursive(t)}return-1*("end"===n?u:u/2)}return 0}},{key:"adjustChildCoordinates",value:function(t,e,r,n){var i=r.children[n];if("function"!==typeof i.measureText)return i;t.save(),i.setContext(t,!0);var a=i.getAttribute("x"),o=i.getAttribute("y"),u=i.getAttribute("dx"),s=i.getAttribute("dy"),c=i.getAttribute("text-anchor").getString("start");if(0===n&&"textNode"!==i.type&&(a.hasValue()||a.setValue(e.getAttribute("x").getValue("0")),o.hasValue()||o.setValue(e.getAttribute("y").getValue("0")),u.hasValue()||u.setValue(e.getAttribute("dx").getValue("0")),s.hasValue()||s.setValue(e.getAttribute("dy").getValue("0"))),a.hasValue()){if(i.x=a.getPixels("x")+e.getAnchorDelta(t,r,n),"start"!==c){var l=i.measureTextRecursive(t);i.x+=-1*("end"===c?l:l/2)}u.hasValue()&&(i.x+=u.getPixels("x"))}else{if("start"!==c){var h=i.measureTextRecursive(t);e.x+=-1*("end"===c?h:h/2)}u.hasValue()&&(e.x+=u.getPixels("x")),i.x=e.x}return e.x=i.x+i.measureText(t),o.hasValue()?(i.y=o.getPixels("y"),s.hasValue()&&(i.y+=s.getPixels("y"))):(s.hasValue()&&(e.y+=s.getPixels("y")),i.y=e.y),e.y=i.y,i.clearContext(t),t.restore(),i}},{key:"getChildBoundingBox",value:function(t,e,r,n){var i=this.adjustChildCoordinates(t,e,r,n),a=i.getBoundingBox(t);return a?(i.children.forEach((function(r,n){var o=e.getChildBoundingBox(t,e,i,n);a.addBoundingBox(o)})),a):null}},{key:"renderChild",value:function(t,e,r,n){var i=this.adjustChildCoordinates(t,e,r,n);i.render(t),i.children.forEach((function(r,n){e.renderChild(t,e,i,n)}))}},{key:"measureTextRecursive",value:function(t){var e=this.children.reduce((function(e,r){return e+r.measureTextRecursive(t)}),this.measureText(t));return e}},{key:"measureText",value:function(t){var e=this.measureCache;if(~e)return e;var r=this.getText(),n=this.measureTargetText(t,r);return this.measureCache=n,n}},{key:"measureTargetText",value:function(t,e){if(!e.length)return 0;var r=this.parent,n=r.getStyle("font-family").getDefinition();if(n){for(var i=this.getFontSize(),a=n.isRTL?e.split("").reverse().join(""):e,o=N(r.getAttribute("dx").getString()),u=a.length,s=0,c=0;c<u;c++){var l=this.getGlyph(n,a,c);s+=(l.horizAdvX||n.horizAdvX)*i/n.fontFace.unitsPerEm,"undefined"===typeof o[c]||isNaN(o[c])||(s+=o[c])}return s}if(!t.measureText)return 10*e.length;t.save(),this.setContext(t,!0);var h=t.measureText(e),f=h.width;return this.clearContext(t),t.restore(),f}}]),r}(Xt);function Ut(t){return function(){var e,r=k()(t);if(Qt()){var n=k()(this).constructor;e=Reflect.construct(r,arguments,n)}else e=r.apply(this,arguments);return b()(this,e)}}function Qt(){if("undefined"===typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"===typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],(function(){}))),!0}catch(t){return!1}}var Zt=function(t){P()(r,t);var e=Ut(r);function r(t,n,i){var a;return f()(this,r),a=e.call(this,t,n,(this instanceof r?this.constructor:void 0)===r||i),a.type="tspan",a.text=a.children.length>0?"":a.getTextFromNode(),a}return g()(r,[{key:"getText",value:function(){return this.text}}]),r}(Yt);function Jt(t){return function(){var e,r=k()(t);if(Kt()){var n=k()(this).constructor;e=Reflect.construct(r,arguments,n)}else e=r.apply(this,arguments);return b()(this,e)}}function Kt(){if("undefined"===typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"===typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],(function(){}))),!0}catch(t){return!1}}var te=function(t){P()(r,t);var e=Jt(r);function r(){var t;return f()(this,r),t=e.apply(this,arguments),t.type="textNode",t}return r}(Zt);function ee(t){var e=t.replace(/,/gm," ").replace(/([MmZzLlHhVvCcSsQqTtAa])([^\s])/gm,"$1 $2").replace(/([MmZzLlHhVvCcSsQqTtAa])([^\s])/gm,"$1 $2").replace(/([^\s])([MmZzLlHhVvCcSsQqTtAa])/gm,"$1 $2").replace(/([0-9])([+\-])/gm,"$1 $2").replace(/(\.[0-9]*)(\.)/gm,"$1 $2").replace(/(\.[0-9]*)(\.)/gm,"$1 $2").replace(/([Aa](?:\s+(?:[0-9]*\.)?[0-9]+){3})\s+([01])\s*([01])/gm,"$1 $2 $3 ");return T(e).trim()}var re=function(){function t(e){f()(this,t),this.control=null,this.start=null,this.current=null,this.command="",this.tokens=[],this.i=-1,this.previousCommand="",this.points=[],this.angles=[],this.tokens=ee(e).split(" ")}return g()(t,[{key:"reset",value:function(){this.i=-1,this.command="",this.previousCommand="",this.start=new ct(0,0),this.control=new ct(0,0),this.current=new ct(0,0),this.points=[],this.angles=[]}},{key:"isEnd",value:function(){var t=this.i,e=this.tokens;return t>=e.length-1}},{key:"isCommandOrEnd",value:function(){if(this.isEnd())return!0;var t=this.i,e=this.tokens;return/^[A-Za-z]$/.test(e[t+1])}},{key:"isRelativeCommand",value:function(){switch(this.command){case"m":case"l":case"h":case"v":case"c":case"s":case"q":case"t":case"a":case"z":return!0;default:return!1}}},{key:"getToken",value:function(){return this.i++,this.tokens[this.i]}},{key:"getScalar",value:function(){return parseFloat(this.getToken())}},{key:"nextCommand",value:function(){this.previousCommand=this.command,this.command=this.getToken()}},{key:"getPoint",value:function(){var t=new ct(this.getScalar(),this.getScalar());return this.makeAbsolute(t)}},{key:"getAsControlPoint",value:function(){var t=this.getPoint();return this.control=t,t}},{key:"getAsCurrentPoint",value:function(){var t=this.getPoint();return this.current=t,t}},{key:"getReflectedControlPoint",value:function(){var t=this.previousCommand.toLowerCase();if("c"!==t&&"s"!==t&&"q"!==t&&"t"!==t)return this.current;var e=this.current,r=e.x,n=e.y,i=this.control,a=i.x,o=i.y,u=new ct(2*r-a,2*n-o);return u}},{key:"makeAbsolute",value:function(t){if(this.isRelativeCommand()){var e=this.current,r=e.x,n=e.y;t.x+=r,t.y+=n}return t}},{key:"addMarker",value:function(t,e,r){var n=this.points,i=this.angles;r&&i.length>0&&!i[i.length-1]&&(i[i.length-1]=n[n.length-1].angleTo(r)),this.addMarkerAngle(t,e?e.angleTo(t):null)}},{key:"addMarkerAngle",value:function(t,e){this.points.push(t),this.angles.push(e)}},{key:"getMarkerPoints",value:function(){return this.points}},{key:"getMarkerAngles",value:function(){for(var t=this.angles,e=t.length,r=0;r<e;r++)if(!t[r])for(var n=r+1;n<e;n++)if(t[n]){t[r]=t[n];break}return t}}]),t}();function ne(t){return function(){var e,r=k()(t);if(ie()){var n=k()(this).constructor;e=Reflect.construct(r,arguments,n)}else e=r.apply(this,arguments);return b()(this,e)}}function ie(){if("undefined"===typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"===typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],(function(){}))),!0}catch(t){return!1}}var ae=function(t){P()(r,t);var e=ne(r);function r(t,n,i){var a;return f()(this,r),a=e.call(this,t,n,i),a.type="path",a.pathParser=null,a.pathParser=new re(a.getAttribute("d").getString()),a}return g()(r,[{key:"path",value:function(t){var e=this.pathParser,r=new $t;e.reset(),t&&t.beginPath();while(!e.isEnd())switch(e.nextCommand(),e.command){case"M":case"m":this.pathM(t,r);break;case"L":case"l":this.pathL(t,r);break;case"H":case"h":this.pathH(t,r);break;case"V":case"v":this.pathV(t,r);break;case"C":case"c":this.pathC(t,r);break;case"S":case"s":this.pathS(t,r);break;case"Q":case"q":this.pathQ(t,r);break;case"T":case"t":this.pathT(t,r);break;case"A":case"a":this.pathA(t,r);break;case"Z":case"z":this.pathZ(t,r);break}return r}},{key:"getBoundingBox",value:function(t){return this.path()}},{key:"getMarkers",value:function(){var t=this.pathParser,e=t.getMarkerPoints(),r=t.getMarkerAngles(),n=e.map((function(t,e){return[t,r[e]]}));return n}},{key:"renderChildren",value:function(t){this.path(t),this.document.screen.mouse.checkPath(this,t);var e=this.getStyle("fill-rule");""!==t.fillStyle&&("inherit"!==e.getString("inherit")?t.fill(e.getString()):t.fill()),""!==t.strokeStyle&&t.stroke();var r=this.getMarkers();if(r){var n=r.length-1,a=this.getStyle("marker-start"),o=this.getStyle("marker-mid"),u=this.getStyle("marker-end");if(a.isUrlDefinition()){var s=a.getDefinition(),c=i()(r[0],2),l=c[0],h=c[1];s.render(t,l,h)}if(o.isUrlDefinition())for(var f=o.getDefinition(),y=1;y<n;y++){var g=i()(r[y],2),p=g[0],d=g[1];f.render(t,p,d)}if(u.isUrlDefinition()){var v=u.getDefinition(),m=i()(r[n],2),x=m[0],b=m[1];v.render(t,x,b)}}}},{key:"pathM",value:function(t,e){var r=this.pathParser,n=r.getAsCurrentPoint(),i=n.x,a=n.y;r.addMarker(n),e.addPoint(i,a),t&&t.moveTo(i,a),r.start=r.current;while(!r.isCommandOrEnd()){var o=r.getAsCurrentPoint(),u=o.x,s=o.y;r.addMarker(o,r.start),e.addPoint(u,s),t&&t.lineTo(u,s)}}},{key:"pathL",value:function(t,e){var r=this.pathParser;while(!r.isCommandOrEnd()){var n=r.current,i=r.getAsCurrentPoint(),a=i.x,o=i.y;r.addMarker(i,n),e.addPoint(a,o),t&&t.lineTo(a,o)}}},{key:"pathH",value:function(t,e){var r=this.pathParser;while(!r.isCommandOrEnd()){var n=r.current,i=new ct((r.isRelativeCommand()?n.x:0)+r.getScalar(),n.y);r.addMarker(i,n),r.current=i,e.addPoint(i.x,i.y),t&&t.lineTo(i.x,i.y)}}},{key:"pathV",value:function(t,e){var r=this.pathParser;while(!r.isCommandOrEnd()){var n=r.current,i=new ct(n.x,(r.isRelativeCommand()?n.y:0)+r.getScalar());r.addMarker(i,n),r.current=i,e.addPoint(i.x,i.y),t&&t.lineTo(i.x,i.y)}}},{key:"pathC",value:function(t,e){var r=this.pathParser;while(!r.isCommandOrEnd()){var n=r.current,i=r.getPoint(),a=r.getAsControlPoint(),o=r.getAsCurrentPoint();r.addMarker(o,a,i),e.addBezierCurve(n.x,n.y,i.x,i.y,a.x,a.y,o.x,o.y),t&&t.bezierCurveTo(i.x,i.y,a.x,a.y,o.x,o.y)}}},{key:"pathS",value:function(t,e){var r=this.pathParser;while(!r.isCommandOrEnd()){var n=r.current,i=r.getReflectedControlPoint(),a=r.getAsControlPoint(),o=r.getAsCurrentPoint();r.addMarker(o,a,i),e.addBezierCurve(n.x,n.y,i.x,i.y,a.x,a.y,o.x,o.y),t&&t.bezierCurveTo(i.x,i.y,a.x,a.y,o.x,o.y)}}},{key:"pathQ",value:function(t,e){var r=this.pathParser;while(!r.isCommandOrEnd()){var n=r.current,i=r.getAsControlPoint(),a=r.getAsCurrentPoint();r.addMarker(a,i,i),e.addQuadraticCurve(n.x,n.y,i.x,i.y,a.x,a.y),t&&t.quadraticCurveTo(i.x,i.y,a.x,a.y)}}},{key:"pathT",value:function(t,e){var r=this.pathParser;while(!r.isCommandOrEnd()){var n=r.current,i=r.getReflectedControlPoint();r.control=i;var a=r.getAsCurrentPoint();r.addMarker(a,i,i),e.addQuadraticCurve(n.x,n.y,i.x,i.y,a.x,a.y),t&&t.quadraticCurveTo(i.x,i.y,a.x,a.y)}}},{key:"pathA",value:function(t,e){var r=this.pathParser;while(!r.isCommandOrEnd()){var n=r.current,i=r.getScalar(),a=r.getScalar(),o=r.getScalar()*(Math.PI/180),u=r.getScalar(),s=r.getScalar(),c=r.getAsCurrentPoint(),l=new ct(Math.cos(o)*(n.x-c.x)/2+Math.sin(o)*(n.y-c.y)/2,-Math.sin(o)*(n.x-c.x)/2+Math.cos(o)*(n.y-c.y)/2),h=Math.pow(l.x,2)/Math.pow(i,2)+Math.pow(l.y,2)/Math.pow(a,2);h>1&&(i*=Math.sqrt(h),a*=Math.sqrt(h));var f=(u===s?-1:1)*Math.sqrt((Math.pow(i,2)*Math.pow(a,2)-Math.pow(i,2)*Math.pow(l.y,2)-Math.pow(a,2)*Math.pow(l.x,2))/(Math.pow(i,2)*Math.pow(l.y,2)+Math.pow(a,2)*Math.pow(l.x,2)));isNaN(f)&&(f=0);var y=new ct(f*i*l.y/a,f*-a*l.x/i),g=new ct((n.x+c.x)/2+Math.cos(o)*y.x-Math.sin(o)*y.y,(n.y+c.y)/2+Math.sin(o)*y.x+Math.cos(o)*y.y),p=J([1,0],[(l.x-y.x)/i,(l.y-y.y)/a]),d=[(l.x-y.x)/i,(l.y-y.y)/a],v=[(-l.x-y.x)/i,(-l.y-y.y)/a],m=J(d,v);Z(d,v)<=-1&&(m=Math.PI),Z(d,v)>=1&&(m=0);var x=1-s?1:-1,b=p+x*(m/2),w=new ct(g.x+i*Math.cos(b),g.y+a*Math.sin(b));if(r.addMarkerAngle(w,b-x*Math.PI/2),r.addMarkerAngle(c,b-x*Math.PI),e.addPoint(c.x,c.y),t&&!isNaN(p)&&!isNaN(m)){var k=i>a?i:a,S=i>a?1:i/a,P=i>a?a/i:1;t.translate(g.x,g.y),t.rotate(o),t.scale(S,P),t.arc(0,0,k,p,p+m,Boolean(1-s)),t.scale(1/S,1/P),t.rotate(-o),t.translate(-g.x,-g.y)}}}},{key:"pathZ",value:function(t,e){var r=this.pathParser;t&&e.x1!==e.x2&&e.y1!==e.y2&&t.closePath(),r.current=r.start}}]),r}(Xt);function oe(t){return function(){var e,r=k()(t);if(ue()){var n=k()(this).constructor;e=Reflect.construct(r,arguments,n)}else e=r.apply(this,arguments);return b()(this,e)}}function ue(){if("undefined"===typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"===typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],(function(){}))),!0}catch(t){return!1}}var se=function(t){P()(r,t);var e=oe(r);function r(){var t;return f()(this,r),t=e.apply(this,arguments),t.type="svg",t.root=!1,t}return g()(r,[{key:"clearContext",value:function(t){M()(k()(r.prototype),"clearContext",this).call(this,t),this.document.screen.viewPort.removeCurrent()}},{key:"setContext",value:function(t){var e=this.document,n=e.screen,i=e.window,a=t.canvas;if(n.setDefaults(t),a.style&&"undefined"!==typeof t.font&&i&&"undefined"!==typeof i.getComputedStyle){t.font=i.getComputedStyle(a).getPropertyValue("font");var o=new ut(e,"fontSize",_t.parse(t.font).fontSize);o.hasValue()&&(e.rootEmSize=o.getPixels("y"),e.emSize=e.rootEmSize)}M()(k()(r.prototype),"setContext",this).call(this,t),this.getAttribute("x").hasValue()||this.getAttribute("x",!0).setValue(0),this.getAttribute("y").hasValue()||this.getAttribute("y",!0).setValue(0),t.translate(this.getAttribute("x").getPixels("x"),this.getAttribute("y").getPixels("y"));var u=n.viewPort,s=u.width,c=u.height;this.getStyle("width").hasValue()||this.getStyle("width",!0).setValue("100%"),this.getStyle("height").hasValue()||this.getStyle("height",!0).setValue("100%"),this.getStyle("color").hasValue()||this.getStyle("color",!0).setValue("black");var l=this.getAttribute("refX"),h=this.getAttribute("refY"),f=this.getAttribute("viewBox"),y=f.hasValue()?N(f.getString()):null,g=!this.root&&"visible"!==this.getAttribute("overflow").getValue("hidden"),p=0,d=0,v=0,m=0;y&&(p=y[0],d=y[1]),this.root||(s=this.getStyle("width").getPixels("x"),c=this.getStyle("height").getPixels("y"),"marker"===this.type&&(v=p,m=d,p=0,d=0)),n.viewPort.setCurrent(s,c),y&&(s=y[2],c=y[3]),e.setViewBox({ctx:t,aspectRatio:this.getAttribute("preserveAspectRatio").getString(),width:n.viewPort.width,desiredWidth:s,height:n.viewPort.height,desiredHeight:c,minX:p,minY:d,refX:l.getValue(),refY:h.getValue(),clip:g,clipX:v,clipY:m}),y&&(n.viewPort.removeCurrent(),n.viewPort.setCurrent(s,c))}},{key:"resize",value:function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:t,r=arguments.length>2&&void 0!==arguments[2]&&arguments[2],n=this.getAttribute("width",!0),i=this.getAttribute("height",!0),a=this.getAttribute("viewBox"),o=this.getAttribute("style"),u=n.getNumber(0),s=i.getNumber(0);if(r)if("string"===typeof r)this.getAttribute("preserveAspectRatio",!0).setValue(r);else{var c=this.getAttribute("preserveAspectRatio");c.hasValue()&&c.setValue(c.getString().replace(/^\s*(\S.*\S)\s*$/,"$1"))}if(n.setValue(t),i.setValue(e),a.hasValue()||a.setValue("0 0 ".concat(u||t," ").concat(s||e)),o.hasValue()){var l=this.getStyle("width"),h=this.getStyle("height");l.hasValue()&&l.setValue("".concat(t,"px")),h.hasValue()&&h.setValue("".concat(e,"px"))}}}]),r}(Xt);function ce(t){return function(){var e,r=k()(t);if(le()){var n=k()(this).constructor;e=Reflect.construct(r,arguments,n)}else e=r.apply(this,arguments);return b()(this,e)}}function le(){if("undefined"===typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"===typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],(function(){}))),!0}catch(t){return!1}}var he=function(t){P()(r,t);var e=ce(r);function r(){var t;return f()(this,r),t=e.apply(this,arguments),t.type="rect",t}return g()(r,[{key:"path",value:function(t){var e=this.getAttribute("x").getPixels("x"),r=this.getAttribute("y").getPixels("y"),n=this.getStyle("width").getPixels("x"),i=this.getStyle("height").getPixels("y"),a=this.getAttribute("rx"),o=this.getAttribute("ry"),u=a.getPixels("x"),s=o.getPixels("y");if(a.hasValue()&&!o.hasValue()&&(s=u),o.hasValue()&&!a.hasValue()&&(u=s),u=Math.min(u,n/2),s=Math.min(s,i/2),t){var c=(Math.sqrt(2)-1)/3*4;t.beginPath(),i>0&&n>0&&(t.moveTo(e+u,r),t.lineTo(e+n-u,r),t.bezierCurveTo(e+n-u+c*u,r,e+n,r+s-c*s,e+n,r+s),t.lineTo(e+n,r+i-s),t.bezierCurveTo(e+n,r+i-s+c*s,e+n-u+c*u,r+i,e+n-u,r+i),t.lineTo(e+u,r+i),t.bezierCurveTo(e+u-c*u,r+i,e,r+i-s+c*s,e,r+i-s),t.lineTo(e,r+s),t.bezierCurveTo(e,r+s-c*s,e+u-c*u,r,e+u,r),t.closePath())}return new $t(e,r,e+n,r+i)}},{key:"getMarkers",value:function(){return null}}]),r}(ae);function fe(t){return function(){var e,r=k()(t);if(ye()){var n=k()(this).constructor;e=Reflect.construct(r,arguments,n)}else e=r.apply(this,arguments);return b()(this,e)}}function ye(){if("undefined"===typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"===typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],(function(){}))),!0}catch(t){return!1}}var ge=function(t){P()(r,t);var e=fe(r);function r(){var t;return f()(this,r),t=e.apply(this,arguments),t.type="circle",t}return g()(r,[{key:"path",value:function(t){var e=this.getAttribute("cx").getPixels("x"),r=this.getAttribute("cy").getPixels("y"),n=this.getAttribute("r").getPixels();return t&&n>0&&(t.beginPath(),t.arc(e,r,n,0,2*Math.PI,!1),t.closePath()),new $t(e-n,r-n,e+n,r+n)}},{key:"getMarkers",value:function(){return null}}]),r}(ae);function pe(t){return function(){var e,r=k()(t);if(de()){var n=k()(this).constructor;e=Reflect.construct(r,arguments,n)}else e=r.apply(this,arguments);return b()(this,e)}}function de(){if("undefined"===typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"===typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],(function(){}))),!0}catch(t){return!1}}var ve=function(t){P()(r,t);var e=pe(r);function r(){var t;return f()(this,r),t=e.apply(this,arguments),t.type="ellipse",t}return g()(r,[{key:"path",value:function(t){var e=(Math.sqrt(2)-1)/3*4,r=this.getAttribute("rx").getPixels("x"),n=this.getAttribute("ry").getPixels("y"),i=this.getAttribute("cx").getPixels("x"),a=this.getAttribute("cy").getPixels("y");return t&&r>0&&n>0&&(t.beginPath(),t.moveTo(i+r,a),t.bezierCurveTo(i+r,a+e*n,i+e*r,a+n,i,a+n),t.bezierCurveTo(i-e*r,a+n,i-r,a+e*n,i-r,a),t.bezierCurveTo(i-r,a-e*n,i-e*r,a-n,i,a-n),t.bezierCurveTo(i+e*r,a-n,i+r,a-e*n,i+r,a),t.closePath()),new $t(i-r,a-n,i+r,a+n)}},{key:"getMarkers",value:function(){return null}}]),r}(ae);function me(t){return function(){var e,r=k()(t);if(xe()){var n=k()(this).constructor;e=Reflect.construct(r,arguments,n)}else e=r.apply(this,arguments);return b()(this,e)}}function xe(){if("undefined"===typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"===typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],(function(){}))),!0}catch(t){return!1}}var be=function(t){P()(r,t);var e=me(r);function r(){var t;return f()(this,r),t=e.apply(this,arguments),t.type="line",t}return g()(r,[{key:"getPoints",value:function(){return[new ct(this.getAttribute("x1").getPixels("x"),this.getAttribute("y1").getPixels("y")),new ct(this.getAttribute("x2").getPixels("x"),this.getAttribute("y2").getPixels("y"))]}},{key:"path",value:function(t){var e=this.getPoints(),r=i()(e,2),n=r[0],a=n.x,o=n.y,u=r[1],s=u.x,c=u.y;return t&&(t.beginPath(),t.moveTo(a,o),t.lineTo(s,c)),new $t(a,o,s,c)}},{key:"getMarkers",value:function(){var t=this.getPoints(),e=i()(t,2),r=e[0],n=e[1],a=r.angleTo(n);return[[r,a],[n,a]]}}]),r}(ae);function we(t){return function(){var e,r=k()(t);if(ke()){var n=k()(this).constructor;e=Reflect.construct(r,arguments,n)}else e=r.apply(this,arguments);return b()(this,e)}}function ke(){if("undefined"===typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"===typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],(function(){}))),!0}catch(t){return!1}}var Se=function(t){P()(r,t);var e=we(r);function r(t,n,i){var a;return f()(this,r),a=e.call(this,t,n,i),a.type="polyline",a.points=[],a.points=ct.parsePath(a.getAttribute("points").getString()),a}return g()(r,[{key:"path",value:function(t){var e=this.points,r=i()(e,1),n=r[0],a=n.x,o=n.y,u=new $t(a,o);return t&&(t.beginPath(),t.moveTo(a,o)),e.forEach((function(e){var r=e.x,n=e.y;u.addPoint(r,n),t&&t.lineTo(r,n)})),u}},{key:"getMarkers",value:function(){var t=this.points,e=t.length-1,r=[];return t.forEach((function(n,i){i!==e&&r.push([n,n.angleTo(t[i+1])])})),r.length>0&&r.push([t[t.length-1],r[r.length-1][1]]),r}}]),r}(ae);function Pe(t){return function(){var e,r=k()(t);if(Re()){var n=k()(this).constructor;e=Reflect.construct(r,arguments,n)}else e=r.apply(this,arguments);return b()(this,e)}}function Re(){if("undefined"===typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"===typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],(function(){}))),!0}catch(t){return!1}}var Ae=function(t){P()(r,t);var e=Pe(r);function r(){var t;return f()(this,r),t=e.apply(this,arguments),t.type="polygon",t}return g()(r,[{key:"path",value:function(t){var e=M()(k()(r.prototype),"path",this).call(this,t),n=i()(this.points,1),a=n[0],o=a.x,u=a.y;return t&&(t.lineTo(o,u),t.closePath()),e}}]),r}(Se);function Ce(t){return function(){var e,r=k()(t);if(Me()){var n=k()(this).constructor;e=Reflect.construct(r,arguments,n)}else e=r.apply(this,arguments);return b()(this,e)}}function Me(){if("undefined"===typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"===typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],(function(){}))),!0}catch(t){return!1}}var Ee=function(t){P()(r,t);var e=Ce(r);function r(){var t;return f()(this,r),t=e.apply(this,arguments),t.type="pattern",t}return g()(r,[{key:"createPattern",value:function(t,e,r){var n=this.getStyle("width").getPixels("x",!0),i=this.getStyle("height").getPixels("y",!0),a=new se(this.document,null);a.attributes.viewBox=new ut(this.document,"viewBox",this.getAttribute("viewBox").getValue()),a.attributes.width=new ut(this.document,"width","".concat(n,"px")),a.attributes.height=new ut(this.document,"height","".concat(i,"px")),a.attributes.transform=new ut(this.document,"transform",this.getAttribute("patternTransform").getValue()),a.children=this.children;var o=this.document.createCanvas(n,i),u=o.getContext("2d"),s=this.getAttribute("x"),c=this.getAttribute("y");s.hasValue()&&c.hasValue()&&u.translate(s.getPixels("x",!0),c.getPixels("y",!0)),r.hasValue()?this.styles["fill-opacity"]=r:Reflect.deleteProperty(this.styles,"fill-opacity");for(var l=-1;l<=1;l++)for(var h=-1;h<=1;h++)u.save(),a.attributes.x=new ut(this.document,"x",l*o.width),a.attributes.y=new ut(this.document,"y",h*o.height),a.render(u),u.restore();var f=t.createPattern(o,"repeat");return f}}]),r}(Ot);function Ve(t){return function(){var e,r=k()(t);if(De()){var n=k()(this).constructor;e=Reflect.construct(r,arguments,n)}else e=r.apply(this,arguments);return b()(this,e)}}function De(){if("undefined"===typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"===typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],(function(){}))),!0}catch(t){return!1}}var Te=function(t){P()(r,t);var e=Ve(r);function r(){var t;return f()(this,r),t=e.apply(this,arguments),t.type="marker",t}return g()(r,[{key:"render",value:function(t,e,r){if(e){var n=e.x,i=e.y,a=this.getAttribute("orient").getValue("auto"),o=this.getAttribute("markerUnits").getValue("strokeWidth");t.translate(n,i),"auto"===a&&t.rotate(r),"strokeWidth"===o&&t.scale(t.lineWidth,t.lineWidth),t.save();var u=new se(this.document,null);u.type=this.type,u.attributes.viewBox=new ut(this.document,"viewBox",this.getAttribute("viewBox").getValue()),u.attributes.refX=new ut(this.document,"refX",this.getAttribute("refX").getValue()),u.attributes.refY=new ut(this.document,"refY",this.getAttribute("refY").getValue()),u.attributes.width=new ut(this.document,"width",this.getAttribute("markerWidth").getValue()),u.attributes.height=new ut(this.document,"height",this.getAttribute("markerHeight").getValue()),u.attributes.overflow=new ut(this.document,"overflow",this.getAttribute("overflow").getValue()),u.attributes.fill=new ut(this.document,"fill",this.getAttribute("fill").getColor("black")),u.attributes.stroke=new ut(this.document,"stroke",this.getAttribute("stroke").getValue("none")),u.children=this.children,u.render(t),t.restore(),"strokeWidth"===o&&t.scale(1/t.lineWidth,1/t.lineWidth),"auto"===a&&t.rotate(-r),t.translate(-n,-i)}}}]),r}(Ot);function Oe(t){return function(){var e,r=k()(t);if(Le()){var n=k()(this).constructor;e=Reflect.construct(r,arguments,n)}else e=r.apply(this,arguments);return b()(this,e)}}function Le(){if("undefined"===typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"===typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],(function(){}))),!0}catch(t){return!1}}var Ne=function(t){P()(r,t);var e=Oe(r);function r(){var t;return f()(this,r),t=e.apply(this,arguments),t.type="defs",t}return g()(r,[{key:"render",value:function(){}}]),r}(Ot);function ze(t){return function(){var e,r=k()(t);if(Be()){var n=k()(this).constructor;e=Reflect.construct(r,arguments,n)}else e=r.apply(this,arguments);return b()(this,e)}}function Be(){if("undefined"===typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"===typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],(function(){}))),!0}catch(t){return!1}}var Ie=function(t){P()(r,t);var e=ze(r);function r(){var t;return f()(this,r),t=e.apply(this,arguments),t.type="g",t}return g()(r,[{key:"getBoundingBox",value:function(t){var e=new $t;return this.children.forEach((function(r){e.addBoundingBox(r.getBoundingBox(t))})),e}}]),r}(Xt);function Fe(t){return function(){var e,r=k()(t);if(je()){var n=k()(this).constructor;e=Reflect.construct(r,arguments,n)}else e=r.apply(this,arguments);return b()(this,e)}}function je(){if("undefined"===typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"===typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],(function(){}))),!0}catch(t){return!1}}var _e=function(t){P()(r,t);var e=Fe(r);function r(t,n,i){var a;f()(this,r),a=e.call(this,t,n,i),a.attributesToInherit=["gradientUnits"],a.stops=[];var o=V()(a),u=o.stops,s=o.children;return s.forEach((function(t){"stop"===t.type&&u.push(t)})),a}return g()(r,[{key:"getGradientUnits",value:function(){return this.getAttribute("gradientUnits").getString("objectBoundingBox")}},{key:"createGradient",value:function(t,e,r){var n=this,a=this;this.getHrefAttribute().hasValue()&&(a=this.getHrefAttribute().getDefinition(),this.inheritStopContainer(a));var o=a,u=o.stops,s=this.getGradient(t,e);if(!s)return this.addParentOpacity(r,u[u.length-1].color);if(u.forEach((function(t){s.addColorStop(t.offset,n.addParentOpacity(r,t.color))})),this.getAttribute("gradientTransform").hasValue()){var c=this.document,l=c.screen,h=l.MAX_VIRTUAL_PIXELS,f=l.viewPort,y=i()(f.viewPorts,1),g=y[0],p=new he(c,null);p.attributes.x=new ut(c,"x",-h/3),p.attributes.y=new ut(c,"y",-h/3),p.attributes.width=new ut(c,"width",h),p.attributes.height=new ut(c,"height",h);var d=new Ie(c,null);d.attributes.transform=new ut(c,"transform",this.getAttribute("gradientTransform").getValue()),d.children=[p];var v=new se(c,null);v.attributes.x=new ut(c,"x",0),v.attributes.y=new ut(c,"y",0),v.attributes.width=new ut(c,"width",g.width),v.attributes.height=new ut(c,"height",g.height),v.children=[d];var m=c.createCanvas(g.width,g.height),x=m.getContext("2d");return x.fillStyle=s,v.render(x),x.createPattern(m,"no-repeat")}return s}},{key:"inheritStopContainer",value:function(t){var e=this;this.attributesToInherit.forEach((function(r){!e.getAttribute(r).hasValue()&&t.getAttribute(r).hasValue()&&e.getAttribute(r,!0).setValue(t.getAttribute(r).getValue())}))}},{key:"addParentOpacity",value:function(t,e){if(t.hasValue()){var r=new ut(this.document,"color",e);return r.addOpacity(t).getColor()}return e}}]),r}(Ot);function $e(t){return function(){var e,r=k()(t);if(qe()){var n=k()(this).constructor;e=Reflect.construct(r,arguments,n)}else e=r.apply(this,arguments);return b()(this,e)}}function qe(){if("undefined"===typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"===typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],(function(){}))),!0}catch(t){return!1}}var Ge=function(t){P()(r,t);var e=$e(r);function r(t,n,i){var a;return f()(this,r),a=e.call(this,t,n,i),a.type="linearGradient",a.attributesToInherit.push("x1","y1","x2","y2"),a}return g()(r,[{key:"getGradient",value:function(t,e){var r="objectBoundingBox"===this.getGradientUnits(),n=r?e.getBoundingBox(t):null;if(r&&!n)return null;this.getAttribute("x1").hasValue()||this.getAttribute("y1").hasValue()||this.getAttribute("x2").hasValue()||this.getAttribute("y2").hasValue()||(this.getAttribute("x1",!0).setValue(0),this.getAttribute("y1",!0).setValue(0),this.getAttribute("x2",!0).setValue(1),this.getAttribute("y2",!0).setValue(0));var i=r?n.x+n.width*this.getAttribute("x1").getNumber():this.getAttribute("x1").getPixels("x"),a=r?n.y+n.height*this.getAttribute("y1").getNumber():this.getAttribute("y1").getPixels("y"),o=r?n.x+n.width*this.getAttribute("x2").getNumber():this.getAttribute("x2").getPixels("x"),u=r?n.y+n.height*this.getAttribute("y2").getNumber():this.getAttribute("y2").getPixels("y");return i===o&&a===u?null:t.createLinearGradient(i,a,o,u)}}]),r}(_e);function Xe(t){return function(){var e,r=k()(t);if(We()){var n=k()(this).constructor;e=Reflect.construct(r,arguments,n)}else e=r.apply(this,arguments);return b()(this,e)}}function We(){if("undefined"===typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"===typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],(function(){}))),!0}catch(t){return!1}}var He=function(t){P()(r,t);var e=Xe(r);function r(t,n,i){var a;return f()(this,r),a=e.call(this,t,n,i),a.type="radialGradient",a.attributesToInherit.push("cx","cy","r","fx","fy","fr"),a}return g()(r,[{key:"getGradient",value:function(t,e){var r="objectBoundingBox"===this.getGradientUnits(),n=e.getBoundingBox(t);if(r&&!n)return null;this.getAttribute("cx").hasValue()||this.getAttribute("cx",!0).setValue("50%"),this.getAttribute("cy").hasValue()||this.getAttribute("cy",!0).setValue("50%"),this.getAttribute("r").hasValue()||this.getAttribute("r",!0).setValue("50%");var i=r?n.x+n.width*this.getAttribute("cx").getNumber():this.getAttribute("cx").getPixels("x"),a=r?n.y+n.height*this.getAttribute("cy").getNumber():this.getAttribute("cy").getPixels("y"),o=i,u=a;this.getAttribute("fx").hasValue()&&(o=r?n.x+n.width*this.getAttribute("fx").getNumber():this.getAttribute("fx").getPixels("x")),this.getAttribute("fy").hasValue()&&(u=r?n.y+n.height*this.getAttribute("fy").getNumber():this.getAttribute("fy").getPixels("y"));var s=r?(n.width+n.height)/2*this.getAttribute("r").getNumber():this.getAttribute("r").getPixels(),c=this.getAttribute("fr").getPixels();return t.createRadialGradient(o,u,c,i,a,s)}}]),r}(_e);function Ye(t){return function(){var e,r=k()(t);if(Ue()){var n=k()(this).constructor;e=Reflect.construct(r,arguments,n)}else e=r.apply(this,arguments);return b()(this,e)}}function Ue(){if("undefined"===typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"===typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],(function(){}))),!0}catch(t){return!1}}var Qe=function(t){P()(r,t);var e=Ye(r);function r(t,n,i){var a;f()(this,r),a=e.call(this,t,n,i),a.type="stop";var o=Math.max(0,Math.min(1,a.getAttribute("offset").getNumber())),u=a.getStyle("stop-opacity"),s=a.getStyle("stop-color",!0);return""===s.getString()&&s.setValue("#000"),u.hasValue()&&(s=s.addOpacity(u)),a.offset=o,a.color=s.getColor(),a}return r}(Ot);function Ze(t){return function(){var e,r=k()(t);if(Je()){var n=k()(this).constructor;e=Reflect.construct(r,arguments,n)}else e=r.apply(this,arguments);return b()(this,e)}}function Je(){if("undefined"===typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"===typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],(function(){}))),!0}catch(t){return!1}}var Ke=function(t){P()(r,t);var e=Ze(r);function r(t,n,i){var a;return f()(this,r),a=e.call(this,t,n,i),a.type="animate",a.duration=0,a.initialValue=null,a.initialUnits="",a.removed=!1,a.frozen=!1,t.screen.animations.push(V()(a)),a.begin=a.getAttribute("begin").getMilliseconds(),a.maxDuration=a.begin+a.getAttribute("dur").getMilliseconds(),a.from=a.getAttribute("from"),a.to=a.getAttribute("to"),a.values=a.getAttribute("values"),a.values.hasValue()&&a.values.setValue(a.values.getString().split(";")),a}return g()(r,[{key:"getProperty",value:function(){var t=this.getAttribute("attributeType").getString(),e=this.getAttribute("attributeName").getString();return"CSS"===t?this.parent.getStyle(e,!0):this.parent.getAttribute(e,!0)}},{key:"calcValue",value:function(){var t=this.initialUnits,e=this.getProgress(),r=e.progress,n=e.from,i=e.to,a=n.getNumber()+(i.getNumber()-n.getNumber())*r;return"%"===t&&(a*=100),"".concat(a).concat(t)}},{key:"update",value:function(t){var e=this.parent,r=this.getProperty();if(this.initialValue||(this.initialValue=r.getString(),this.initialUnits=r.getUnits()),this.duration>this.maxDuration){var n=this.getAttribute("fill").getString("remove");if("indefinite"===this.getAttribute("repeatCount").getString()||"indefinite"===this.getAttribute("repeatDur").getString())this.duration=0;else if("freeze"!==n||this.frozen){if("remove"===n&&!this.removed)return this.removed=!0,r.setValue(e.animationFrozen?e.animationFrozenValue:this.initialValue),!0}else this.frozen=!0,e.animationFrozen=!0,e.animationFrozenValue=r.getString();return!1}this.duration+=t;var i=!1;if(this.begin<this.duration){var a=this.calcValue(),o=this.getAttribute("type");if(o.hasValue()){var u=o.getString();a="".concat(u,"(").concat(a,")")}r.setValue(a),i=!0}return i}},{key:"getProgress",value:function(){var t=this.document,e=this.values,r={progress:(this.duration-this.begin)/(this.maxDuration-this.begin)};if(e.hasValue()){var n=r.progress*(e.getValue().length-1),i=Math.floor(n),a=Math.ceil(n);r.from=new ut(t,"from",parseFloat(e.getValue()[i])),r.to=new ut(t,"to",parseFloat(e.getValue()[a])),r.progress=(n-i)/(a-i)}else r.from=this.from,r.to=this.to;return r}}]),r}(Ot);function tr(t){return function(){var e,r=k()(t);if(er()){var n=k()(this).constructor;e=Reflect.construct(r,arguments,n)}else e=r.apply(this,arguments);return b()(this,e)}}function er(){if("undefined"===typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"===typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],(function(){}))),!0}catch(t){return!1}}var rr=function(t){P()(r,t);var e=tr(r);function r(){var t;return f()(this,r),t=e.apply(this,arguments),t.type="animateColor",t}return g()(r,[{key:"calcValue",value:function(){var t=this.getProgress(),e=t.progress,r=t.from,n=t.to,i=new m.a(r.getColor()),a=new m.a(n.getColor());if(i.ok&&a.ok){var o=i.r+(a.r-i.r)*e,u=i.g+(a.g-i.g)*e,s=i.b+(a.b-i.b)*e;return"rgb(".concat(parseInt(o,10),", ").concat(parseInt(u,10),", ").concat(parseInt(s,10),")")}return this.getAttribute("from").getColor()}}]),r}(Ke);function nr(t){return function(){var e,r=k()(t);if(ir()){var n=k()(this).constructor;e=Reflect.construct(r,arguments,n)}else e=r.apply(this,arguments);return b()(this,e)}}function ir(){if("undefined"===typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"===typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],(function(){}))),!0}catch(t){return!1}}var ar=function(t){P()(r,t);var e=nr(r);function r(){var t;return f()(this,r),t=e.apply(this,arguments),t.type="animateTransform",t}return g()(r,[{key:"calcValue",value:function(){var t=this.getProgress(),e=t.progress,r=t.from,n=t.to,i=N(r.getString()),a=N(n.getString()),o=i.map((function(t,r){var n=a[r];return t+(n-t)*e})).join(" ");return o}}]),r}(Ke);function or(t){if("undefined"===typeof Symbol||null==t[Symbol.iterator]){if(Array.isArray(t)||(t=ur(t))){var e=0,r=function(){};return{s:r,n:function(){return e>=t.length?{done:!0}:{done:!1,value:t[e++]}},e:function(t){throw t},f:r}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var n,i,a=!0,o=!1;return{s:function(){n=t[Symbol.iterator]()},n:function(){var t=n.next();return a=t.done,t},e:function(t){o=!0,i=t},f:function(){try{a||null==n.return||n.return()}finally{if(o)throw i}}}}function ur(t,e){if(t){if("string"===typeof t)return sr(t,e);var r=Object.prototype.toString.call(t).slice(8,-1);return"Object"===r&&t.constructor&&(r=t.constructor.name),"Map"===r||"Set"===r?Array.from(r):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?sr(t,e):void 0}}function sr(t,e){(null==e||e>t.length)&&(e=t.length);for(var r=0,n=new Array(e);r<e;r++)n[r]=t[r];return n}function cr(t){return function(){var e,r=k()(t);if(lr()){var n=k()(this).constructor;e=Reflect.construct(r,arguments,n)}else e=r.apply(this,arguments);return b()(this,e)}}function lr(){if("undefined"===typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"===typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],(function(){}))),!0}catch(t){return!1}}var hr=function(t){P()(r,t);var e=cr(r);function r(t,n,i){var a;f()(this,r),a=e.call(this,t,n,i),a.type="font",a.glyphs={},a.horizAdvX=a.getAttribute("horiz-adv-x").getNumber();var o,u=t.definitions,s=V()(a),c=s.children,l=or(c);try{for(l.s();!(o=l.n()).done;){var h=o.value;switch(h.type){case"font-face":a.fontFace=h;var y=h.getStyle("font-family");y.hasValue()&&(u[y.getString()]=V()(a));break;case"missing-glyph":a.missingGlyph=h;break;case"glyph":var g=h;g.arabicForm?(a.isRTL=!0,a.isArabic=!0,"undefined"===typeof a.glyphs[g.unicode]&&(a.glyphs[g.unicode]={}),a.glyphs[g.unicode][g.arabicForm]=g):a.glyphs[g.unicode]=g;break;default:}}}catch(p){l.e(p)}finally{l.f()}return a}return g()(r,[{key:"render",value:function(){}}]),r}(Ot);function fr(t){return function(){var e,r=k()(t);if(yr()){var n=k()(this).constructor;e=Reflect.construct(r,arguments,n)}else e=r.apply(this,arguments);return b()(this,e)}}function yr(){if("undefined"===typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"===typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],(function(){}))),!0}catch(t){return!1}}var gr=function(t){P()(r,t);var e=fr(r);function r(t,n,i){var a;return f()(this,r),a=e.call(this,t,n,i),a.type="font-face",a.ascent=a.getAttribute("ascent").getNumber(),a.descent=a.getAttribute("descent").getNumber(),a.unitsPerEm=a.getAttribute("units-per-em").getNumber(),a}return r}(Ot);function pr(t){return function(){var e,r=k()(t);if(dr()){var n=k()(this).constructor;e=Reflect.construct(r,arguments,n)}else e=r.apply(this,arguments);return b()(this,e)}}function dr(){if("undefined"===typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"===typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],(function(){}))),!0}catch(t){return!1}}var vr=function(t){P()(r,t);var e=pr(r);function r(){var t;return f()(this,r),t=e.apply(this,arguments),t.type="missing-glyph",t.horizAdvX=0,t}return r}(ae);function mr(t){return function(){var e,r=k()(t);if(xr()){var n=k()(this).constructor;e=Reflect.construct(r,arguments,n)}else e=r.apply(this,arguments);return b()(this,e)}}function xr(){if("undefined"===typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"===typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],(function(){}))),!0}catch(t){return!1}}var br=function(t){P()(r,t);var e=mr(r);function r(t,n,i){var a;return f()(this,r),a=e.call(this,t,n,i),a.type="glyph",a.horizAdvX=a.getAttribute("horiz-adv-x").getNumber(),a.unicode=a.getAttribute("unicode").getString(),a.arabicForm=a.getAttribute("arabic-form").getString(),a}return r}(ae);function wr(t){return function(){var e,r=k()(t);if(kr()){var n=k()(this).constructor;e=Reflect.construct(r,arguments,n)}else e=r.apply(this,arguments);return b()(this,e)}}function kr(){if("undefined"===typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"===typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],(function(){}))),!0}catch(t){return!1}}var Sr=function(t){P()(r,t);var e=wr(r);function r(){var t;return f()(this,r),t=e.apply(this,arguments),t.type="tref",t}return g()(r,[{key:"getText",value:function(){var t=this.getHrefAttribute().getDefinition();if(t){var e=t.children[0];if(e)return e.getText()}return""}}]),r}(Yt);function Pr(t){return function(){var e,r=k()(t);if(Rr()){var n=k()(this).constructor;e=Reflect.construct(r,arguments,n)}else e=r.apply(this,arguments);return b()(this,e)}}function Rr(){if("undefined"===typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"===typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],(function(){}))),!0}catch(t){return!1}}var Ar=function(t){P()(r,t);var e=Pr(r);function r(t,n,i){var a;f()(this,r),a=e.call(this,t,n,i),a.type="a";var o=n.childNodes,u=o[0],s=o.length>0&&Array.from(o).every((function(t){return 3===t.nodeType}));return a.hasText=s,a.text=s?a.getTextFromNode(u):"",a}return g()(r,[{key:"getText",value:function(){return this.text}},{key:"renderChildren",value:function(t){if(this.hasText){M()(k()(r.prototype),"renderChildren",this).call(this,t);var e=this.document,n=this.x,i=this.y,a=e.screen.mouse,o=new ut(e,"fontSize",_t.parse(e.ctx.font).fontSize);a.isWorking()&&a.checkBoundingBox(this,new $t(n,i-o.getPixels("y"),n+this.measureText(t),i))}else if(this.children.length>0){var u=new Ie(this.document,null);u.children=this.children,u.parent=this,u.render(t)}}},{key:"onClick",value:function(){var t=this.document.window;t&&t.open(this.getHrefAttribute().getString())}},{key:"onMouseMove",value:function(){var t=this.document.ctx;t.canvas.style.cursor="pointer"}}]),r}(Yt);function Cr(t){if("undefined"===typeof Symbol||null==t[Symbol.iterator]){if(Array.isArray(t)||(t=Mr(t))){var e=0,r=function(){};return{s:r,n:function(){return e>=t.length?{done:!0}:{done:!1,value:t[e++]}},e:function(t){throw t},f:r}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var n,i,a=!0,o=!1;return{s:function(){n=t[Symbol.iterator]()},n:function(){var t=n.next();return a=t.done,t},e:function(t){o=!0,i=t},f:function(){try{a||null==n.return||n.return()}finally{if(o)throw i}}}}function Mr(t,e){if(t){if("string"===typeof t)return Er(t,e);var r=Object.prototype.toString.call(t).slice(8,-1);return"Object"===r&&t.constructor&&(r=t.constructor.name),"Map"===r||"Set"===r?Array.from(r):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?Er(t,e):void 0}}function Er(t,e){(null==e||e>t.length)&&(e=t.length);for(var r=0,n=new Array(e);r<e;r++)n[r]=t[r];return n}function Vr(t){return function(){var e,r=k()(t);if(Dr()){var n=k()(this).constructor;e=Reflect.construct(r,arguments,n)}else e=r.apply(this,arguments);return b()(this,e)}}function Dr(){if("undefined"===typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"===typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],(function(){}))),!0}catch(t){return!1}}var Tr=function(t){P()(r,t);var e=Vr(r);function r(t,n,i){var a;f()(this,r),a=e.call(this,t,n,i),a.type="textPath",a.textWidth=0,a.textHeight=0,a.pathLength=-1,a.glyphInfo=null,a.letterSpacingCache=[],a.measuresCache=new Map([["",0]]);var o=a.getHrefAttribute().getDefinition();return a.text=a.getTextFromNode(),a.dataArray=a.parsePathData(o),a}return g()(r,[{key:"getText",value:function(){return this.text}},{key:"path",value:function(t){var e=this.dataArray;t&&t.beginPath(),e.forEach((function(e){var r=e.command,n=e.points;switch(r){case"L":t&&t.lineTo(n[0],n[1]);break;case"M":t&&t.moveTo(n[0],n[1]);break;case"C":t&&t.bezierCurveTo(n[0],n[1],n[2],n[3],n[4],n[5]);break;case"Q":t&&t.quadraticCurveTo(n[0],n[1],n[2],n[3]);break;case"A":var i=n[0],a=n[1],o=n[2],u=n[3],s=n[4],c=n[5],l=n[6],h=n[7],f=o>u?o:u,y=o>u?1:o/u,g=o>u?u/o:1;t&&(t.translate(i,a),t.rotate(l),t.scale(y,g),t.arc(0,0,f,s,s+c,Boolean(1-h)),t.scale(1/y,1/g),t.rotate(-l),t.translate(-i,-a));break;case"z":t&&t.closePath();break}}))}},{key:"renderChildren",value:function(t){this.setTextData(t),t.save();var e=this.parent.getStyle("text-decoration").getString(),r=this.getFontSize(),n=this.glyphInfo,i=t.fillStyle;"underline"===e&&t.beginPath(),n.forEach((function(i,a){var o=i.p0,u=i.p1,s=i.text;t.save(),t.translate(o.x,o.y),t.rotate(n[a].rotation),t.fillStyle&&t.fillText(s,0,0),t.strokeStyle&&t.strokeText(s,0,0),t.restore(),"underline"===e&&(0===a&&t.moveTo(o.x,o.y+r/8),t.lineTo(u.x,u.y+r/5))})),"underline"===e&&(t.lineWidth=r/20,t.strokeStyle=i,t.stroke(),t.closePath()),t.restore()}},{key:"getLetterSpacingAt",value:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:0;return this.letterSpacingCache[t]||0}},{key:"findSegmentToFitChar",value:function(t,e,r,n,i,a,o,u){var s=a,c=this.measureText(t,o);" "===o&&"justify"===e&&r<n&&(c+=(n-r)/i),u>-1&&(s+=this.getLetterSpacingAt(u));var l=this.textHeight/20,h={p0:this.getEquidistantPointOnPath(s,l),p1:this.getEquidistantPointOnPath(s+c,l)};return s+=c,{offset:s,segment:h}}},{key:"measureText",value:function(t,e){var r=this.measuresCache,n=e||this.getText();if(r.has(n))return r.get(n);var i=this.measureTargetText(t,n);return r.set(n,i),i}},{key:"setTextData",value:function(t){var e=this;if(!this.glyphInfo){var r=this.getText(),n=r.split(""),i=r.split(" ").length-1,a=N(this.parent.getAttribute("dx").getString("0")),o=this.parent.getStyle("text-anchor").getString("start"),u=this.getStyle("letter-spacing"),s=this.parent.getStyle("letter-spacing"),c=0;u.hasValue()&&"inherit"!==u.getValue()?u.hasValue()&&"initial"!==u.getValue()&&"unset"!==u.getValue()&&(c=u.getPixels()):c=s.getPixels();var l=[],h=r.length;this.letterSpacingCache=l;for(var f=0;f<h;f++)l.push("undefined"!==typeof a[f]?a[f]:c);var y=l.reduce((function(t,e){return t+e||0}),0);this.textWidth=this.measureText(t),this.textHeight=this.getFontSize();var g=Math.max(this.textWidth+y,0);this.glyphInfo=[];var p=this.getPathLength(),d=this.getStyle("startOffset").getNumber(0)*p,v=0;"middle"!==o&&"center"!==o||(v=-g/2),"end"!==o&&"right"!==o||(v=-g),v+=d,n.forEach((function(r,a){var u=e.findSegmentToFitChar(t,o,g,p,i,v,r,a),s=u.offset,c=u.segment;if(v=s,c.p0&&c.p1){var l=e.getLineLength(c.p0.x,c.p0.y,c.p1.x,c.p1.y),h=0,f=e.getPointOnLine(h+l/2,c.p0.x,c.p0.y,c.p1.x,c.p1.y),y=Math.atan2(c.p1.y-c.p0.y,c.p1.x-c.p0.x);e.glyphInfo.push({transposeX:f.x,transposeY:f.y,text:n[a],p0:c.p0,p1:c.p1,rotation:y})}}))}}},{key:"parsePathData",value:function(t){if(this.pathLength=-1,!t)return[];var e=[],r=t.pathParser;r.reset();while(!r.isEnd()){var n=r.current,i=n?n.x:0,a=n?n.y:0,o="",u=[];r.nextCommand();var s=r.command.toUpperCase();switch(r.command){case"M":case"m":o=this.pathM(r,u);break;case"L":case"l":o=this.pathL(r,u);break;case"H":case"h":o=this.pathH(r,u);break;case"V":case"v":o=this.pathV(r,u);break;case"C":case"c":this.pathC(r,u);break;case"S":case"s":o=this.pathS(r,u);break;case"Q":case"q":this.pathQ(r,u);break;case"T":case"t":o=this.pathT(r,u);break;case"A":case"a":u=this.pathA(r);break;case"Z":case"z":r.current=r.start;break}"Z"!==s?e.push({command:o||s,points:u,start:{x:i,y:a},pathLength:this.calcLength(i,a,o||s,u)}):e.push({command:"z",points:[],pathLength:0})}return e}},{key:"pathM",value:function(t,e){var r=t.getAsCurrentPoint();e.push(r.x,r.y),t.start=t.current;while(!t.isCommandOrEnd()){var n=t.getAsCurrentPoint();return e.push(n.x,n.y),"L"}}},{key:"pathL",value:function(t,e){while(!t.isCommandOrEnd()){var r=t.getAsCurrentPoint();e.push(r.x,r.y)}return"L"}},{key:"pathH",value:function(t,e){while(!t.isCommandOrEnd()){var r=t.current,n=new ct((t.isRelativeCommand()?r.x:0)+t.getScalar(),r.y);e.push(n.x,n.y),t.current=n}return"L"}},{key:"pathV",value:function(t,e){while(!t.isCommandOrEnd()){var r=t.current,n=new ct(r.x,(t.isRelativeCommand()?r.y:0)+t.getScalar());e.push(n.x,n.y),t.current=n}return"L"}},{key:"pathC",value:function(t,e){while(!t.isCommandOrEnd()){var r=t.getPoint(),n=t.getAsControlPoint(),i=t.getAsCurrentPoint();e.push(r.x,r.y,n.x,n.y,i.x,i.y)}}},{key:"pathS",value:function(t,e){while(!t.isCommandOrEnd()){var r=t.getReflectedControlPoint(),n=t.getAsControlPoint(),i=t.getAsCurrentPoint();e.push(r.x,r.y,n.x,n.y,i.x,i.y)}return"C"}},{key:"pathQ",value:function(t,e){while(!t.isCommandOrEnd()){var r=t.getAsControlPoint(),n=t.getAsCurrentPoint();e.push(r.x,r.y,n.x,n.y)}}},{key:"pathT",value:function(t,e){while(!t.isCommandOrEnd()){var r=t.getReflectedControlPoint();t.control=r;var n=t.getAsCurrentPoint();e.push(r.x,r.y,n.x,n.y)}return"Q"}},{key:"pathA",value:function(t){while(!t.isCommandOrEnd()){var e=t.current,r=t.getScalar(),n=t.getScalar(),i=t.getScalar()*(Math.PI/180),a=t.getScalar(),o=t.getScalar(),u=t.getAsCurrentPoint(),s=new ct(Math.cos(i)*(e.x-u.x)/2+Math.sin(i)*(e.y-u.y)/2,-Math.sin(i)*(e.x-u.x)/2+Math.cos(i)*(e.y-u.y)/2),c=Math.pow(s.x,2)/Math.pow(r,2)+Math.pow(s.y,2)/Math.pow(n,2);c>1&&(r*=Math.sqrt(c),n*=Math.sqrt(c));var l=(a===o?-1:1)*Math.sqrt((Math.pow(r,2)*Math.pow(n,2)-Math.pow(r,2)*Math.pow(s.y,2)-Math.pow(n,2)*Math.pow(s.x,2))/(Math.pow(r,2)*Math.pow(s.y,2)+Math.pow(n,2)*Math.pow(s.x,2)));isNaN(l)&&(l=0);var h=new ct(l*r*s.y/n,l*-n*s.x/r),f=new ct((e.x+u.x)/2+Math.cos(i)*h.x-Math.sin(i)*h.y,(e.y+u.y)/2+Math.sin(i)*h.x+Math.cos(i)*h.y),y=J([1,0],[(s.x-h.x)/r,(s.y-h.y)/n]),g=[(s.x-h.x)/r,(s.y-h.y)/n],p=[(-s.x-h.x)/r,(-s.y-h.y)/n],d=J(g,p);return Z(g,p)<=-1&&(d=Math.PI),Z(g,p)>=1&&(d=0),0===o&&d>0&&(d-=2*Math.PI),1===o&&d<0&&(d+=2*Math.PI),[f.x,f.y,r,n,y,d,i,o]}}},{key:"calcLength",value:function(t,e,r,n){var i=0,a=null,o=null,u=0;switch(r){case"L":return this.getLineLength(t,e,n[0],n[1]);case"C":for(i=0,a=this.getPointOnCubicBezier(0,t,e,n[0],n[1],n[2],n[3],n[4],n[5]),u=.01;u<=1;u+=.01)o=this.getPointOnCubicBezier(u,t,e,n[0],n[1],n[2],n[3],n[4],n[5]),i+=this.getLineLength(a.x,a.y,o.x,o.y),a=o;return i;case"Q":for(i=0,a=this.getPointOnQuadraticBezier(0,t,e,n[0],n[1],n[2],n[3]),u=.01;u<=1;u+=.01)o=this.getPointOnQuadraticBezier(u,t,e,n[0],n[1],n[2],n[3]),i+=this.getLineLength(a.x,a.y,o.x,o.y),a=o;return i;case"A":i=0;var s=n[4],c=n[5],l=n[4]+c,h=Math.PI/180;if(Math.abs(s-l)<h&&(h=Math.abs(s-l)),a=this.getPointOnEllipticalArc(n[0],n[1],n[2],n[3],s,0),c<0)for(u=s-h;u>l;u-=h)o=this.getPointOnEllipticalArc(n[0],n[1],n[2],n[3],u,0),i+=this.getLineLength(a.x,a.y,o.x,o.y),a=o;else for(u=s+h;u<l;u+=h)o=this.getPointOnEllipticalArc(n[0],n[1],n[2],n[3],u,0),i+=this.getLineLength(a.x,a.y,o.x,o.y),a=o;return o=this.getPointOnEllipticalArc(n[0],n[1],n[2],n[3],l,0),i+=this.getLineLength(a.x,a.y,o.x,o.y),i}return 0}},{key:"getPointOnLine",value:function(t,e,r,n,i){var a=arguments.length>5&&void 0!==arguments[5]?arguments[5]:e,o=arguments.length>6&&void 0!==arguments[6]?arguments[6]:r,u=(i-r)/(n-e+U),s=Math.sqrt(t*t/(1+u*u));n<e&&(s*=-1);var c=u*s,l=null;if(n===e)l={x:a,y:o+c};else if((o-r)/(a-e+U)===u)l={x:a+s,y:o+c};else{var h=0,f=0,y=this.getLineLength(e,r,n,i);if(y<U)return null;var g=(a-e)*(n-e)+(o-r)*(i-r);g/=y*y,h=e+g*(n-e),f=r+g*(i-r);var p=this.getLineLength(a,o,h,f),d=Math.sqrt(t*t-p*p);s=Math.sqrt(d*d/(1+u*u)),n<e&&(s*=-1),c=u*s,l={x:h+s,y:f+c}}return l}},{key:"getPointOnPath",value:function(t){var e=this.getPathLength(),r=0,n=null;if(t<-5e-5||t-5e-5>e)return null;var i,a=this.dataArray,o=Cr(a);try{for(o.s();!(i=o.n()).done;){var u=i.value;if(!u||!(u.pathLength<5e-5||r+u.pathLength+5e-5<t)){var s=t-r,c=0;switch(u.command){case"L":n=this.getPointOnLine(s,u.start.x,u.start.y,u.points[0],u.points[1],u.start.x,u.start.y);break;case"A":var l=u.points[4],h=u.points[5],f=u.points[4]+h;if(c=l+s/u.pathLength*h,h<0&&c<f||h>=0&&c>f)break;n=this.getPointOnEllipticalArc(u.points[0],u.points[1],u.points[2],u.points[3],c,u.points[6]);break;case"C":c=s/u.pathLength,c>1&&(c=1),n=this.getPointOnCubicBezier(c,u.start.x,u.start.y,u.points[0],u.points[1],u.points[2],u.points[3],u.points[4],u.points[5]);break;case"Q":c=s/u.pathLength,c>1&&(c=1),n=this.getPointOnQuadraticBezier(c,u.start.x,u.start.y,u.points[0],u.points[1],u.points[2],u.points[3]);break;default:}if(n)return n;break}r+=u.pathLength}}catch(y){o.e(y)}finally{o.f()}return null}},{key:"getLineLength",value:function(t,e,r,n){return Math.sqrt((r-t)*(r-t)+(n-e)*(n-e))}},{key:"getPathLength",value:function(){return-1===this.pathLength&&(this.pathLength=this.dataArray.reduce((function(t,e){return e.pathLength>0?t+e.pathLength:t}),0)),this.pathLength}},{key:"getPointOnCubicBezier",value:function(t,e,r,n,i,a,o,u,s){var c=u*K(t)+a*tt(t)+n*et(t)+e*rt(t),l=s*K(t)+o*tt(t)+i*et(t)+r*rt(t);return{x:c,y:l}}},{key:"getPointOnQuadraticBezier",value:function(t,e,r,n,i,a,o){var u=a*nt(t)+n*it(t)+e*at(t),s=o*nt(t)+i*it(t)+r*at(t);return{x:u,y:s}}},{key:"getPointOnEllipticalArc",value:function(t,e,r,n,i,a){var o=Math.cos(a),u=Math.sin(a),s={x:r*Math.cos(i),y:n*Math.sin(i)};return{x:t+(s.x*o-s.y*u),y:e+(s.x*u+s.y*o)}}},{key:"buildEquidistantCache",value:function(t,e){var r=this.getPathLength(),n=e||.25,i=t||r/100;if(!this.equidistantCache||this.equidistantCache.step!==i||this.equidistantCache.precision!==n){this.equidistantCache={step:i,precision:n,points:[]};for(var a=0,o=0;o<=r;o+=n){var u=this.getPointOnPath(o),s=this.getPointOnPath(o+n);u&&s&&(a+=this.getLineLength(u.x,u.y,s.x,s.y),a>=i&&(this.equidistantCache.points.push({x:u.x,y:u.y,distance:o}),a-=i))}}}},{key:"getEquidistantPointOnPath",value:function(t,e,r){if(this.buildEquidistantCache(e,r),t<0||t-this.getPathLength()>5e-5)return null;var n=Math.round(t/this.getPathLength()*(this.equidistantCache.points.length-1));return this.equidistantCache.points[n]||null}}]),r}(Yt);function Or(t){return function(){var e,r=k()(t);if(Lr()){var n=k()(this).constructor;e=Reflect.construct(r,arguments,n)}else e=r.apply(this,arguments);return b()(this,e)}}function Lr(){if("undefined"===typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"===typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],(function(){}))),!0}catch(t){return!1}}var Nr=function(t){P()(r,t);var e=Or(r);function r(t,n,i){var a;f()(this,r),a=e.call(this,t,n,i),a.type="image",a.loaded=!1;var o=a.getHrefAttribute().getString();if(!o)return b()(a);var u=/\.svg$/.test(o);return t.images.push(V()(a)),u?a.loadSvg(o):a.loadImage(o),a.isSvg=u,a}return g()(r,[{key:"loadImage",value:function(){var t=s()(o.a.mark((function t(e){var r;return o.a.wrap((function(t){while(1)switch(t.prev=t.next){case 0:return t.prev=0,t.next=3,this.document.createImage(e);case 3:r=t.sent,this.image=r,t.next=10;break;case 7:t.prev=7,t.t0=t["catch"](0),console.error('Error while loading image "'.concat(e,'":'),t.t0);case 10:this.loaded=!0;case 11:case"end":return t.stop()}}),t,this,[[0,7]])})));function e(e){return t.apply(this,arguments)}return e}()},{key:"loadSvg",value:function(){var t=s()(o.a.mark((function t(e){var r,n;return o.a.wrap((function(t){while(1)switch(t.prev=t.next){case 0:return t.prev=0,t.next=3,this.document.fetch(e);case 3:return r=t.sent,t.next=6,r.text();case 6:n=t.sent,this.image=n,t.next=13;break;case 10:t.prev=10,t.t0=t["catch"](0),console.error('Error while loading image "'.concat(e,'":'),t.t0);case 13:this.loaded=!0;case 14:case"end":return t.stop()}}),t,this,[[0,10]])})));function e(e){return t.apply(this,arguments)}return e}()},{key:"renderChildren",value:function(t){var e=this.document,r=this.image,n=this.loaded,i=this.getAttribute("x").getPixels("x"),a=this.getAttribute("y").getPixels("y"),o=this.getStyle("width").getPixels("x"),u=this.getStyle("height").getPixels("y");if(n&&r&&o&&u){if(t.save(),this.isSvg)e.canvg.forkString(t,this.image,{ignoreMouse:!0,ignoreAnimation:!0,ignoreDimensions:!0,ignoreClear:!0,offsetX:i,offsetY:a,scaleWidth:o,scaleHeight:u}).render();else{var s=this.image;t.translate(i,a),e.setViewBox({ctx:t,aspectRatio:this.getAttribute("preserveAspectRatio").getString(),width:o,desiredWidth:s.width,height:u,desiredHeight:s.height}),this.loaded&&("undefined"===typeof s.complete||s.complete)&&t.drawImage(s,0,0)}t.restore()}}},{key:"getBoundingBox",value:function(){var t=this.getAttribute("x").getPixels("x"),e=this.getAttribute("y").getPixels("y"),r=this.getStyle("width").getPixels("x"),n=this.getStyle("height").getPixels("y");return new $t(t,e,t+r,e+n)}}]),r}(Xt);function zr(t){return function(){var e,r=k()(t);if(Br()){var n=k()(this).constructor;e=Reflect.construct(r,arguments,n)}else e=r.apply(this,arguments);return b()(this,e)}}function Br(){if("undefined"===typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"===typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],(function(){}))),!0}catch(t){return!1}}var Ir=function(t){P()(r,t);var e=zr(r);function r(){var t;return f()(this,r),t=e.apply(this,arguments),t.type="symbol",t}return g()(r,[{key:"render",value:function(t){}}]),r}(Xt),Fr=function(){function t(e){f()(this,t),this.document=e,this.loaded=!1,e.fonts.push(this)}return g()(t,[{key:"load",value:function(){var t=s()(o.a.mark((function t(e,r){var n,i,a;return o.a.wrap((function(t){while(1)switch(t.prev=t.next){case 0:return t.prev=0,n=this.document,t.next=4,n.canvg.parser.load(r);case 4:i=t.sent,a=i.getElementsByTagName("font"),Array.from(a).forEach((function(t){var r=n.createElement(t);n.definitions[e]=r})),t.next=12;break;case 9:t.prev=9,t.t0=t["catch"](0),console.error('Error while loading font "'.concat(r,'":'),t.t0);case 12:this.loaded=!0;case 13:case"end":return t.stop()}}),t,this,[[0,9]])})));function e(e,r){return t.apply(this,arguments)}return e}()}]),t}();function jr(t){return function(){var e,r=k()(t);if(_r()){var n=k()(this).constructor;e=Reflect.construct(r,arguments,n)}else e=r.apply(this,arguments);return b()(this,e)}}function _r(){if("undefined"===typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"===typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],(function(){}))),!0}catch(t){return!1}}var $r=function(t){P()(r,t);var e=jr(r);function r(t,n,i){var a;f()(this,r),a=e.call(this,t,n,i),a.type="style";var o=T(Array.from(n.childNodes).map((function(t){return t.data})).join("").replace(/(\/\*([^*]|[\r\n]|(\*+([^*\/]|[\r\n])))*\*+\/)|(^[\s]*\/\/.*)/gm,"").replace(/@import.*;/g,"")),u=o.split("}");return u.forEach((function(e){var r=e.trim();if(r){var n=r.split("{"),i=n[0].split(","),a=n[1].split(";");i.forEach((function(e){var r=e.trim();if(r){var n=t.styles[r]||{};if(a.forEach((function(e){var r=e.indexOf(":"),i=e.substr(0,r).trim(),a=e.substr(r+1,e.length-r).trim();i&&a&&(n[i]=new ut(t,i,a))})),t.styles[r]=n,t.stylesSpecificity[r]=Y(r),"@font-face"===r){var i=n["font-family"].getString().replace(/"|'/g,""),o=n.src.getString().split(",");o.forEach((function(e){if(e.indexOf('format("svg")')>0){var r=I(e);r&&new Fr(t).load(i,r)}}))}}}))}})),a}return r}(Ot);function qr(t){return function(){var e,r=k()(t);if(Gr()){var n=k()(this).constructor;e=Reflect.construct(r,arguments,n)}else e=r.apply(this,arguments);return b()(this,e)}}function Gr(){if("undefined"===typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"===typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],(function(){}))),!0}catch(t){return!1}}$r.parseExternalUrl=I;var Xr=function(t){P()(r,t);var e=qr(r);function r(){var t;return f()(this,r),t=e.apply(this,arguments),t.type="use",t}return g()(r,[{key:"setContext",value:function(t){M()(k()(r.prototype),"setContext",this).call(this,t);var e=this.getAttribute("x"),n=this.getAttribute("y");e.hasValue()&&t.translate(e.getPixels("x"),0),n.hasValue()&&t.translate(0,n.getPixels("y"))}},{key:"path",value:function(t){var e=this.element;e&&e.path(t)}},{key:"renderChildren",value:function(t){var e=this.document,r=this.element;if(r){var n=r;if("symbol"===r.type&&(n=new se(e,null),n.attributes.viewBox=new ut(e,"viewBox",r.getAttribute("viewBox").getString()),n.attributes.preserveAspectRatio=new ut(e,"preserveAspectRatio",r.getAttribute("preserveAspectRatio").getString()),n.attributes.overflow=new ut(e,"overflow",r.getAttribute("overflow").getString()),n.children=r.children),"svg"===n.type){var i=this.getStyle("width",!1,!0),a=this.getStyle("height",!1,!0);i.hasValue()&&(n.attributes.width=new ut(e,"width",i.getString())),a.hasValue()&&(n.attributes.height=new ut(e,"height",a.getString()))}var o=n.parent;n.parent=this,n.render(t),n.parent=o}}},{key:"getBoundingBox",value:function(t){var e=this.element;return e?e.getBoundingBox(t):null}},{key:"elementTransform",value:function(){var t=this.document,e=this.element;return Tt.fromElement(t,e)}},{key:"element",get:function(){return this._element||(this._element=this.getHrefAttribute().getDefinition()),this._element}}]),r}(Xt);function Wr(t){return function(){var e,r=k()(t);if(Hr()){var n=k()(this).constructor;e=Reflect.construct(r,arguments,n)}else e=r.apply(this,arguments);return b()(this,e)}}function Hr(){if("undefined"===typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"===typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],(function(){}))),!0}catch(t){return!1}}function Yr(t,e,r,n,i,a){return t[r*n*4+4*e+a]}function Ur(t,e,r,n,i,a,o){t[r*n*4+4*e+a]=o}function Qr(t,e,r){var n=t[e];return n*(n<0?r-255:r)}function Zr(t,e,r,n){return e+Math.cos(t)*r+Math.sin(t)*n}var Jr=function(t){P()(r,t);var e=Wr(r);function r(t,n,i){var a;f()(this,r),a=e.call(this,t,n,i),a.type="feColorMatrix";var o=N(a.getAttribute("values").getString());switch(a.getAttribute("type").getString("matrix")){case"saturate":var u=o[0];o=[.213+.787*u,.715-.715*u,.072-.072*u,0,0,.213-.213*u,.715+.285*u,.072-.072*u,0,0,.213-.213*u,.715-.715*u,.072+.928*u,0,0,0,0,0,1,0,0,0,0,0,1];break;case"hueRotate":var s=o[0]*Math.PI/180;o=[Zr(s,.213,.787,-.213),Zr(s,.715,-.715,-.715),Zr(s,.072,-.072,.928),0,0,Zr(s,.213,-.213,.143),Zr(s,.715,.285,.14),Zr(s,.072,-.072,-.283),0,0,Zr(s,.213,-.213,-.787),Zr(s,.715,-.715,.715),Zr(s,.072,.928,.072),0,0,0,0,0,1,0,0,0,0,0,1];break;case"luminanceToAlpha":o=[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,.2125,.7154,.0721,0,0,0,0,0,0,1];break}return a.matrix=o,a.includeOpacity=a.getAttribute("includeOpacity").hasValue(),a}return g()(r,[{key:"apply",value:function(t,e,r,n,i){for(var a=this.includeOpacity,o=this.matrix,u=t.getImageData(0,0,n,i),s=0;s<i;s++)for(var c=0;c<n;c++){var l=Yr(u.data,c,s,n,i,0),h=Yr(u.data,c,s,n,i,1),f=Yr(u.data,c,s,n,i,2),y=Yr(u.data,c,s,n,i,3),g=Qr(o,0,l)+Qr(o,1,h)+Qr(o,2,f)+Qr(o,3,y)+Qr(o,4,1),p=Qr(o,5,l)+Qr(o,6,h)+Qr(o,7,f)+Qr(o,8,y)+Qr(o,9,1),d=Qr(o,10,l)+Qr(o,11,h)+Qr(o,12,f)+Qr(o,13,y)+Qr(o,14,1),v=Qr(o,15,l)+Qr(o,16,h)+Qr(o,17,f)+Qr(o,18,y)+Qr(o,19,1);a&&(g=p=d=0,v*=y/255),Ur(u.data,c,s,n,i,0,g),Ur(u.data,c,s,n,i,1,p),Ur(u.data,c,s,n,i,2,d),Ur(u.data,c,s,n,i,3,v)}t.clearRect(0,0,n,i),t.putImageData(u,0,0)}}]),r}(Ot);function Kr(t){return function(){var e,r=k()(t);if(tn()){var n=k()(this).constructor;e=Reflect.construct(r,arguments,n)}else e=r.apply(this,arguments);return b()(this,e)}}function tn(){if("undefined"===typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"===typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],(function(){}))),!0}catch(t){return!1}}var en=function(t){P()(r,t);var e=Kr(r);function r(){var t;return f()(this,r),t=e.apply(this,arguments),t.type="mask",t}return g()(r,[{key:"apply",value:function(t,e){var n=this.document,i=this.getAttribute("x").getPixels("x"),a=this.getAttribute("y").getPixels("y"),o=this.getStyle("width").getPixels("x"),u=this.getStyle("height").getPixels("y");if(!o&&!u){var s=new $t;this.children.forEach((function(e){s.addBoundingBox(e.getBoundingBox(t))})),i=Math.floor(s.x1),a=Math.floor(s.y1),o=Math.floor(s.width),u=Math.floor(s.height)}var c=this.removeStyles(e,r.ignoreStyles),l=n.createCanvas(i+o,a+u),h=l.getContext("2d");n.screen.setDefaults(h),this.renderChildren(h),new Jr(n,{nodeType:1,childNodes:[],attributes:[{nodeName:"type",value:"luminanceToAlpha"},{nodeName:"includeOpacity",value:"true"}]}).apply(h,0,0,i+o,a+u);var f=n.createCanvas(i+o,a+u),y=f.getContext("2d");n.screen.setDefaults(y),e.render(y),y.globalCompositeOperation="destination-in",y.fillStyle=h.createPattern(l,"no-repeat"),y.fillRect(0,0,i+o,a+u),t.fillStyle=y.createPattern(f,"no-repeat"),t.fillRect(0,0,i+o,a+u),this.restoreStyles(e,c)}},{key:"render",value:function(t){}}]),r}(Ot);function rn(t){return function(){var e,r=k()(t);if(nn()){var n=k()(this).constructor;e=Reflect.construct(r,arguments,n)}else e=r.apply(this,arguments);return b()(this,e)}}function nn(){if("undefined"===typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"===typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],(function(){}))),!0}catch(t){return!1}}en.ignoreStyles=["mask","transform","clip-path"];var an=function(){},on=function(t){P()(r,t);var e=rn(r);function r(){var t;return f()(this,r),t=e.apply(this,arguments),t.type="clipPath",t}return g()(r,[{key:"apply",value:function(t){var e=this.document,r=Reflect.getPrototypeOf(t),n=t.beginPath,i=t.closePath;r&&(r.beginPath=an,r.closePath=an),Reflect.apply(n,t,[]),this.children.forEach((function(n){if("undefined"!==typeof n.path){var a="undefined"!==typeof n.elementTransform?n.elementTransform():null;a||(a=Tt.fromElement(e,n)),a&&a.apply(t),n.path(t),r&&(r.closePath=i),a&&a.unapply(t)}})),Reflect.apply(i,t,[]),t.clip(),r&&(r.beginPath=n,r.closePath=i)}},{key:"render",value:function(t){}}]),r}(Ot);function un(t){return function(){var e,r=k()(t);if(sn()){var n=k()(this).constructor;e=Reflect.construct(r,arguments,n)}else e=r.apply(this,arguments);return b()(this,e)}}function sn(){if("undefined"===typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"===typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],(function(){}))),!0}catch(t){return!1}}var cn=function(t){P()(r,t);var e=un(r);function r(){var t;return f()(this,r),t=e.apply(this,arguments),t.type="filter",t}return g()(r,[{key:"apply",value:function(t,e){var n=this.document,i=this.children,a=e.getBoundingBox(t);if(a){var o=0,u=0;i.forEach((function(t){var e=t.extraFilterDistance||0;o=Math.max(o,e),u=Math.max(u,e)}));var s=Math.floor(a.width),c=Math.floor(a.height),l=s+2*o,h=c+2*u;if(!(l<1||h<1)){var f=Math.floor(a.x),y=Math.floor(a.y),g=this.removeStyles(e,r.ignoreStyles),p=n.createCanvas(l,h),d=p.getContext("2d");n.screen.setDefaults(d),d.translate(-f+o,-y+u),e.render(d),i.forEach((function(t){"function"===typeof t.apply&&t.apply(d,0,0,l,h)})),t.drawImage(p,0,0,l,h,f-o,y-u,l,h),this.restoreStyles(e,g)}}}},{key:"render",value:function(t){}}]),r}(Ot);function ln(t){return function(){var e,r=k()(t);if(hn()){var n=k()(this).constructor;e=Reflect.construct(r,arguments,n)}else e=r.apply(this,arguments);return b()(this,e)}}function hn(){if("undefined"===typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"===typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],(function(){}))),!0}catch(t){return!1}}cn.ignoreStyles=["filter","transform","clip-path"];var fn=function(t){P()(r,t);var e=ln(r);function r(t,n,i){var a;return f()(this,r),a=e.call(this,t,n,i),a.type="feDropShadow",a.addStylesFromStyleDefinition(),a}return g()(r,[{key:"apply",value:function(t,e,r,n,i){}}]),r}(Ot);function yn(t){return function(){var e,r=k()(t);if(gn()){var n=k()(this).constructor;e=Reflect.construct(r,arguments,n)}else e=r.apply(this,arguments);return b()(this,e)}}function gn(){if("undefined"===typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"===typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],(function(){}))),!0}catch(t){return!1}}var pn=function(t){P()(r,t);var e=yn(r);function r(){var t;return f()(this,r),t=e.apply(this,arguments),t.type="feMorphology",t}return g()(r,[{key:"apply",value:function(t,e,r,n,i){}}]),r}(Ot);function dn(t){return function(){var e,r=k()(t);if(vn()){var n=k()(this).constructor;e=Reflect.construct(r,arguments,n)}else e=r.apply(this,arguments);return b()(this,e)}}function vn(){if("undefined"===typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"===typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],(function(){}))),!0}catch(t){return!1}}var mn=function(t){P()(r,t);var e=dn(r);function r(){var t;return f()(this,r),t=e.apply(this,arguments),t.type="feComposite",t}return g()(r,[{key:"apply",value:function(t,e,r,n,i){}}]),r}(Ot);function xn(t){return function(){var e,r=k()(t);if(bn()){var n=k()(this).constructor;e=Reflect.construct(r,arguments,n)}else e=r.apply(this,arguments);return b()(this,e)}}function bn(){if("undefined"===typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"===typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],(function(){}))),!0}catch(t){return!1}}var wn=function(t){P()(r,t);var e=xn(r);function r(t,n,i){var a;return f()(this,r),a=e.call(this,t,n,i),a.type="feGaussianBlur",a.blurRadius=Math.floor(a.getAttribute("stdDeviation").getNumber()),a.extraFilterDistance=a.blurRadius,a}return g()(r,[{key:"apply",value:function(t,e,r,n,i){var a=this.document,o=this.blurRadius,u=a.window?a.window.document.body:null,s=t.canvas;s.id=a.getUniqueId(),u&&(s.style.display="none",u.appendChild(s)),Object(D["a"])(s,e,r,n,i,o),u&&u.removeChild(s)}}]),r}(Ot);function kn(t){return function(){var e,r=k()(t);if(Sn()){var n=k()(this).constructor;e=Reflect.construct(r,arguments,n)}else e=r.apply(this,arguments);return b()(this,e)}}function Sn(){if("undefined"===typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"===typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],(function(){}))),!0}catch(t){return!1}}var Pn=function(t){P()(r,t);var e=kn(r);function r(){var t;return f()(this,r),t=e.apply(this,arguments),t.type="title",t}return r}(Ot);function Rn(t){return function(){var e,r=k()(t);if(An()){var n=k()(this).constructor;e=Reflect.construct(r,arguments,n)}else e=r.apply(this,arguments);return b()(this,e)}}function An(){if("undefined"===typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"===typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],(function(){}))),!0}catch(t){return!1}}var Cn=function(t){P()(r,t);var e=Rn(r);function r(){var t;return f()(this,r),t=e.apply(this,arguments),t.type="desc",t}return r}(Ot),Mn={svg:se,rect:he,circle:ge,ellipse:ve,line:be,polyline:Se,polygon:Ae,path:ae,pattern:Ee,marker:Te,defs:Ne,linearGradient:Ge,radialGradient:He,stop:Qe,animate:Ke,animateColor:rr,animateTransform:ar,font:hr,"font-face":gr,"missing-glyph":vr,glyph:br,text:Yt,tspan:Zt,tref:Sr,a:Ar,textPath:Tr,image:Nr,g:Ie,symbol:Ir,style:$r,use:Xr,mask:en,clipPath:on,filter:cn,feDropShadow:fn,feMorphology:pn,feComposite:mn,feColorMatrix:Jr,feGaussianBlur:wn,title:Pn,desc:Cn};function En(t,e){var r=Object.keys(t);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(t);e&&(n=n.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),r.push.apply(r,n)}return r}function Vn(t){for(var e=1;e<arguments.length;e++){var r=null!=arguments[e]?arguments[e]:{};e%2?En(Object(r),!0).forEach((function(e){l()(t,e,r[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(r)):En(Object(r)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(r,e))}))}return t}function Dn(t,e){var r=document.createElement("canvas");return r.width=t,r.height=e,r}function Tn(t){return On.apply(this,arguments)}function On(){return On=s()(o.a.mark((function t(e){var r,n,i=arguments;return o.a.wrap((function(t){while(1)switch(t.prev=t.next){case 0:return r=i.length>1&&void 0!==i[1]&&i[1],n=document.createElement("img"),r&&(n.crossOrigin="Anonymous"),t.abrupt("return",new Promise((function(t,r){n.onload=function(){t(n)},n.onerror=function(){r()},n.src=e})));case 4:case"end":return t.stop()}}),t)}))),On.apply(this,arguments)}var Ln=function(){function t(e){var r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=r.rootEmSize,i=void 0===n?12:n,a=r.emSize,o=void 0===a?12:a,u=r.createCanvas,s=void 0===u?t.createCanvas:u,c=r.createImage,l=void 0===c?t.createImage:c,h=r.anonymousCrossOrigin;f()(this,t),this.canvg=e,this.definitions={},this.styles={},this.stylesSpecificity={},this.images=[],this.fonts=[],this.emSizeStack=[],this.uniqueId=0,this.screen=e.screen,this.rootEmSize=i,this.emSize=o,this.createCanvas=s,this.createImage=this.bindCreateImage(l,h),this.screen.wait(this.isImagesLoaded.bind(this)),this.screen.wait(this.isFontsLoaded.bind(this))}return g()(t,[{key:"bindCreateImage",value:function(t,e){return"boolean"===typeof e?function(r,n){return t(r,"boolean"===typeof n?n:e)}:t}},{key:"popEmSize",value:function(){var t=this.emSizeStack;t.pop()}},{key:"getUniqueId",value:function(){return"canvg".concat(++this.uniqueId)}},{key:"isImagesLoaded",value:function(){return this.images.every((function(t){return t.loaded}))}},{key:"isFontsLoaded",value:function(){return this.fonts.every((function(t){return t.loaded}))}},{key:"createDocumentElement",value:function(t){var e=this.createElement(t.documentElement);return e.root=!0,e.addStylesFromStyleDefinition(),this.documentElement=e,e}},{key:"createElement",value:function(e){var r=e.nodeName.replace(/^[^:]+:/,""),n=t.elementTypes[r];return"undefined"!==typeof n?new n(this,e):new zt(this,e)}},{key:"createTextNode",value:function(t){return new te(this,t)}},{key:"setViewBox",value:function(t){this.screen.setViewBox(Vn({document:this},t))}},{key:"window",get:function(){return this.screen.window}},{key:"fetch",get:function(){return this.screen.fetch}},{key:"ctx",get:function(){return this.screen.ctx}},{key:"emSize",get:function(){var t=this.emSizeStack;return t[t.length-1]},set:function(t){var e=this.emSizeStack;e.push(t)}}]),t}();function Nn(t,e){var r=Object.keys(t);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(t);e&&(n=n.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),r.push.apply(r,n)}return r}function zn(t){for(var e=1;e<arguments.length;e++){var r=null!=arguments[e]?arguments[e]:{};e%2?Nn(Object(r),!0).forEach((function(e){l()(t,e,r[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(r)):Nn(Object(r)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(r,e))}))}return t}Ln.createCanvas=Dn,Ln.createImage=Tn,Ln.elementTypes=Mn;var Bn=function(){function t(e,r){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};f()(this,t),this.parser=new dt(n),this.screen=new yt(e,n),this.options=n;var i=new Ln(this,n),a=i.createDocumentElement(r);this.document=i,this.documentElement=a}return g()(t,[{key:"fork",value:function(e,r){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};return t.from(e,r,zn({},this.options,{},n))}},{key:"forkString",value:function(e,r){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};return t.fromString(e,r,zn({},this.options,{},n))}},{key:"ready",value:function(){return this.screen.ready()}},{key:"isReady",value:function(){return this.screen.isReady()}},{key:"render",value:function(){var t=s()(o.a.mark((function t(){var e,r=arguments;return o.a.wrap((function(t){while(1)switch(t.prev=t.next){case 0:return e=r.length>0&&void 0!==r[0]?r[0]:{},this.start(zn({enableRedraw:!0,ignoreAnimation:!0,ignoreMouse:!0},e)),t.next=4,this.ready();case 4:this.stop();case 5:case"end":return t.stop()}}),t,this)})));function e(){return t.apply(this,arguments)}return e}()},{key:"start",value:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},e=this.documentElement,r=this.screen,n=this.options;r.start(e,zn({enableRedraw:!0},n,{},t))}},{key:"stop",value:function(){this.screen.stop()}},{key:"resize",value:function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:t,r=arguments.length>2&&void 0!==arguments[2]&&arguments[2];this.documentElement.resize(t,e,r)}}],[{key:"from",value:function(){var e=s()(o.a.mark((function e(r,n){var i,a,u,s=arguments;return o.a.wrap((function(e){while(1)switch(e.prev=e.next){case 0:return i=s.length>2&&void 0!==s[2]?s[2]:{},a=new dt(i),e.next=4,a.parse(n);case 4:return u=e.sent,e.abrupt("return",new t(r,u,i));case 6:case"end":return e.stop()}}),e)})));function r(t,r){return e.apply(this,arguments)}return r}()},{key:"fromString",value:function(e,r){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},i=new dt(n),a=i.parseFromString(r);return new t(e,a,n)}}]),t}();function In(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},e=t.DOMParser,r={window:null,ignoreAnimation:!0,ignoreMouse:!0,DOMParser:e,createCanvas:function(t,e){return new OffscreenCanvas(t,e)},createImage:function(t){return s()(o.a.mark((function e(){var r,n,i;return o.a.wrap((function(e){while(1)switch(e.prev=e.next){case 0:return e.next=2,fetch(t);case 2:return r=e.sent,e.next=5,r.blob();case 5:return n=e.sent,e.next=8,createImageBitmap(n);case 8:return i=e.sent,e.abrupt("return",i);case 10:case"end":return e.stop()}}),e)})))()}};return"undefined"===typeof DOMParser&&"undefined"!==typeof e||Reflect.deleteProperty(r,"DOMParser"),r}function Fn(t){var e=t.DOMParser,r=t.canvas,n=t.fetch;return{window:null,ignoreAnimation:!0,ignoreMouse:!0,DOMParser:e,fetch:n,createCanvas:r.createCanvas,createImage:r.loadImage}}var jn=Object.freeze({__proto__:null,offscreen:In,node:Fn});e["default"]=Bn}.call(this,r("4362"))},8962:function(t,e,r){r("e439"),r("d3b7"),r("5d41");var n=r("9f70");function i(){return"undefined"!==typeof Reflect&&Reflect.get?(t.exports=i=Reflect.get.bind(),t.exports.__esModule=!0,t.exports["default"]=t.exports):(t.exports=i=function(t,e,r){var i=n(t,e);if(i){var a=Object.getOwnPropertyDescriptor(i,e);return a.get?a.get.call(arguments.length<3?t:r):a.value}},t.exports.__esModule=!0,t.exports["default"]=t.exports),i.apply(this,arguments)}t.exports=i,t.exports.__esModule=!0,t.exports["default"]=t.exports},"9f70":function(t,e,r){var n=r("36c6");function i(t,e){while(!Object.prototype.hasOwnProperty.call(t,e))if(t=n(t),null===t)break;return t}t.exports=i,t.exports.__esModule=!0,t.exports["default"]=t.exports},a6231:function(t,e,r){"use strict";var n=r("23e7"),i=r("b727").every,a=r("a640"),o=r("ae40"),u=a("every"),s=o("every");n({target:"Array",proto:!0,forced:!u||!s},{every:function(t){return i(this,t,arguments.length>1?arguments[1]:void 0)}})},a6fd:function(t,e,r){var n=r("23e7"),i=r("d066"),a=r("1c0b"),o=r("825a"),u=r("d039"),s=i("Reflect","apply"),c=Function.apply,l=!u((function(){s((function(){}))}));n({target:"Reflect",stat:!0,forced:l},{apply:function(t,e,r){return a(t),o(r),s?s(t,e,r):c.call(t,e,r)}})},ac16:function(t,e,r){var n=r("23e7"),i=r("825a"),a=r("06cf").f;n({target:"Reflect",stat:!0},{deleteProperty:function(t,e){var r=a(i(t),e);return!(r&&!r.configurable)&&delete t[e]}})},c975:function(t,e,r){"use strict";var n=r("23e7"),i=r("4d64").indexOf,a=r("a640"),o=r("ae40"),u=[].indexOf,s=!!u&&1/[1].indexOf(1,-0)<0,c=a("indexOf"),l=o("indexOf",{ACCESSORS:!0,1:0});n({target:"Array",proto:!0,forced:s||!c||!l},{indexOf:function(t){return s?u.apply(this,arguments)||0:i(this,t,arguments.length>1?arguments[1]:void 0)}})},ed6d:function(t,e,r){var n=r("4a4b");function i(t,e){if("function"!==typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&n(t,e)}t.exports=i,t.exports.__esModule=!0,t.exports["default"]=t.exports}}]);
|