!function(t,e){"object"==typeof exports&&"undefined"!=typeof module?e(exports):"function"==typeof define&&define.amd?define(["exports"],e):e((t="undefined"!=typeof globalThis?globalThis:t||self).canvg={})}(this,function(t){"use strict";var e="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:{};function r(t){return t&&t.__esModule&&Object.prototype.hasOwnProperty.call(t,"default")?t.default:t}function n(t){var e={exports:{}};return t(e,e.exports),e.exports}function f(e,r){try{Object.defineProperty(d,e,{value:r,configurable:!0,writable:!0})}catch(t){d[e]=r}return r}function l(t){if(null==t)throw TypeError("Can't call method on "+t);return t}function S(t){return Object(l(t))}function s(t){return"Symbol("+String(void 0===t?"":t)+")_"+(++y+g).toString(36)}function i(t,e){return arguments.length<2?(r=d[t],O(r)?r:void 0):d[t]&&d[t][e];var r}var o=function(t){return t&&t.Math==Math&&t},d=o("object"==typeof globalThis&&globalThis)||o("object"==typeof window&&window)||o("object"==typeof self&&self)||o("object"==typeof e&&e)||function(){return this}()||Function("return this")(),a="__core-js_shared__",u=d[a]||f(a,{}),c=n(function(t){(t.exports=function(t,e){return u[t]||(u[t]=void 0!==e?e:{})})("versions",[]).push({version:"3.18.2",mode:"global",copyright:"© 2021 Denis Pushkarev (zloirock.ru)"})}),h={}.hasOwnProperty,p=Object.hasOwn||function(t,e){return h.call(S(t),e)},y=0,g=Math.random(),O=function(t){return"function"==typeof t},v=i("navigator","userAgent")||"",m=d.process,x=d.Deno,b=m&&m.versions||x&&x.version,w=b&&b.v8;w?ur=(ar=w.split("."))[0]<4?1:ar[0]+ar[1]:v&&(!(ar=v.match(/Edge\/(\d+)/))||74<=ar[1])&&(ar=v.match(/Chrome\/(\d+)/))&&(ur=ar[1]);function k(t){try{return!!t()}catch(t){return!0}}function T(t){return p(E,t)&&(R||"string"==typeof E[t])||(R&&p(C,t)?E[t]=C[t]:E[t]=M("Symbol."+t)),E[t]}var A=ur&&+ur,R=!!Object.getOwnPropertySymbols&&!k(function(){var t=Symbol();return!String(t)||!(Object(t)instanceof Symbol)||!Symbol.sham&&A&&A<41}),P=R&&!Symbol.sham&&"symbol"==typeof Symbol.iterator,E=c("wks"),C=d.Symbol,M=P?C:C&&C.withoutSetter||s,N={};N[T("toStringTag")]="z";function _(t){return F?j.createElement(t):{}}function I(t){return t=q(t,"string"),H(t)?t:String(t)}function V(t,e){return{enumerable:!(1&t),configurable:!(2&t),writable:!(4&t),value:e}}var L="[object z]"===String(N),B=!k(function(){return 7!=Object.defineProperty({},1,{get:function(){return 7}})[1]}),D=function(t){return"object"==typeof t?null!==t:O(t)},j=d.document,F=D(j)&&D(j.createElement),z=!B&&!k(function(){return 7!=Object.defineProperty(_("div"),"a",{get:function(){return 7}}).a}),U=function(t){if(D(t))return t;throw TypeError(String(t)+" is not an object")},H=P?function(t){return"symbol"==typeof t}:function(t){var e=i("Symbol");return O(e)&&Object(t)instanceof e},X=function(t){try{return String(t)}catch(t){return"Object"}},Y=function(t){if(O(t))return t;throw TypeError(X(t)+" is not a function")},G=function(t,e){e=t[e];return null==e?void 0:Y(e)},W=T("toPrimitive"),q=function(t,e){if(!D(t)||H(t))return t;var r=G(t,W);if(r){if(r=r.call(t,e=void 0===e?"default":e),!D(r)||H(r))return r;throw TypeError("Can't convert object to primitive value")}return function(t,e){var r,n;if("string"===e&&O(r=t.toString)&&!D(n=r.call(t)))return n;if(O(r=t.valueOf)&&!D(n=r.call(t)))return n;if("string"!==e&&O(r=t.toString)&&!D(n=r.call(t)))return n;throw TypeError("Can't convert object to primitive value")}(t,e=void 0===e?"number":e)},$=Object.defineProperty,Q={f:B?$:function(t,e,r){if(U(t),e=I(e),U(r),z)try{return $(t,e,r)}catch(t){}if("get"in r||"set"in r)throw TypeError("Accessors not supported");return"value"in r&&(t[e]=r.value),t}},Z=B?function(t,e,r){return Q.f(t,e,V(1,r))}:function(t,e,r){return t[e]=r,t},K=Function.toString;O(u.inspectSource)||(u.inspectSource=function(t){return K.call(t)});var J,tt,et,rt,nt,it,ot,at,ut=u.inspectSource,st=d.WeakMap,ct=O(st)&&/native code/.test(ut(st)),lt=c("keys"),ft=function(t){return lt[t]||(lt[t]=s(t))},ht={},pt="Object already initialized",yt=d.WeakMap;ot=ct||u.state?(J=u.state||(u.state=new yt),tt=J.get,et=J.has,rt=J.set,nt=function(t,e){if(et.call(J,t))throw new TypeError(pt);return e.facade=t,rt.call(J,t,e),e},it=function(t){return tt.call(J,t)||{}},function(t){return et.call(J,t)}):(at=ft("state"),ht[at]=!0,nt=function(t,e){if(p(t,at))throw new TypeError(pt);return e.facade=t,Z(t,at,e),e},it=function(t){return p(t,at)?t[at]:{}},function(t){return p(t,at)});var dt={set:nt,get:it,has:ot,enforce:function(t){return ot(t)?it(t):nt(t,{})},getterFor:function(r){return function(t){var e;if(!D(t)||(e=it(t)).type!==r)throw TypeError("Incompatible receiver, "+r+" required");return e}}},gt=Function.prototype,vt=B&&Object.getOwnPropertyDescriptor,mt=p(gt,"name"),xt={EXISTS:mt,PROPER:mt&&"something"===function(){}.name,CONFIGURABLE:mt&&(!B||vt(gt,"name").configurable)},bt=n(function(t){var s=xt.CONFIGURABLE,e=dt.get,c=dt.enforce,l=String(String).split("String");(t.exports=function(t,e,r,n){var i=!!n&&!!n.unsafe,o=!!n&&!!n.enumerable,a=!!n&&!!n.noTargetGet,u=n&&void 0!==n.name?n.name:e;O(r)&&("Symbol("===String(u).slice(0,7)&&(u="["+String(u).replace(/^Symbol\(([^)]*)\)/,"$1")+"]"),(!p(r,"name")||s&&r.name!==u)&&Z(r,"name",u),(n=c(r)).source||(n.source=l.join("string"==typeof u?u:""))),t!==d?(i?!a&&t[e]&&(o=!0):delete t[e],o?t[e]=r:Z(t,e,r)):o?t[e]=r:f(e,r)})(Function.prototype,"toString",function(){return O(this)&&e(this).source||ut(this)})}),wt={}.toString,St=function(t){return wt.call(t).slice(8,-1)},Ot=T("toStringTag"),kt="Arguments"==St(function(){return arguments}()),Tt=L?St:function(t){var e;return void 0===t?"Undefined":null===t?"Null":"string"==typeof(t=function(t,e){try{return t[e]}catch(t){}}(e=Object(t),Ot))?t:kt?St(e):"Object"==(t=St(e))&&O(e.callee)?"Arguments":t};L||bt(Object.prototype,"toString",L?{}.toString:function(){return"[object "+Tt(this)+"]"},{unsafe:!0});function At(t){return Yt(l(t))}function Rt(t,e){return(t=Qt(t))<0?Zt(t+e,0):Kt(t,e)}function Pt(t){return te(t.length)}function Et(t,e){var r,n=At(t),i=0,o=[];for(r in n)!p(ht,r)&&p(n,r)&&o.push(r);for(;e.length>i;)p(n,r=e[i++])&&(~ne(o,r)||o.push(r));return o}function Ct(t,e){var r,n,i,o,a=t.target,u=t.global,s=t.stat;if(r=u?d:s?d[a]||f(a,{}):(d[a]||{}).prototype)for(n in e){if(i=e[n],o=t.noTargetGet?(o=ge(r,n))&&o.value:r[n],!de(u?n:a+(s?".":"#")+n,t.forced)&&void 0!==o){if(typeof i==typeof o)continue;!function(t,e){for(var r=se(e),n=Q.f,i=Wt.f,o=0;or;){var i,o,a,u=y[r++],s=e?u.ok:u.fail,c=u.resolve,l=u.reject,f=u.domain;try{s?(e||(2===h.rejection&&function(e){xr.call(d,function(){var t=e.facade;Ye?Pr.emit("rejectionHandled",t):Br("rejectionhandled",t,e.value)})}(h),h.rejection=1),!0===s?i=t:(f&&f.enter(),i=s(t),f&&(f.exit(),a=!0)),i===u.promise?l(Ar("Promise-chain cycle")):(o=Vr(i))?o.call(i,c,l):c(i)):l(t)}catch(t){f&&!a&&f.exit(),l(t)}}h.reactions=[],h.notified=!1,p&&!h.rejection&&(n=h,xr.call(d,function(){var t,e=n.facade,r=n.value;if(Dr(n)&&(t=vr(function(){Ye?Pr.emit("unhandledRejection",r,e):Br(_r,e,r)}),n.rejection=Ye||Dr(n)?2:1,t.error))throw t.value}))}))},Br=function(t,e,r){var n,i;Mr?((n=Rr.createEvent("Event")).promise=e,n.reason=r,n.initEvent(t,!1,!0),d.dispatchEvent(n)):n={promise:e,reason:r},!Nr&&(i=d["on"+t])?i(n):t===_r&&function(t,e){var r=d.console;r&&r.error&&(1===arguments.length?r.error(t):r.error(t,e))}("Unhandled promise rejection",r)},Dr=function(t){return 1!==t.rejection&&!t.parent},jr=function(e,r,n){return function(t){e(r,t,n)}},Fr=function(t,e,r){t.done||(t.done=!0,(t=r?r:t).value=e,t.state=2,Lr(t,!0))},zr=function(r,t,e){if(!r.done){r.done=!0,e&&(r=e);try{if(r.facade===t)throw Ar("Promise can't be resolved itself");var n=Vr(t);n?dr(function(){var e={done:!1};try{n.call(t,jr(zr,e,r),jr(Fr,e,r))}catch(t){Fr(e,t,r)}}):(r.value=t,r.state=1,Lr(r,!1))}catch(t){Fr({done:!1},t,r)}}};if(L&&(gt=(Tr=function(t){It(this,Tr,wr),Y(t),fr.call(this);var e=Sr(this);try{t(jr(zr,e),jr(Fr,e))}catch(t){Fr(e,t)}}).prototype,(fr=function(t){Or(this,{type:wr,done:!1,notified:!1,parent:!1,reactions:[],rejection:!1,state:0,value:void 0})}).prototype=Mt(gt,{then:function(t,e){var r=kr(this),n=Er(Ne(this,Tr));return n.ok=!O(t)||t,n.fail=O(e)&&e,n.domain=Ye?Pr.domain:void 0,r.parent=!0,r.reactions.push(n),0!=r.state&&Lr(r,!1),n.promise},catch:function(t){return this.then(void 0,t)}}),hr=function(){var t=new fr,e=Sr(t);this.promise=t,this.resolve=jr(zr,e),this.reject=jr(Fr,e)},gr.f=Er=function(t){return t===Tr||t===pr?new hr:Cr(t)},O(ve)&&vt!==Object.prototype)){yr=vt.then,Ir||(bt(vt,"then",function(t,e){var r=this;return new Tr(function(t,e){yr.call(r,t,e)}).then(t,e)},{unsafe:!0}),bt(vt,"catch",gt.catch,{unsafe:!0}));try{delete vt.constructor}catch(t){}me&&me(vt,gt)}Ct({global:!0,wrap:!0,forced:L},{Promise:Tr}),Nt(Tr,wr,!1),_t(wr),pr=i(wr),Ct({target:wr,stat:!0,forced:L},{reject:function(t){var e=Er(this);return e.reject.call(void 0,t),e.promise}}),Ct({target:wr,stat:!0,forced:L},{resolve:function(t){return function(t,e){if(U(t),D(e)&&e.constructor===t)return e;t=gr.f(t);return(0,t.resolve)(e),t.promise}(this,t)}}),Ct({target:wr,stat:!0,forced:zt},{all:function(t){var u=this,e=Er(u),s=e.resolve,c=e.reject,r=vr(function(){var n=Y(u.resolve),i=[],o=0,a=1;Ft(t,function(t){var e=o++,r=!1;i.push(void 0),a++,n.call(u,t).then(function(t){r||(r=!0,i[e]=t,--a||s(i))},c)}),--a||s(i)});return r.error&&c(r.value),e.promise},race:function(t){var r=this,n=Er(r),i=n.reject,e=vr(function(){var e=Y(r.resolve);Ft(t,function(t){e.call(r,t).then(n.resolve,i)})});return e.error&&i(e.value),n.promise}});var Ur=Wt.f;Ct({target:"Reflect",stat:!0},{deleteProperty:function(t,e){var r=Ur(U(t),e);return!(r&&!r.configurable)&&delete t[e]}});function Hr(t,e){return Gr(t=t)&&(r=t.constructor,(ze(r)&&(r===Array||Gr(r.prototype))||D(r)&&null===(r=r[Wr]))&&(r=void 0)),new(void 0===r?Array:r)(0===e?0:e);var r}var Xr=n(function(t){var e=function(a){var s,t=Object.prototype,c=t.hasOwnProperty,e="function"==typeof Symbol?Symbol:{},n=e.iterator||"@@iterator",r=e.asyncIterator||"@@asyncIterator",i=e.toStringTag||"@@toStringTag";function o(t,e,r){return Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}),t[e]}try{o({},"")}catch(a){o=function(t,e,r){return t[e]=r}}function u(t,e,r,n){var i,o,a,u,e=e&&e.prototype instanceof g?e:g,e=Object.create(e.prototype),n=new T(n||[]);return e._invoke=(i=t,o=r,a=n,u=f,function(t,e){if(u===p)throw new Error("Generator is already running");if(u===y){if("throw"===t)throw e;return R()}for(a.method=t,a.arg=e;;){var r=a.delegate;if(r){var n=function t(e,r){var n=e.iterator[r.method];if(n===s){if(r.delegate=null,"throw"===r.method){if(e.iterator.return&&(r.method="return",r.arg=s,t(e,r),"throw"===r.method))return d;r.method="throw",r.arg=new TypeError("The iterator does not provide a 'throw' method")}return d}var n=l(n,e.iterator,r.arg);if("throw"===n.type)return r.method="throw",r.arg=n.arg,r.delegate=null,d;n=n.arg;return n?n.done?(r[e.resultName]=n.value,r.next=e.nextLoc,"return"!==r.method&&(r.method="next",r.arg=s),r.delegate=null,d):n:(r.method="throw",r.arg=new TypeError("iterator result is not an object"),r.delegate=null,d)}(r,a);if(n){if(n===d)continue;return n}}if("next"===a.method)a.sent=a._sent=a.arg;else if("throw"===a.method){if(u===f)throw u=y,a.arg;a.dispatchException(a.arg)}else"return"===a.method&&a.abrupt("return",a.arg);u=p;n=l(i,o,a);if("normal"===n.type){if(u=a.done?y:h,n.arg===d)continue;return{value:n.arg,done:a.done}}"throw"===n.type&&(u=y,a.method="throw",a.arg=n.arg)}}),e}function l(t,e,r){try{return{type:"normal",arg:t.call(e,r)}}catch(t){return{type:"throw",arg:t}}}a.wrap=u;var f="suspendedStart",h="suspendedYield",p="executing",y="completed",d={};function g(){}function v(){}function m(){}var x={};o(x,n,function(){return this});e=Object.getPrototypeOf,e=e&&e(e(A([])));e&&e!==t&&c.call(e,n)&&(x=e);var b=m.prototype=g.prototype=Object.create(x);function w(t){["next","throw","return"].forEach(function(e){o(t,e,function(t){return this._invoke(e,t)})})}function S(a,u){var e;this._invoke=function(r,n){function t(){return new u(function(t,e){!function e(t,r,n,i){t=l(a[t],a,r);if("throw"!==t.type){var o=t.arg;return(r=o.value)&&"object"==typeof r&&c.call(r,"__await")?u.resolve(r.__await).then(function(t){e("next",t,n,i)},function(t){e("throw",t,n,i)}):u.resolve(r).then(function(t){o.value=t,n(o)},function(t){return e("throw",t,n,i)})}i(t.arg)}(r,n,t,e)})}return e=e?e.then(t,t):t()}}function O(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 k(t){var e=t.completion||{};e.type="normal",delete e.arg,t.completion=e}function T(t){this.tryEntries=[{tryLoc:"root"}],t.forEach(O,this),this.reset(!0)}function A(e){if(e){var t=e[n];if(t)return t.call(e);if("function"==typeof e.next)return e;if(!isNaN(e.length)){var r=-1,t=function t(){for(;++r"+t+"<\/script>"},gn=function(){try{ln=new ActiveXObject("htmlfile")}catch(t){}var t,e;gn="undefined"==typeof document||document.domain&&ln?cn(ln):((e=_("iframe")).style.display="none",He.appendChild(e),e.src=String("javascript:"),(t=e.contentWindow.document).open(),t.write(dn("document.F=Object")),t.close(),t.F);for(var r=ie.length;r--;)delete gn.prototype[ie[r]];return gn()};ht[yn]=!0;var vn=Object.create||function(t,e){var r;return null!==t?(sn.prototype=U(t),r=new sn,sn.prototype=null,r[yn]=t):r=gn(),void 0===e?r:pn(r,e)},mn=d.RegExp,N=k(function(){var t=mn(".","s");return!t.dotAll||!t.exec("\n")||"s"!==t.flags}),xn=d.RegExp,yt=k(function(){var t=xn("(?b)","g");return"b"!==t.exec("b").groups.a||"bc"!=="b".replace(t,"$c")}),bn=dt.get,wn=RegExp.prototype.exec,Sn=c("native-string-replace",String.prototype.replace),On=wn,kn=(Xe=/b*/g,wn.call(ur=/a/,"a"),wn.call(Xe,"a"),0!==ur.lastIndex||0!==Xe.lastIndex),Tn=v.UNSUPPORTED_Y||v.BROKEN_CARET,An=void 0!==/()??/.exec("")[1],Rn=On=kn||An||Tn||N||yt?function(t){var e,r,n,i,o,a,u=this,s=bn(u),c=Kr(t),l=s.raw;if(l)return l.lastIndex=u.lastIndex,p=On.call(l,c),u.lastIndex=l.lastIndex,p;var f=s.groups,h=Tn&&u.sticky,t=un.call(u),l=u.source,p=0,s=c;if(h&&(-1===(t=t.replace("y","")).indexOf("g")&&(t+="g"),s=c.slice(u.lastIndex),0]*>)/g,Ln=/\$([$&'`]|\d{1,2})/g,Bn=T("replace"),Dn=Math.max,jn=Math.min,P="$0"==="a".replace(/./,"$0"),Fn=!!/./[Bn]&&""===/./[Bn]("a","$0");ar("replace",function(t,x,b){var w=Fn?"$":"$0";return[function(t,e){var r=l(this),n=null==t?void 0:G(t,Bn);return n?n.call(t,r,e):x.call(Kr(r),t,e)},function(t,e){var r=U(this),n=Kr(t);if("string"==typeof e&&-1===e.indexOf(w)&&-1===e.indexOf("$<")){t=b(x,r,n,e);if(t.done)return t.value}var i=O(e);i||(e=Kr(e));var o,a=r.global;a&&(o=r.unicode,r.lastIndex=0);for(var u=[];;){var s=En(r,n);if(null===s)break;if(u.push(s),!a)break;""===Kr(s[0])&&(r.lastIndex=Pn(n,te(r.lastIndex),o))}for(var c,l="",f=0,h=0;h")})||!P||Fn);function zn(t){var e;return D(t)&&(void 0!==(e=t[Hn])?!!e:"RegExp"==St(t))}function Un(t){if(zn(t))throw TypeError("The method doesn't accept regular expressions");return t}var Hn=T("match"),Xn=T("match"),mt=function(e){var r=/./;try{"/./"[e](r)}catch(t){try{return r[Xn]=!1,"/./"[e](r)}catch(e){}}return!1},w=Wt.f,Yn="".startsWith,Gn=Math.min,ve=mt("startsWith"),vt=!(ve||(!(oo=w(String.prototype,"startsWith"))||oo.writable));function Wn(t){return t.replace(/(?!\u3000)\s+/gm," ")}function qn(t){return t.replace(/^[\n \t]+/,"")}function $n(t){return t.replace(/[\n \t]+$/,"")}function Qn(t){return((t||"").match(/-?(\d+(?:\.\d*(?:[eE][+-]?\d+)?)?|\.\d+)(?=\D|$)/gm)||[]).map(parseFloat)}Ct({target:"String",proto:!0,forced:!vt&&!ve},{startsWith:function(t){var e=Kr(l(this));Un(t);var r=te(Gn(1t.length)&&(e=t.length);for(var r=0,n=new Array(e);r~.[:]+)/g,li=/(\.[^\s+>~.[:]+)/g,fi=/(::[^\s+>~.[:]+|:first-line|:first-letter|:before|:after)/gi,hi=/(:[\w-]+\([^)]*\))/gi,pi=/(:[^\s+>~.[:]+)/g,yi=/([^\s+>~.[:]+)/g;function di(t,e){var r=e.exec(t);return r?[t.replace(e," "),r.length]:[t,0]}function gi(t){var e=[0,0,0],t=di(r=t.replace(/:not\(([^)]*)\)/g," $1 ").replace(/{[\s\S]*/gm," "),si),t=ui(t,2),r=t[0],n=t[1];e[1]+=n;t=di(r,ci),t=ui(t,2);r=t[0],n=t[1],e[0]+=n;t=di(r,li),t=ui(t,2);r=t[0],n=t[1],e[1]+=n;t=di(r,fi),t=ui(t,2);r=t[0],n=t[1],e[2]+=n;t=di(r,hi),t=ui(t,2);r=t[0],n=t[1],e[1]+=n;t=di(r,pi),t=ui(t,2);r=t[0],n=t[1],e[1]+=n;t=di(r=r.replace(/[*\s+>~]/g," ").replace(/[#.]/g," "),yi),t=ui(t,2);return r=t[0],n=t[1],e[2]+=n,e.join("")}var vi=1e-8;function mi(t){return Math.sqrt(Math.pow(t[0],2)+Math.pow(t[1],2))}function xi(t,e){return(t[0]*e[0]+t[1]*e[1])/(mi(t)*mi(e))}function bi(t,e){return(t[0]*e[1]_i)throw TypeError(Ii);for(e=0;e>>0;if(0==n)return[];if(void 0===t)return[r];if(!zn(t))return y.call(r,t,n);for(var i,o,a,u=[],e=(t.ignoreCase?"i":"")+(t.multiline?"m":"")+(t.unicode?"u":"")+(t.sticky?"y":""),s=0,c=new RegExp(t.source,e+"g");(i=Rn.call(c,r))&&!((o=c.lastIndex)>s&&(u.push(r.slice(s,i.index)),1=n));)c.lastIndex===i.index&&c.lastIndex++;return s===r.length?!a&&c.test("")||u.push(""):u.push(r.slice(s)),u.length>n?u.slice(0,n):u}:"0".split(void 0,0).length?function(t,e){return void 0===t&&0===e?[]:y.call(this,t,e)}:y;return[function(t,e){var r=l(this),n=null==t?void 0:G(t,i);return n?n.call(t,r,e):g.call(Kr(r),t,e)},function(t,e){var r=U(this),n=Kr(t),i=d(g,r,n,e,g!==y);if(i.done)return i.value;var t=Ne(r,RegExp),o=r.unicode,i=(r.ignoreCase?"i":"")+(r.multiline?"m":"")+(r.unicode?"u":"")+(ji?"g":"y"),a=new t(ji?"^(?:"+r.source+")":r,i),u=void 0===e?Ui:e>>>0;if(0==u)return[];if(0===n.length)return null===En(a,n)?[n]:[];for(var s=0,c=0,l=[];c "+u.toRGB()+" -> "+u.toHex());a.appendChild(s),a.appendChild(c),o.appendChild(a)}catch(e){}return o}}var To=(Mi(Ao,[{key:"split",value:function(){var t=0=m&&(n=r-i%m,o.shouldUpdate(c,h)&&(o.render(e,l,f,p,y,d,g),v.runEvents())),o.intervalId=mo(t)},a||v.start(),this.intervalId=mo(u))}},{key:"stop",value:function(){this.intervalId&&(mo.cancel(this.intervalId),this.intervalId=null),this.mouse.stop()}},{key:"shouldUpdate",value:function(t,e){if(!t){var r=this.frameDuration;if(this.animations.reduce(function(t,e){return e.update(r)||t},!1))return!0}return!("function"!=typeof e||!e())||!(this.isReadyLock||!this.isReady())||!!this.mouse.hasEvents()}},{key:"render",value:function(t,e,r,n,i,o,a){var u=this.CLIENT_WIDTH,s=this.CLIENT_HEIGHT,c=this.viewPort,l=this.ctx,f=this.isFirstRender,h=l.canvas;c.clear(),h.width&&h.height?c.setCurrent(h.width,h.height):c.setCurrent(u,s);var p=t.getStyle("width"),u=t.getStyle("height");!e&&(f||"number"!=typeof n&&"number"!=typeof i)&&(p.hasValue()&&(h.width=p.getPixels("x"),h.style&&(h.style.width="".concat(h.width,"px"))),u.hasValue()&&(h.height=u.getPixels("y"),h.style&&(h.style.height="".concat(h.height,"px"))));var y,s=h.clientWidth||h.width,h=h.clientHeight||h.height;e&&p.hasValue()&&u.hasValue()&&(s=p.getPixels("x"),h=u.getPixels("y")),c.setCurrent(s,h),"number"==typeof o&&t.getAttribute("x",!0).setValue(o),"number"==typeof a&&t.getAttribute("y",!0).setValue(a),"number"!=typeof n&&"number"!=typeof i||(c=Qn(t.getAttribute("viewBox").getString()),a=o=0,"number"==typeof n&&((y=t.getStyle("width")).hasValue()?o=y.getPixels("x")/n:isNaN(c[2])||(o=c[2]/n)),"number"==typeof i&&((y=t.getStyle("height")).hasValue()?a=y.getPixels("y")/i:isNaN(c[3])||(a=c[3]/i)),o=o||a,a=a||o,t.getAttribute("width",!0).setValue(n),t.getAttribute("height",!0).setValue(i),(i=t.getStyle("transform",!0,!0)).setValue("".concat(i.getString()," scale(").concat(1/o,", ").concat(1/a,")"))),r||l.clearRect(0,0,s,h),t.render(l),f&&(this.isFirstRender=!1)}}]),jo);function jo(t){var e=1=e.length?{value:void 0,done:!0}:(r=Aa(e,r),t.index+=r.length,{value:r,done:!1})});var Ca=n(function(t){t.exports=function(t){if(Array.isArray(t))return ii(t)},t.exports.default=t.exports,t.exports.__esModule=!0}),Ma=n(function(t){t.exports=function(t){if("undefined"!=typeof Symbol&&null!=t[Symbol.iterator]||null!=t["@@iterator"])return Array.from(t)},t.exports.default=t.exports,t.exports.__esModule=!0}),Na=n(function(t){t.exports=function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")},t.exports.default=t.exports,t.exports.__esModule=!0}),_a=r(n(function(t){t.exports=function(t){return Ca(t)||Ma(t)||oi(t)||Na()},t.exports.default=t.exports,t.exports.__esModule=!0})),c=(Mi(Da,[{key:"apply",value:function(t){var e=this.point,r=e.x,e=e.y;t.translate(r||0,e||0)}},{key:"unapply",value:function(t){var e=this.point,r=e.x,e=e.y;t.translate(-1*r||0,-1*e||0)}},{key:"applyToPoint",value:function(t){var e=this.point,r=e.x,e=e.y;t.applyTransform([1,0,0,1,r||0,e||0])}}]),Da),v=(Mi(Ba,[{key:"apply",value:function(t){var e=this.cx,r=this.cy,n=this.originX,i=this.originY,o=this.angle,n=e+n.getPixels("x"),i=r+i.getPixels("y");t.translate(n,i),t.rotate(o.getRadians()),t.translate(-n,-i)}},{key:"unapply",value:function(t){var e=this.cx,r=this.cy,n=this.originX,i=this.originY,o=this.angle,n=e+n.getPixels("x"),i=r+i.getPixels("y");t.translate(n,i),t.rotate(-1*o.getRadians()),t.translate(-n,-i)}},{key:"applyToPoint",value:function(t){var e=this.cx,r=this.cy,n=this.angle.getRadians();t.applyTransform([1,0,0,1,e||0,r||0]),t.applyTransform([Math.cos(n),Math.sin(n),-Math.sin(n),Math.cos(n),0,0]),t.applyTransform([1,0,0,1,-e||0,-r||0])}}]),Ba),ar=(Mi(La,[{key:"apply",value:function(t){var e=this.scale,r=e.x,n=e.y,i=this.originX,e=this.originY,i=i.getPixels("x"),e=e.getPixels("y");t.translate(i,e),t.scale(r,n||r),t.translate(-i,-e)}},{key:"unapply",value:function(t){var e=this.scale,r=e.x,n=e.y,i=this.originX,e=this.originY,i=i.getPixels("x"),e=e.getPixels("y");t.translate(i,e),t.scale(1/r,1/n||r),t.translate(-i,-e)}},{key:"applyToPoint",value:function(t){var e=this.scale,r=e.x,e=e.y;t.applyTransform([r||0,0,0,e||0,0,0])}}]),La),Ia=(Mi(Va,[{key:"apply",value:function(t){var e=this.originX,r=this.originY,n=this.matrix,e=e.getPixels("x"),r=r.getPixels("y");t.translate(e,r),t.transform(n[0],n[1],n[2],n[3],n[4],n[5]),t.translate(-e,-r)}},{key:"unapply",value:function(t){var e=this.originX,r=this.originY,n=this.matrix,i=n[0],o=n[2],a=n[4],u=n[1],s=n[3],c=n[5],n=1/(i*(+s-0*c)-o*(+u-0*c)+a*(0*u-0*s)),e=e.getPixels("x"),r=r.getPixels("y");t.translate(e,r),t.transform(n*(+s-0*c),n*(0*c-+u),n*(0*a-+o),n*(+i-0*a),n*(o*c-a*s),n*(a*u-i*c)),t.translate(-e,-r)}},{key:"applyToPoint",value:function(t){t.applyTransform(this.matrix)}}]),Va);function Va(t,e,r){Ci(this,Va),this.type="matrix",this.matrix=[],this.originX=null,this.originY=null,this.matrix=Qn(e),this.originX=r[0],this.originY=r[1]}function La(t,e,r){Ci(this,La),this.type="scale",this.scale=null,this.originX=null,this.originY=null;e=Io.parseScale(e);0!==e.x&&0!==e.y||(e.x=vi,e.y=vi),this.scale=e,this.originX=r[0],this.originY=r[1]}function Ba(t,e,r){Ci(this,Ba),this.type="rotate",this.angle=null,this.originX=null,this.originY=null,this.cx=0,this.cy=0;e=Qn(e);this.angle=new To(t,"angle",e[0]),this.originX=r[0],this.originY=r[1],this.cx=e[1]||0,this.cy=e[2]||0}function Da(t,e){Ci(this,Da),this.type="translate",this.point=null,this.point=Io.parse(e)}var ja=function(){qo(o,Ia);var r,n,i=(r=o,n=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch(t){return!1}}(),function(){var t,e=ta(r);return e=n?(t=ta(this).constructor,Reflect.construct(e,arguments,t)):e.apply(this,arguments),Ko(this,e)});function o(t,e,r){return Ci(this,o),(r=i.call(this,t,e,r)).type="skew",r.angle=null,r.angle=new To(t,"angle",e),r}return o}();Xe=function(){qo(o,ja);var r,n,i=(r=o,n=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch(t){return!1}}(),function(){var t,e=ta(r);return e=n?(t=ta(this).constructor,Reflect.construct(e,arguments,t)):e.apply(this,arguments),Ko(this,e)});function o(t,e,r){return Ci(this,o),(r=i.call(this,t,e,r)).type="skewX",r.matrix=[1,0,Math.tan(r.angle.getRadians()),1,0,0],r}return o}();var N=function(){qo(o,ja);var r,n,i=(r=o,n=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch(t){return!1}}(),function(){var t,e=ta(r);return e=n?(t=ta(this).constructor,Reflect.construct(e,arguments,t)):e.apply(this,arguments),Ko(this,e)});function o(t,e,r){return Ci(this,o),(r=i.call(this,t,e,r)).type="skewY",r.matrix=[1,Math.tan(r.angle.getRadians()),0,1,0,0],r}return o}(),Fa=(Mi(za,[{key:"apply",value:function(t){for(var e=this.transforms,r=e.length,n=0;nru;ru++)p(Za,Ja=eu[ru])&&!p(tu,Ja)&&$a(tu,Ja,qa(Za,Ja));(tu.prototype=P).constructor=tu,bt(d,"Number",tu)}var nu=n(function(t){t.exports=function(t,e){for(;!Object.prototype.hasOwnProperty.call(t,e)&&null!==(t=Jo(t)););return t},t.exports.default=t.exports,t.exports.__esModule=!0}),iu=r(n(function(n){function i(t,e,r){return"undefined"!=typeof Reflect&&Reflect.get?n.exports=i=Reflect.get:n.exports=i=function(t,e,r){t=nu(t,e);if(t){e=Object.getOwnPropertyDescriptor(t,e);return e.get?e.get.call(r):e.value}},n.exports.default=n.exports,n.exports.__esModule=!0,i(t,e,r||t)}n.exports=i,n.exports.default=n.exports,n.exports.__esModule=!0}));function ou(t){t=t.trim();return/^('|")/.test(t)?t:'"'.concat(t,'"')}var au=(Mi(uu,[{key:"toString",value:function(){return[function(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:""}}(this.fontStyle),this.fontVariant,function(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:""}}(this.fontWeight),this.fontSize,(t=this.fontFamily,"undefined"==typeof process?t:t.trim().split(",").map(ou).join(","))].join(" ").trim();var t}}],[{key:"parse",value:function(){var t=0this.x2&&(this.x2=t)),void 0!==e&&((isNaN(this.y1)||isNaN(this.y2))&&(this.y1=e,this.y2=e),ethis.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){var e,r,n;t&&(e=t.x1,r=t.y1,n=t.x2,t=t.y2,this.addPoint(e,r),this.addPoint(n,t))}},{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 o,a,u=6*e-12*r+6*n,s=-3*e+9*r-9*n+3*i,c=3*r-3*e;0!=s?(o=Math.pow(u,2)-4*c*s)<0||(0<(a=(-u+Math.sqrt(o))/(2*s))&&a<1&&(t?this.addX(this.sumCubic(a,e,r,n,i)):this.addY(this.sumCubic(a,e,r,n,i))),0<(s=(-u-Math.sqrt(o))/(2*s))&&s<1&&(t?this.addX(this.sumCubic(s,e,r,n,i)):this.addY(this.sumCubic(s,e,r,n,i)))):0==u||0<(u=-c/u)&&u<1&&(t?this.addX(this.sumCubic(u,e,r,n,i)):this.addY(this.sumCubic(u,e,r,n,i)))}},{key:"addBezierCurve",value:function(t,e,r,n,i,o,a,u){this.addPoint(t,e),this.addPoint(a,u),this.bezierCurveAdd(!0,t,r,i,a),this.bezierCurveAdd(!1,e,n,o,u)}},{key:"addQuadraticCurve",value:function(t,e,r,n,i,o){r=t+2/3*(r-t),n=e+2/3*(n-e);this.addBezierCurve(t,e,r,r+1/3*(i-t),n,n+1/3*(o-e),i,o)}},{key:"isPointInBox",value:function(t,e){var r=this.x1,n=this.y1,i=this.x2,o=this.y2;return r<=t&&t<=i&&n<=e&&e<=o}},{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}}]),cu);function cu(){var t=0t.phi1&&(t.phi2-=2*yu),1===t.sweepFlag&&t.phi2T.maxX&&(T.maxX=t),tT.maxY&&(T.maxY=t),td&&xd&&x=this.commands.length-1}},{key:"next",value:function(){var t=this.commands[++this.i];return this.previousCommand=this.command,this.command=t}},{key:"getPoint",value:function(){var t=new Io(this.command[0=this.leafTexts.length)){for(var t=this.leafTexts[this.textChunkStart],e=t.getStyle("text-anchor").getString("start"),r="start"===e?t.x-this.minX:"end"===e?t.x-this.maxX:t.x-(this.minX+this.maxX)/2,n=this.textChunkStart;n=e.length?{value:t.target=void 0,done:!0}:"keys"==r?{value:n,done:!1}:"values"==r?{value:e[n],done:!1}:{value:[n,e[n]],done:!1}},"values");Se.Arguments=Se.Array,tn("keys"),tn("values"),tn("entries");function ns(t,e){if(t){if(t[os]!==us)try{Z(t,os,us)}catch(e){t[os]=us}if(t[as]||Z(t,as,e),_o[e])for(var r in rs)if(t[r]!==rs[r])try{Z(t,r,rs[r])}catch(e){t[r]=rs[r]}}}var is,os=T("iterator"),as=T("toStringTag"),us=rs.values;for(is in _o)ns(d[is]&&d[is].prototype,is);ns(le,"DOMTokenList");var ss=function(){qo(o,Ua);var r,n,i=(r=o,n=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch(t){return!1}}(),function(){var t,e=ta(r);return e=n?(t=ta(this).constructor,Reflect.construct(e,arguments,t)):e.apply(this,arguments),Ko(this,e)});function o(t,e,r){Ci(this,o),(r=i.call(this,t,e,r)).type="animate",r.duration=0,r.initialValue=null,r.initialUnits="",r.removed=!1,r.frozen=!1,t.screen.animations.push(Zo(r)),r.begin=r.getAttribute("begin").getMilliseconds(),r.maxDuration=r.begin+r.getAttribute("dur").getMilliseconds(),r.from=r.getAttribute("from"),r.to=r.getAttribute("to"),r.values=new To(t,"values",null);t=r.getAttribute("values");return t.hasValue()&&r.values.setValue(t.getString().split(";")),r}return Mi(o,[{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,e=e.to,r=n.getNumber()+(e.getNumber()-n.getNumber())*r;return"%"===t&&(r*=100),"".concat(r).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;n=!1;return this.begint.length)&&(e=t.length);for(var r=0,n=new Array(e);r=t.length?{done:!0}:{done:!1,value:t[n++]}},e:function(t){throw t},f:e}}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 i,o=!0,a=!1;return{s:function(){r=r.call(t)},n:function(){var t=r.next();return o=t.done,t},e:function(t){a=!0,i=t},f:function(){try{o||null==r.return||r.return()}finally{if(a)throw i}}}}(Zo(n).children);try{for(a.s();!(i=a.n()).done;){var u=i.value;switch(u.type){case"font-face":var s=(n.fontFace=u).getStyle("font-family");s.hasValue()&&(o[s.getString()]=Zo(n));break;case"missing-glyph":n.missingGlyph=u;break;case"glyph":var c=u;c.arabicForm?(n.isRTL=!0,n.isArabic=!0,void 0===n.glyphs[c.unicode]&&(n.glyphs[c.unicode]={}),n.glyphs[c.unicode][c.arabicForm]=c):n.glyphs[c.unicode]=c}}}catch(t){a.e(t)}finally{a.f()}return n}return Mi(f,[{key:"render",value:function(){}}]),f}();yt=function(){qo(o,Ua);var r,n,i=(r=o,n=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch(t){return!1}}(),function(){var t,e=ta(r);return e=n?(t=ta(this).constructor,Reflect.construct(e,arguments,t)):e.apply(this,arguments),Ko(this,e)});function o(t,e,r){return Ci(this,o),(r=i.call(this,t,e,r)).type="font-face",r.ascent=r.getAttribute("ascent").getNumber(),r.descent=r.getAttribute("descent").getNumber(),r.unitsPerEm=r.getAttribute("units-per-em").getNumber(),r}return o}();x=function(){qo(i,zu);var r,n,e=(r=i,n=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch(t){return!1}}(),function(){var t,e=ta(r);return e=n?(t=ta(this).constructor,Reflect.construct(e,arguments,t)):e.apply(this,arguments),Ko(this,e)});function i(){var t;return Ci(this,i),(t=e.apply(this,arguments)).type="missing-glyph",t.horizAdvX=0,t}return i}();ct=function(){qo(i,Hu);var r,n,e=(r=i,n=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch(t){return!1}}(),function(){var t,e=ta(r);return e=n?(t=ta(this).constructor,Reflect.construct(e,arguments,t)):e.apply(this,arguments),Ko(this,e)});function i(){var t;return Ci(this,i),(t=e.apply(this,arguments)).type="tref",t}return Mi(i,[{key:"getText",value:function(){var t=this.getHrefAttribute().getDefinition();if(t){t=t.children[0];if(t)return t.getText()}return""}}]),i}();var ls,fs,hs,ps,ys,ds,gs,vs,P=function(){qo(o,Hu);var r,n,i=(r=o,n=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch(t){return!1}}(),function(){var t,e=ta(r);return e=n?(t=ta(this).constructor,Reflect.construct(e,arguments,t)):e.apply(this,arguments),Ko(this,e)});function o(t,e,r){Ci(this,o),(t=i.call(this,t,e,r)).type="a";r=e.childNodes,e=r[0],r=0t.length)&&(e=t.length);for(var r=0,n=new Array(e);r=t.length?{done:!0}:{done:!1,value:t[n++]}},e:function(t){throw t},f:e}}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 i,o=!0,a=!1;return{s:function(){r=r.call(t)},n:function(){var t=r.next();return o=t.done,t},e:function(t){a=!0,i=t},f:function(){try{o||null==r.return||r.return()}finally{if(a)throw i}}}}(this.dataArray);try{for(o.s();!(i=o.n()).done;){var a=i.value;if(!a||!(a.pathLength<5e-5||r+a.pathLength+5e-5=i&&(this.equidistantCache.points.push({x:u.x,y:u.y,distance:a}),o-=i)}}}},{key:"getEquidistantPointOnPath",value:function(t,e,r){if(this.buildEquidistantCache(e,r),t<0||5e-5>x;0!=(o[v+3]=Y)?(o[v]=(I*m>>x)*(q=255/Y),o[v+1]=(V*m>>x)*q,o[v+2]=(L*m>>x)*q):o[v]=o[v+1]=o[v+2]=0,I-=C,V-=M,L-=N,B-=_,C-=y.r,M-=y.g,N-=y.b,_-=y.a;var G=g+((G=X+n+1)>x,0>x)*(J=255/J),o[vt+1]=(ot*m>>x)*J,o[vt+2]=(at*m>>x)*J):o[vt]=o[vt+1]=o[vt+2]=0,it-=tt,ot-=et,at-=rt,ut-=nt,tt-=y.r,et-=y.g,rt-=y.b,nt-=y.a,vt=$+((vt=gt+c)