-
Notifications
You must be signed in to change notification settings - Fork 1
/
svg.min.js
3 lines (3 loc) · 114 KB
/
svg.min.js
1
2
3
/*! @svgdotjs/svg.js v3.0.13 MIT*/;
var SVG=function(){"use strict";function t(t,e){return t(e={exports:{}},e.exports),e.exports}var m=t(function(t){var e=t.exports="undefined"!=typeof window&&window.Math==Math?window:"undefined"!=typeof self&&self.Math==Math?self:Function("return this")();"number"==typeof __g&&(__g=e)}),y=t(function(t){var e=t.exports={version:"2.5.7"};"number"==typeof __e&&(__e=e)}),g=function(t){return"object"==typeof t?null!==t:"function"==typeof t},p=function(t){if(!g(t))throw TypeError(t+" is not an object!");return t},w=function(t){try{return!!t()}catch(t){return!0}},o=!w(function(){return 7!=Object.defineProperty({},"a",{get:function(){return 7}}).a}),e=m.document,n=g(e)&&g(e.createElement),r=function(t){return n?e.createElement(t):{}},i=!o&&!w(function(){return 7!=Object.defineProperty(r("div"),"a",{get:function(){return 7}}).a}),l=function(t,e){if(!g(t))return t;var n,r;if(e&&"function"==typeof(n=t.toString)&&!g(r=n.call(t)))return r;if("function"==typeof(n=t.valueOf)&&!g(r=n.call(t)))return r;if(!e&&"function"==typeof(n=t.toString)&&!g(r=n.call(t)))return r;throw TypeError("Can't convert object to primitive value")},s=Object.defineProperty,a={f:o?Object.defineProperty:function(t,e,n){if(p(t),e=l(e,!0),p(n),i)try{return s(t,e,n)}catch(t){}if("get"in n||"set"in n)throw TypeError("Accessors not supported!");return"value"in n&&(t[e]=n.value),t}},k=function(t,e){return{enumerable:!(1&t),configurable:!(2&t),writable:!(4&t),value:e}},x=o?function(t,e,n){return a.f(t,e,k(1,n))}:function(t,e,n){return t[e]=n,t},u={}.hasOwnProperty,h=function(t,e){return u.call(t,e)},c=0,f=Math.random(),v=function(t){return"Symbol(".concat(void 0===t?"":t,")_",(++c+f).toString(36))},O=t(function(t){var s=v("src"),e="toString",n=Function[e],o=(""+n).split(e);y.inspectSource=function(t){return n.call(t)},(t.exports=function(t,e,n,r){var i="function"==typeof n;i&&(h(n,"name")||x(n,"name",e)),t[e]!==n&&(i&&(h(n,s)||x(n,s,t[e]?""+t[e]:o.join(String(e)))),t===m?t[e]=n:r?t[e]?t[e]=n:x(t,e,n):(delete t[e],x(t,e,n)))})(Function.prototype,e,function(){return"function"==typeof this&&this[s]||n.call(this)})}),d=function(t){if("function"!=typeof t)throw TypeError(t+" is not a function!");return t},_=function(r,i,t){if(d(r),void 0===i)return r;switch(t){case 1:return function(t){return r.call(i,t)};case 2:return function(t,e){return r.call(i,t,e)};case 3:return function(t,e,n){return r.call(i,t,e,n)}}return function(){return r.apply(i,arguments)}},b="prototype",S=function(t,e,n){var r,i,s,o,u=t&S.F,a=t&S.G,h=t&S.S,l=t&S.P,c=t&S.B,f=a?m:h?m[e]||(m[e]={}):(m[e]||{})[b],v=a?y:y[e]||(y[e]={}),d=v[b]||(v[b]={});for(r in a&&(n=e),n)s=((i=!u&&f&&void 0!==f[r])?f:n)[r],o=c&&i?_(s,m):l&&"function"==typeof s?_(Function.call,s):s,f&&O(f,r,s,t&S.U),v[r]!=s&&x(v,r,o),l&&d[r]!=s&&(d[r]=s)};m.core=y,S.F=1,S.G=2,S.S=4,S.P=8,S.B=16,S.W=32,S.U=64,S.R=128;var M=S,E={}.toString,T=function(t){return E.call(t).slice(8,-1)},j=Object("z").propertyIsEnumerable(0)?Object:function(t){return"String"==T(t)?t.split(""):Object(t)},C=function(t){if(null==t)throw TypeError("Can't call method on "+t);return t},N=function(t){return j(C(t))},P=Math.ceil,I=Math.floor,L=function(t){return isNaN(t=+t)?0:(0<t?I:P)(t)},F=Math.min,R=function(t){return 0<t?F(L(t),9007199254740991):0},D=Math.max,z=Math.min,q=function(h){return function(t,e,n){var r,i,s,o=N(t),u=R(o.length),a=(i=u,(r=L(r=n))<0?D(r+i,0):z(r,i));if(h&&e!=e){for(;a<u;)if((s=o[a++])!=s)return!0}else for(;a<u;a++)if((h||a in o)&&o[a]===e)return h||a||0;return!h&&-1}},Y=t(function(t){var e="__core-js_shared__",n=m[e]||(m[e]={});(t.exports=function(t,e){return n[t]||(n[t]=void 0!==e?e:{})})("versions",[]).push({version:y.version,mode:"global",copyright:"© 2018 Denis Pushkarev (zloirock.ru)"})}),X=Y("keys"),V=function(t){return X[t]||(X[t]=v(t))},H=q(!1),B=V("IE_PROTO"),U=function(t,e){var n,r=N(t),i=0,s=[];for(n in r)n!=B&&h(r,n)&&s.push(n);for(;e.length>i;)h(r,n=e[i++])&&(~H(s,n)||s.push(n));return s},W="constructor,hasOwnProperty,isPrototypeOf,propertyIsEnumerable,toLocaleString,toString,valueOf".split(","),Q=Object.keys||function(t){return U(t,W)},$={f:Object.getOwnPropertySymbols},J={f:{}.propertyIsEnumerable},Z=function(t){return Object(C(t))},K=Object.assign,tt=!K||w(function(){var A={},e={},t=Symbol(),n="abcdefghijklmnopqrst";return A[t]=7,n.split("").forEach(function(t){e[t]=t}),7!=K({},A)[t]||Object.keys(K({},e)).join("")!=n})?function(t,e){for(var n=Z(t),r=arguments.length,i=1,s=$.f,o=J.f;i<r;)for(var u,a=j(arguments[i++]),h=s?Q(a).concat(s(a)):Q(a),l=h.length,c=0;c<l;)o.call(a,u=h[c++])&&(n[u]=a[u]);return n}:K;M(M.S+M.F,"Object",{assign:tt});var et=a.f,nt=Function.prototype,rt=/^\s*function ([^ (]*)/;function it(t){return(it="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}function st(t){return(st="function"==typeof Symbol&&"symbol"===it(Symbol.iterator)?function(t){return it(t)}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":it(t)})(t)}"name"in nt||o&&et(nt,"name",{configurable:!0,get:function(){try{return(""+this).match(rt)[1]}catch(t){return""}}});var ot=t(function(t){var e=Y("wks"),Symbol=m.Symbol,n="function"==typeof Symbol;(t.exports=function(t){return e[t]||(e[t]=n&&Symbol[t]||(n?Symbol:v)("Symbol."+t))}).store=e}),ut=ot("unscopables"),at=Array.prototype;null==at[ut]&&x(at,ut,{});var ht=function(t){at[ut][t]=!0},lt=function(t,e){return{value:e,done:!!t}},ct={},ft=o?Object.defineProperties:function(t,e){p(t);for(var n,r=Q(e),i=r.length,s=0;s<i;)a.f(t,n=r[s++],e[n]);return t},vt=m.document,dt=vt&&vt.documentElement,yt=V("IE_PROTO"),pt=function(){},mt="prototype",gt=function(){var t,e=r("iframe"),n=W.length;for(e.style.display="none",dt.appendChild(e),e.src="javascript:",(t=e.contentWindow.document).open(),t.write("<script>document.F=Object<\/script>"),t.close(),gt=t.F;n--;)delete gt[mt][W[n]];return gt()},wt=Object.create||function(t,e){var n;return null!==t?(pt[mt]=p(t),n=new pt,pt[mt]=null,n[yt]=t):n=gt(),void 0===e?n:ft(n,e)},_t=a.f,bt=ot("toStringTag"),kt=function(t,e,n){t&&!h(t=n?t:t.prototype,bt)&&_t(t,bt,{configurable:!0,value:e})},xt={};x(xt,ot("iterator"),function(){return this});var Ot=V("IE_PROTO"),St=Object.prototype,Mt=Object.getPrototypeOf||function(t){return t=Z(t),h(t,Ot)?t[Ot]:"function"==typeof t.constructor&&t instanceof t.constructor?t.constructor.prototype:t instanceof Object?St:null},At=ot("iterator"),Et=!([].keys&&"next"in[].keys()),Tt="values",jt=function(){return this},Ct=function(t,e,n,r,i,s,o){var u,a,h;a=e,h=r,(u=n).prototype=wt(xt,{next:k(1,h)}),kt(u,a+" Iterator");var l,c,f,v=function(t){if(!Et&&t in m)return m[t];switch(t){case"keys":case Tt:return function(){return new n(this,t)}}return function(){return new n(this,t)}},d=e+" Iterator",y=i==Tt,p=!1,m=t.prototype,g=m[At]||m["@@iterator"]||i&&m[i],w=g||v(i),_=i?y?v("entries"):w:void 0,b="Array"==e&&m.entries||g;if(b&&(f=Mt(b.call(new t)))!==Object.prototype&&f.next&&(kt(f,d,!0),"function"!=typeof f[At]&&x(f,At,jt)),y&&g&&g.name!==Tt&&(p=!0,w=function(){return g.call(this)}),(Et||p||!m[At])&&x(m,At,w),ct[e]=w,ct[d]=jt,i)if(l={values:y?w:v(Tt),keys:s?w:v("keys"),entries:_},o)for(c in l)c in m||O(m,c,l[c]);else M(M.P+M.F*(Et||p),e,l);return l},Nt=Ct(Array,"Array",function(t,e){this._t=N(t),this._i=0,this._k=e},function(){var t=this._t,e=this._k,n=this._i++;return!t||n>=t.length?(this._t=void 0,lt(1)):lt(0,"keys"==e?n:"values"==e?t[n]:[n,t[n]])},"values");ct.Arguments=ct.Array,ht("keys"),ht("values"),ht("entries");var Pt,It=(Pt=!0,function(t,e){var n,r,i=String(C(t)),s=L(e),o=i.length;return s<0||o<=s?Pt?"":void 0:(n=i.charCodeAt(s))<55296||56319<n||s+1===o||(r=i.charCodeAt(s+1))<56320||57343<r?Pt?i.charAt(s):n:Pt?i.slice(s,s+2):r-56320+(n-55296<<10)+65536});Ct(String,"String",function(t){this._t=String(t),this._i=0},function(){var t,e=this._t,n=this._i;return n>=e.length?{value:void 0,done:!0}:(t=It(e,n),this._i+=t.length,{value:t,done:!1})});var Lt=function(t,e,n){for(var r in e)O(t,r,e[r],n);return t},Ft=function(t,e,n,r){if(!(t instanceof e)||void 0!==r&&r in t)throw TypeError(n+": incorrect invocation!");return t},Rt=function(e,t,n,r){try{return r?t(p(n)[0],n[1]):t(n)}catch(t){var i=e.return;throw void 0!==i&&p(i.call(e)),t}},Dt=ot("iterator"),zt=Array.prototype,qt=ot("toStringTag"),Yt="Arguments"==T(function(){return arguments}()),Xt=ot("iterator"),Gt=y.getIteratorMethod=function(t){if(null!=t)return t[Xt]||t["@@iterator"]||ct[(e=t,void 0===e?"Undefined":null===e?"Null":"string"==typeof(r=function(t,e){try{return t[e]}catch(t){}}(n=Object(e),qt))?r:Yt?T(n):"Object"==(i=T(n))&&"function"==typeof n.callee?"Arguments":i)];var e,n,r,i},Vt=t(function(t){var v={},d={},e=t.exports=function(t,e,n,r,i){var s,o,u,a,h,l=i?function(){return t}:Gt(t),c=_(n,r,e?2:1),f=0;if("function"!=typeof l)throw TypeError(t+" is not iterable!");if(void 0===(h=l)||ct.Array!==h&&zt[Dt]!==h){for(u=l.call(t);!(o=u.next()).done;)if((a=Rt(u,c,o.value,e))===v||a===d)return a}else for(s=R(t.length);f<s;f++)if((a=e?c(p(o=t[f])[0],o[1]):c(t[f]))===v||a===d)return a};e.BREAK=v,e.RETURN=d}),Ht=ot("species"),Bt=t(function(t){var n=v("meta"),e=a.f,r=0,i=Object.isExtensible||function(){return!0},s=!w(function(){return i(Object.preventExtensions({}))}),o=function(t){e(t,n,{value:{i:"O"+ ++r,w:{}}})},u=t.exports={KEY:n,NEED:!1,fastKey:function(t,e){if(!g(t))return"symbol"==typeof t?t:("string"==typeof t?"S":"P")+t;if(!h(t,n)){if(!i(t))return"F";if(!e)return"E";o(t)}return t[n].i},getWeak:function(t,e){if(!h(t,n)){if(!i(t))return!0;if(!e)return!1;o(t)}return t[n].w},onFreeze:function(t){return s&&u.NEED&&i(t)&&!h(t,n)&&o(t),t}}}),Ut=function(t,e){if(!g(t)||t._t!==e)throw TypeError("Incompatible receiver, "+e+" required!");return t},Wt=a.f,Qt=Bt.fastKey,$t=o?"_s":"size",Jt=function(t,e){var n,r=Qt(e);if("F"!==r)return t._i[r];for(n=t._f;n;n=n.n)if(n.k==e)return n},Zt={getConstructor:function(t,s,n,r){var i=t(function(t,e){Ft(t,i,s,"_i"),t._t=s,t._i=wt(null),t._f=void 0,t._l=void 0,t[$t]=0,null!=e&&Vt(e,n,t[r],t)});return Lt(i.prototype,{clear:function(){for(var t=Ut(this,s),e=t._i,n=t._f;n;n=n.n)n.r=!0,n.p&&(n.p=n.p.n=void 0),delete e[n.i];t._f=t._l=void 0,t[$t]=0},delete:function(t){var e=Ut(this,s),n=Jt(e,t);if(n){var r=n.n,i=n.p;delete e._i[n.i],n.r=!0,i&&(i.n=r),r&&(r.p=i),e._f==n&&(e._f=r),e._l==n&&(e._l=i),e[$t]--}return!!n},forEach:function(t){Ut(this,s);for(var e,n=_(t,1<arguments.length?arguments[1]:void 0,3);e=e?e.n:this._f;)for(n(e.v,e.k,this);e&&e.r;)e=e.p},has:function(t){return!!Jt(Ut(this,s),t)}}),o&&Wt(i.prototype,"size",{get:function(){return Ut(this,s)[$t]}}),i},def:function(t,e,n){var r,i,s=Jt(t,e);return s?s.v=n:(t._l=s={i:i=Qt(e,!0),k:e,v:n,p:r=t._l,n:void 0,r:!1},t._f||(t._f=s),r&&(r.n=s),t[$t]++,"F"!==i&&(t._i[i]=s)),t},getEntry:Jt,setStrong:function(t,n,e){var r;Ct(t,n,function(t,e){this._t=Ut(t,n),this._k=e,this._l=void 0},function(){for(var t=this,e=t._k,n=t._l;n&&n.r;)n=n.p;return t._t&&(t._l=n=n?n.n:t._t._f)?lt(0,"keys"==e?n.k:"values"==e?n.v:[n.k,n.v]):(t._t=void 0,lt(1))},e?"entries":"values",!e,!0),r=m[n],o&&r&&!r[Ht]&&a.f(r,Ht,{configurable:!0,get:function(){return this}})}},Kt=ot("iterator"),te=!1;try{[7][Kt]().return=function(){te=!0}}catch(t){}var ee=Object.getOwnPropertyDescriptor,ne={f:o?ee:function(t,e){if(t=N(t),e=l(e,!0),i)try{return ee(t,e)}catch(t){}if(h(t,e))return k(!J.f.call(t,e),t[e])}},re=function(t,e){if(p(t),!g(e)&&null!==e)throw TypeError(e+": can't set as prototype!")},ie={set:Object.setPrototypeOf||("__proto__"in{}?function(t,n,r){try{(r=_(Function.call,ne.f(Object.prototype,"__proto__").set,2))(t,[]),n=!(t instanceof Array)}catch(t){n=!0}return function(t,e){return re(t,e),n?t.__proto__=e:r(t,e),t}}({},!1):void 0),check:re}.set,se=function(t,e,n){var r,i=e.constructor;return i!==n&&"function"==typeof i&&(r=i.prototype)!==n.prototype&&g(r)&&ie&&ie(t,r),t};!function(r,t,e,n,i,s){var o=m[r],u=o,a=i?"set":"add",h=u&&u.prototype,l={},c=function(t){var n=h[t];O(h,t,"delete"==t?function(t){return!(s&&!g(t))&&n.call(this,0===t?0:t)}:"has"==t?function(t){return!(s&&!g(t))&&n.call(this,0===t?0:t)}:"get"==t?function(t){return s&&!g(t)?void 0:n.call(this,0===t?0:t)}:"add"==t?function(t){return n.call(this,0===t?0:t),this}:function(t,e){return n.call(this,0===t?0:t,e),this})};if("function"==typeof u&&(s||h.forEach&&!w(function(){(new u).entries().next()}))){var f=new u,v=f[a](s?{}:-0,1)!=f,d=w(function(){f.has(1)}),y=function(t,e){if(!e&&!te)return!1;var n=!1;try{var r=[7],i=r[Kt]();i.next=function(){return{done:n=!0}},r[Kt]=function(){return i},t(r)}catch(t){}return n}(function(t){new u(t)}),p=!s&&w(function(){for(var t=new u,e=5;e--;)t[a](e,e);return!t.has(-0)});y||(((u=t(function(t,e){Ft(t,u,r);var n=se(new o,t,u);return null!=e&&Vt(e,i,n[a],n),n})).prototype=h).constructor=u),(d||p)&&(c("delete"),c("has"),i&&c("get")),(p||v)&&c(a),s&&h.clear&&delete h.clear}else u=n.getConstructor(t,r,i,a),Lt(u.prototype,e),Bt.NEED=!0;kt(u,r),l[r]=u,M(M.G+M.W+M.F*(u!=o),l),s||n.setStrong(u,r,i)}("Set",function(t){return function(){return t(this,0<arguments.length?arguments[0]:void 0)}},{add:function(t){return Zt.def(Ut(this,"Set"),t=0===t?0:t,t)}},Zt);function oe(t){return function(t){if(Array.isArray(t)){for(var e=0,n=new Array(t.length);e<t.length;e++)n[e]=t[e];return n}}(t)||function(t){if(Symbol.iterator in Object(t)||"[object Arguments]"===Object.prototype.toString.call(t))return Array.from(t)}(t)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance")}()}var ue={f:ot},ae=a.f,he=function(t){var e=y.Symbol||(y.Symbol=m.Symbol||{});"_"==t.charAt(0)||t in e||ae(e,t,{value:ue.f(t)})};he("asyncIterator");var le=Array.isArray||function(t){return"Array"==T(t)},ce=W.concat("length","prototype"),fe={f:Object.getOwnPropertyNames||function(t){return U(t,ce)}},ve=fe.f,de={}.toString,ye="object"==typeof window&&window&&Object.getOwnPropertyNames?Object.getOwnPropertyNames(window):[],pe={f:function(t){return ye&&"[object Window]"==de.call(t)?function(t){try{return ve(t)}catch(t){return ye.slice()}}(t):ve(N(t))}},me=Bt.KEY,ge=ne.f,we=a.f,_e=pe.f,be=m.Symbol,ke=m.JSON,xe=ke&&ke.stringify,Oe="prototype",Se=ot("_hidden"),Me=ot("toPrimitive"),Ae={}.propertyIsEnumerable,Ee=Y("symbol-registry"),Te=Y("symbols"),je=Y("op-symbols"),Ce=Object[Oe],Ne="function"==typeof be,Pe=m.QObject,Ie=!Pe||!Pe[Oe]||!Pe[Oe].findChild,Le=o&&w(function(){return 7!=wt(we({},"a",{get:function(){return we(this,"a",{value:7}).a}})).a})?function(t,e,n){var r=ge(Ce,e);r&&delete Ce[e],we(t,e,n),r&&t!==Ce&&we(Ce,e,r)}:we,Fe=function(t){var e=Te[t]=wt(be[Oe]);return e._k=t,e},Re=Ne&&"symbol"==typeof be.iterator?function(t){return"symbol"==typeof t}:function(t){return t instanceof be},De=function(t,e,n){return t===Ce&&De(je,e,n),p(t),e=l(e,!0),p(n),h(Te,e)?(n.enumerable?(h(t,Se)&&t[Se][e]&&(t[Se][e]=!1),n=wt(n,{enumerable:k(0,!1)})):(h(t,Se)||we(t,Se,k(1,{})),t[Se][e]=!0),Le(t,e,n)):we(t,e,n)},ze=function(t,e){p(t);for(var n,r=function(t){var e=Q(t),n=$.f;if(n)for(var r,i=n(t),s=J.f,o=0;i.length>o;)s.call(t,r=i[o++])&&e.push(r);return e}(e=N(e)),i=0,s=r.length;i<s;)De(t,n=r[i++],e[n]);return t},qe=function(t){var e=Ae.call(this,t=l(t,!0));return!(this===Ce&&h(Te,t)&&!h(je,t))&&(!(e||!h(this,t)||!h(Te,t)||h(this,Se)&&this[Se][t])||e)},Ye=function(t,e){if(t=N(t),e=l(e,!0),t!==Ce||!h(Te,e)||h(je,e)){var n=ge(t,e);return!n||!h(Te,e)||h(t,Se)&&t[Se][e]||(n.enumerable=!0),n}},Xe=function(t){for(var e,n=_e(N(t)),r=[],i=0;n.length>i;)h(Te,e=n[i++])||e==Se||e==me||r.push(e);return r},Ge=function(t){for(var e,n=t===Ce,r=_e(n?je:N(t)),i=[],s=0;r.length>s;)!h(Te,e=r[s++])||n&&!h(Ce,e)||i.push(Te[e]);return i};Ne||(O((be=function(){if(this instanceof be)throw TypeError("Symbol is not a constructor!");var e=v(0<arguments.length?arguments[0]:void 0),n=function(t){this===Ce&&n.call(je,t),h(this,Se)&&h(this[Se],e)&&(this[Se][e]=!1),Le(this,e,k(1,t))};return o&&Ie&&Le(Ce,e,{configurable:!0,set:n}),Fe(e)})[Oe],"toString",function(){return this._k}),ne.f=Ye,a.f=De,fe.f=pe.f=Xe,J.f=qe,$.f=Ge,o&&O(Ce,"propertyIsEnumerable",qe,!0),ue.f=function(t){return Fe(ot(t))}),M(M.G+M.W+M.F*!Ne,{Symbol:be});for(var Ve="hasInstance,isConcatSpreadable,iterator,match,replace,search,species,split,toPrimitive,toStringTag,unscopables".split(","),He=0;Ve.length>He;)ot(Ve[He++]);for(var Be=Q(ot.store),Ue=0;Be.length>Ue;)he(Be[Ue++]);M(M.S+M.F*!Ne,"Symbol",{for:function(t){return h(Ee,t+="")?Ee[t]:Ee[t]=be(t)},keyFor:function(t){if(!Re(t))throw TypeError(t+" is not a symbol!");for(var e in Ee)if(Ee[e]===t)return e},useSetter:function(){Ie=!0},useSimple:function(){Ie=!1}}),M(M.S+M.F*!Ne,"Object",{create:function(t,e){return void 0===e?wt(t):ze(wt(t),e)},defineProperty:De,defineProperties:ze,getOwnPropertyDescriptor:Ye,getOwnPropertyNames:Xe,getOwnPropertySymbols:Ge}),ke&&M(M.S+M.F*(!Ne||w(function(){var t=be();return"[null]"!=xe([t])||"{}"!=xe({a:t})||"{}"!=xe(Object(t))})),"JSON",{stringify:function(t){for(var e,n,r=[t],i=1;arguments.length>i;)r.push(arguments[i++]);if(n=e=r[1],(g(e)||void 0!==t)&&!Re(t))return le(e)||(e=function(t,e){if("function"==typeof n&&(e=n.call(this,t,e)),!Re(e))return e}),r[1]=e,xe.apply(ke,r)}}),be[Oe][Me]||x(be[Oe],Me,be[Oe].valueOf),kt(be,"Symbol"),kt(Math,"Math",!0),kt(m.JSON,"JSON",!0);for(var We=ot("iterator"),Qe=ot("toStringTag"),$e=ct.Array,Je={CSSRuleList:!0,CSSStyleDeclaration:!1,CSSValueList:!1,ClientRectList:!1,DOMRectList:!1,DOMStringList:!1,DOMTokenList:!0,DataTransferItemList:!1,FileList:!1,HTMLAllCollection:!1,HTMLCollection:!1,HTMLFormElement:!1,HTMLSelectElement:!1,MediaList:!0,MimeTypeArray:!1,NamedNodeMap:!1,NodeList:!0,PaintRequestList:!1,Plugin:!1,PluginArray:!1,SVGLengthList:!1,SVGNumberList:!1,SVGPathSegList:!1,SVGPointList:!1,SVGStringList:!1,SVGTransformList:!1,SourceBufferList:!1,StyleSheetList:!0,TextTrackCueList:!1,TextTrackList:!1,TouchList:!1},Ze=Q(Je),Ke=0;Ke<Ze.length;Ke++){var tn,en=Ze[Ke],nn=Je[en],rn=m[en],sn=rn&&rn.prototype;if(sn&&(sn[We]||x(sn,We,$e),sn[Qe]||x(sn,Qe,en),ct[en]=$e,nn))for(tn in Nt)sn[tn]||O(sn,tn,Nt[tn],!0)}var on={},un=[];function an(t,e){if(Array.isArray(t)){var n=!0,r=!1,i=void 0;try{for(var s,o=t[Symbol.iterator]();!(n=(s=o.next()).done);n=!0){an(s.value,e)}}catch(t){r=!0,i=t}finally{try{n||null==o.return||o.return()}finally{if(r)throw i}}}else if("object"!==st(t))ln(Object.getOwnPropertyNames(e)),on[t]=Object.assign(on[t]||{},e);else for(var u in t)an(u,t[u])}function hn(t){return on[t]||{}}function ln(t){un.push.apply(un,oe(t))}var cn=q(!0);M(M.P,"Array",{includes:function(t){return cn(this,t,1<arguments.length?arguments[1]:void 0)}}),ht("includes");var fn=ot("match"),vn=function(t){var e;return g(t)&&(void 0!==(e=t[fn])?!!e:"RegExp"==T(t))},dn=ot("match"),yn="includes";M(M.P+M.F*function(e){var n=/./;try{"/./"[e](n)}catch(t){try{return n[dn]=!1,!"/./"[e](n)}catch(t){}}return!0}(yn),"String",{includes:function(t){return!!~function(t,e,n){if(vn(e))throw TypeError("String#"+n+" doesn't accept regex!");return String(C(t))}(this,t,yn).indexOf(t,1<arguments.length?arguments[1]:void 0)}});var pn=function(e,t,n){var r=ot(e),i=n(C,r,""[e]),s=i[0],o=i[1];w(function(){var t={};return t[r]=function(){return 7},7!=""[e](t)})&&(O(String.prototype,e,s),x(RegExp.prototype,r,2==t?function(t,e){return o.call(t,this,e)}:function(t){return o.call(t,this)}))};function mn(t,e){var n,r=t.length,i=[];for(n=0;n<r;n++)i.push(e(t[n]));return i}function gn(t){return t%360*Math.PI/180}function wn(t){return t.toLowerCase().replace(/-(.)/g,function(t,e){return e.toUpperCase()})}function _n(t){return t.replace(/([A-Z])/g,function(t,e){return"-"+e.toLowerCase()})}function bn(t){return t.charAt(0).toUpperCase()+t.slice(1)}function kn(t,e,n,r){return null!=e&&null!=n||(r=r||t.bbox(),null==e?e=r.width/r.height*n:null==n&&(n=r.height/r.width*e)),{width:e,height:n}}function xn(t,e){var n,r,i=t.origin;if("string"==typeof i||null==i){var s=(i||"center").toLowerCase().trim(),o=e.bbox(),u=o.height,a=o.width,h=o.x,l=o.y,c=s.includes("left")?h:s.includes("right")?h+a:h+a/2,f=s.includes("top")?l:s.includes("bottom")?l+u:l+u/2;n=null!=t.ox?t.ox:c,r=null!=t.oy?t.oy:f}else n=i[0],r=i[1];return[n,r]}pn("replace",2,function(i,s,o){return[function(t,e){var n=i(this),r=null==t?void 0:t[s];return void 0!==r?r.call(t,n,e):o.call(String(n),t,e)},o]});var On={map:mn,filter:function(t,e){var n,r=t.length,i=[];for(n=0;n<r;n++)e(t[n])&&i.push(t[n]);return i},radians:gn,degrees:function(t){return 180*t/Math.PI%360},camelCase:wn,unCamelCase:_n,capitalize:bn,proportionalSize:kn,getOrigin:xn},Sn="http://www.w3.org/2000/svg",Mn="http://www.w3.org/2000/xmlns/",An="http://www.w3.org/1999/xlink",En="http://svgjs.com/svgjs",Tn={ns:Sn,xmlns:Mn,xlink:An,svgjs:En},jn={window:"undefined"==typeof window?null:window,document:"undefined"==typeof document?null:document};function Cn(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}var Nn=function t(){Cn(this,t)},Pn={},In="___SYMBOL___ROOT___";function Ln(t){return jn.document.createElementNS(Sn,t)}function Fn(t){if(t instanceof Nn)return t;if("object"===st(t))return zn(t);if(null==t)return new Pn[In];if("string"==typeof t&&"<"!==t.charAt(0))return zn(jn.document.querySelector(t));var e=Ln("svg");return e.innerHTML=t,t=zn(e.firstChild)}function Rn(t,e){return e instanceof jn.window.Node?e:Ln(t)}function Dn(t){if(!t)return null;if(t.instance instanceof Nn)return t.instance;var e=bn(t.nodeName||"Dom");return"LinearGradient"===e||"RadialGradient"===e?e="Gradient":Pn[e]||(e="Dom"),new Pn[e](t)}var zn=Dn;function qn(t){var e=1<arguments.length&&void 0!==arguments[1]?arguments[1]:t.name,n=2<arguments.length&&void 0!==arguments[2]&&arguments[2];return Pn[e]=t,n&&(Pn[In]=t),ln(Object.getOwnPropertyNames(t.prototype)),t}function Yn(t){return Pn[t]}var Xn=1e3;function Gn(t){return"Svgjs"+bn(t)+Xn++}function Vn(t){for(var e=t.children.length-1;0<=e;e--)Vn(t.children[e]);return t.id?Dn(t).id(Gn(t.nodeName)):Dn(t)}function Hn(t,e,n){var r,i;for(i=(t=Array.isArray(t)?t:[t]).length-1;0<=i;i--)for(r in e){var s=e[r];n&&(s=Bn(e[r])),t[i].prototype[r]=s}}function Bn(i){return function(){for(var t=arguments.length,e=new Array(t),n=0;n<t;n++)e[n]=arguments[n];var r=e[e.length-1];return!r||r.constructor!==Object||r instanceof Array?i.apply(this,e):i.apply(this,e.slice(0,-1)).attr(r)}}an("Dom",{siblings:function(){return this.parent().children()},position:function(){return this.parent().index(this)},next:function(){return this.siblings()[this.position()+1]},prev:function(){return this.siblings()[this.position()-1]},forward:function(){var t=this.position()+1,e=this.parent();return e.removeElement(this).add(this,t),"function"==typeof e.isRoot&&e.isRoot()&&e.node.appendChild(e.defs().node),this},backward:function(){var t=this.position();return 0<t&&this.parent().removeElement(this).add(this,t-1),this},front:function(){var t=this.parent();return t.node.appendChild(this.node),"function"==typeof t.isRoot&&t.isRoot()&&t.node.appendChild(t.defs().node),this},back:function(){return 0<this.position()&&this.parent().removeElement(this).add(this,0),this},before:function(t){(t=Fn(t)).remove();var e=this.position();return this.parent().add(t,e),this},after:function(t){(t=Fn(t)).remove();var e=this.position();return this.parent().add(t,e+1),this},insertBefore:function(t){return(t=Fn(t)).before(this),this},insertAfter:function(t){return(t=Fn(t)).after(this),this}}),pn("split",2,function(i,s,o){var v=vn,d=o,y=[].push,t="split",p="length",m="lastIndex";if("c"=="abbc"[t](/(b)*/)[1]||4!="test"[t](/(?:)/,-1)[p]||2!="ab"[t](/(?:ab)*/)[p]||4!="."[t](/(.?)(.?)/)[p]||1<"."[t](/()()/)[p]||""[t](/.?/)[p]){var g=void 0===/()??/.exec("")[1];o=function(t,e){var n=String(this);if(void 0===t&&0===e)return[];if(!v(t))return d.call(n,t,e);var r,i,s,o,u,a=[],h=(t.ignoreCase?"i":"")+(t.multiline?"m":"")+(t.unicode?"u":"")+(t.sticky?"y":""),l=0,c=void 0===e?4294967295:e>>>0,f=new RegExp(t.source,h+"g");for(g||(r=new RegExp("^"+f.source+"$(?!\\s)",h));(i=f.exec(n))&&!(l<(s=i.index+i[0][p])&&(a.push(n.slice(l,i.index)),!g&&1<i[p]&&i[0].replace(r,function(){for(u=1;u<arguments[p]-2;u++)void 0===arguments[u]&&(i[u]=void 0)}),1<i[p]&&i.index<n[p]&&y.apply(a,i.slice(1)),o=i[0][p],l=s,a[p]>=c));)f[m]===i.index&&f[m]++;return l===n[p]?!o&&f.test("")||a.push(""):a.push(n.slice(l)),a[p]>c?a.slice(0,c):a}}else"0"[t](void 0,0)[p]&&(o=function(t,e){return void 0===t&&0===e?[]:d.call(this,t,e)});return[function(t,e){var n=i(this),r=null==t?void 0:t[s];return void 0!==r?r.call(t,n,e):o.call(String(n),t,e)},o]});var Un=/^([+-]?(\d+(\.\d*)?|\.\d+)(e[+-]?\d+)?)([a-z%]*)$/i,Wn=/^#?([a-f\d]{2})([a-f\d]{2})([a-f\d]{2})$/i,Qn=/rgb\((\d+),(\d+),(\d+)\)/,$n=/(#[a-z0-9\-_]+)/i,Jn=/\)\s*,?\s*/,Zn=/\s/g,Kn=/^#[a-f0-9]{3,6}$/i,tr=/^rgb\(/,er=/^(\s+)?$/,nr=/^[+-]?(\d+(\.\d*)?|\.\d+)(e[+-]?\d+)?$/i,rr=/\.(jpg|jpeg|png|gif|svg)(\?[^=]+.*)?/i,ir=/[\s,]+/,sr=/([^e])-/gi,or=/[MLHVCSQTAZ]/gi,ur=/[MLHVCSQTAZ]/i,ar=/((\d?\.\d+(?:e[+-]?\d+)?)((?:\.\d+(?:e[+-]?\d+)?)+))+/gi,hr=/\./g,lr={numberAndUnit:Un,hex:Wn,rgb:Qn,reference:$n,transforms:Jn,whitespace:Zn,isHex:Kn,isRgb:tr,isCss:/[^:]+:[^;]+;?/,isBlank:er,isNumber:nr,isPercent:/^-?[\d.]+%$/,isImage:rr,delimiter:ir,hyphen:sr,pathLetters:or,isPathLetter:ur,numbersWithDots:ar,dots:hr};an("Dom",{classes:function(){var t=this.attr("class");return null==t?[]:t.trim().split(ir)},hasClass:function(t){return-1!==this.classes().indexOf(t)},addClass:function(t){if(!this.hasClass(t)){var e=this.classes();e.push(t),this.attr("class",e.join(" "))}return this},removeClass:function(e){return this.hasClass(e)&&this.attr("class",this.classes().filter(function(t){return t!==e}).join(" ")),this},toggleClass:function(t){return this.hasClass(t)?this.removeClass(t):this.addClass(t)}}),an("Dom",{css:function(t,e){var n={};if(0===arguments.length)return this.node.style.cssText.split(/\s*;\s*/).filter(function(t){return!!t.length}).forEach(function(t){var e=t.split(/\s*:\s*/);n[e[0]]=e[1]}),n;if(arguments.length<2){if(Array.isArray(t)){var r=!0,i=!1,s=void 0;try{for(var o,u=t[Symbol.iterator]();!(r=(o=u.next()).done);r=!0){var a=wn(o.value);n[a]=this.node.style[a]}}catch(t){i=!0,s=t}finally{try{r||null==u.return||u.return()}finally{if(i)throw s}}return n}if("string"==typeof t)return this.node.style[wn(t)];if("object"===st(t))for(var h in t)this.node.style[wn(h)]=null==t[h]||er.test(t[h])?"":t[h]}return 2===arguments.length&&(this.node.style[wn(t)]=null==e||er.test(e)?"":e),this},show:function(){return this.css("display","")},hide:function(){return this.css("display","none")},visible:function(){return"none"!==this.css("display")}}),an("Dom",{data:function(e,t,n){if("object"===st(e))for(t in e)this.data(t,e[t]);else if(arguments.length<2)try{return JSON.parse(this.attr("data-"+e))}catch(t){return this.attr("data-"+e)}else this.attr("data-"+e,null===t?null:!0===n||"string"==typeof t||"number"==typeof t?t:JSON.stringify(t));return this}}),an("Dom",{remember:function(t,e){if("object"===st(t))for(var n in t)this.remember(n,t[n]);else{if(1===arguments.length)return this.memory()[t];this.memory()[t]=e}return this},forget:function(){if(0===arguments.length)this._memory={};else for(var t=arguments.length-1;0<=t;t--)delete this.memory()[arguments[t]];return this},memory:function(){return this._memory=this._memory||{}}});var cr=0,fr={};function vr(t){var e=t.getEventHolder();return e===jn.window&&(e=fr),e.events||(e.events={}),e.events}function dr(t){return t.getEventTarget()}function yr(t,e,r,n,i){var s=r.bind(n||t),o=Fn(t),u=vr(o),a=dr(o);e=Array.isArray(e)?e:e.split(ir),r._svgjsListenerId||(r._svgjsListenerId=++cr),e.forEach(function(t){var e=t.split(".")[0],n=t.split(".")[1]||"*";u[e]=u[e]||{},u[e][n]=u[e][n]||{},u[e][n][r._svgjsListenerId]=s,a.addEventListener(e,s,i||!1)})}function pr(t,e,o,u){var a=Fn(t),h=vr(a),l=dr(a);("function"!=typeof o||(o=o._svgjsListenerId))&&(e=Array.isArray(e)?e:(e||"").split(ir)).forEach(function(t){var e,n,r,i=t&&t.split(".")[0],s=t&&t.split(".")[1];if(o)h[i]&&h[i][s||"*"]&&(l.removeEventListener(i,h[i][s||"*"][o],u||!1),delete h[i][s||"*"][o]);else if(i&&s){if(h[i]&&h[i][s]){for(n in h[i][s])pr(l,[i,s].join("."),n);delete h[i][s]}}else if(s)for(t in h)for(e in h[t])s===e&&pr(l,[t,s].join("."));else if(i){if(h[i]){for(e in h[i])pr(l,[i,e].join("."));delete h[i]}}else{for(t in h)pr(l,t);(r=a.getEventHolder()).events&&(r.events={})}})}function mr(t,e,n){var r=dr(t);return e instanceof jn.window.Event||(e=new jn.window.CustomEvent(e,{detail:n,cancelable:!0})),r.dispatchEvent(e),e}function gr(t,e){return function(t){if(Array.isArray(t))return t}(t)||function(t,e){var n=[],r=!0,i=!1,s=void 0;try{for(var o,u=t[Symbol.iterator]();!(r=(o=u.next()).done)&&(n.push(o.value),!e||n.length!==e);r=!0);}catch(t){i=!0,s=t}finally{try{r||null==u.return||u.return()}finally{if(i)throw s}}return n}(t,e)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance")}()}function wr(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}function _r(t,e,n){return e&&wr(t.prototype,e),n&&wr(t,n),t}var br=function(){var t=p(this),e="";return t.global&&(e+="g"),t.ignoreCase&&(e+="i"),t.multiline&&(e+="m"),t.unicode&&(e+="u"),t.sticky&&(e+="y"),e};o&&"g"!=/./g.flags&&a.f(RegExp.prototype,"flags",{configurable:!0,get:br});var kr="toString",xr=/./[kr],Or=function(t){O(RegExp.prototype,kr,t,!0)};function Sr(t){var e=Math.round(t),n=Math.max(0,Math.min(255,e)).toString(16);return 1===n.length?"0"+n:n}function Mr(t,e){for(var n=e.length;n--;)if(null==t[e[n]])return!1;return!0}function Ar(t,e,n){return n<0&&(n+=1),1<n&&(n-=1),n<1/6?t+6*(e-t)*n:n<.5?e:n<2/3?t+(e-t)*(2/3-n)*6:t}w(function(){return"/a/b"!=xr.call({source:"a",flags:"b"})})?Or(function(){var t=p(this);return"/".concat(t.source,"/","flags"in t?t.flags:!o&&t instanceof RegExp?br.call(t):void 0)}):xr.name!=kr&&Or(function(){return xr.call(this)});var Er,Tr,jr,Cr,Nr=function(){function j(){Cn(this,j),this.init.apply(this,arguments)}return _r(j,[{key:"init",value:function(){var t,e,n,r,i=0<arguments.length&&void 0!==arguments[0]?arguments[0]:0,s=1<arguments.length&&void 0!==arguments[1]?arguments[1]:0,o=2<arguments.length&&void 0!==arguments[2]?arguments[2]:0,u=3<arguments.length&&void 0!==arguments[3]?arguments[3]:0,a=4<arguments.length&&void 0!==arguments[4]?arguments[4]:"rgb";if(i=i||0,this.space)for(var h in this.space)delete this[this.space[h]];if("number"==typeof i)a="string"==typeof u?u:a,u="string"==typeof u?0:u,Object.assign(this,{_a:i,_b:s,_c:o,_d:u,space:a});else if(i instanceof Array)this.space=s||("string"==typeof i[3]?i[3]:i[4])||"rgb",Object.assign(this,{_a:i[0],_b:i[1],_c:i[2],_d:i[3]||0});else if(i instanceof Object){var l=(n=s,(r=Mr(e=i,"rgb")?{_a:e.r,_b:e.g,_c:e.b,space:"rgb"}:Mr(e,"xyz")?{_a:e.x,_b:e.y,_c:e.z,_d:0,space:"xyz"}:Mr(e,"hsl")?{_a:e.h,_b:e.s,_c:e.l,_d:0,space:"hsl"}:Mr(e,"lab")?{_a:e.l,_b:e.a,_c:e.b,_d:0,space:"lab"}:Mr(e,"lch")?{_a:e.l,_b:e.c,_c:e.h,_d:0,space:"lch"}:Mr(e,"cmyk")?{_a:e.c,_b:e.m,_c:e.y,_d:e.k,space:"cmyk"}:{_a:0,_b:0,_c:0,space:"rgb"}).space=n||r.space,r);Object.assign(this,l)}else if("string"==typeof i)if(tr.test(i)){var c=i.replace(Zn,""),f=gr(Qn.exec(c).slice(1,4).map(function(t){return parseInt(t)}),3),v=f[0],d=f[1],y=f[2];Object.assign(this,{_a:v,_b:d,_c:y,_d:0,space:"rgb"})}else{if(!Kn.test(i))throw Error("Unsupported string format, can't construct Color");var p=gr(Wn.exec((t=i,4===t.length?["#",t.substring(1,2),t.substring(1,2),t.substring(2,3),t.substring(2,3),t.substring(3,4),t.substring(3,4)].join(""):t)).map(function(t){return parseInt(t,16)}),4),m=p[1],g=p[2],w=p[3];Object.assign(this,{_a:m,_b:g,_c:w,_d:0,space:"rgb"})}var _=this._a,b=this._b,k=this._c,x=this._d,O="rgb"===this.space?{r:_,g:b,b:k}:"xyz"===this.space?{x:_,y:b,z:k}:"hsl"===this.space?{h:_,s:b,l:k}:"lab"===this.space?{l:_,a:b,b:k}:"lch"===this.space?{l:_,c:b,h:k}:"cmyk"===this.space?{c:_,m:b,y:k,k:x}:{};Object.assign(this,O)}},{key:"rgb",value:function(){if("rgb"===this.space)return this;if("lab"===(O=this.space)||"xyz"===O||"lch"===O){var t=this.x,e=this.y,n=this.z;if("lab"===this.space||"lch"===this.space){var r=this.l,i=this.a,s=this.b;if("lch"===this.space){var o=this.c,u=this.h,a=Math.PI/180;i=o*Math.cos(a*u),s=o*Math.sin(a*u)}var h=(r+16)/116,l=i/500+h,c=h-s/200,f=16/116,v=.008856;t=.95047*(Math.pow(l,3)>v?Math.pow(l,3):(l-f)/7.787),e=1*(Math.pow(h,3)>v?Math.pow(h,3):(h-f)/7.787),n=1.08883*(Math.pow(c,3)>v?Math.pow(c,3):(c-f)/7.787)}var d=3.2406*t+-1.5372*e+-.4986*n,y=-.9689*t+1.8758*e+.0415*n,p=.0557*t+-.204*e+1.057*n,m=Math.pow,g=.0031308;return new j(255*(g<d?1.055*m(d,1/2.4)-.055:12.92*d),255*(g<y?1.055*m(y,1/2.4)-.055:12.92*y),255*(g<p?1.055*m(p,1/2.4)-.055:12.92*p))}if("hsl"===this.space){var w=this.h,_=this.s,b=this.l;if(w/=360,b/=100,0===(_/=100))return new j(b*=255,b,b);var k=b<.5?b*(1+_):b+_-b*_,x=2*b-k;return new j(255*Ar(x,k,w+1/3),255*Ar(x,k,w),255*Ar(x,k,w-1/3))}if("cmyk"!==this.space)return this;var O,S=this.c,M=this.m,E=this.y,T=this.k;return new j(255*(1-Math.min(1,S*(1-T)+T)),255*(1-Math.min(1,M*(1-T)+T)),255*(1-Math.min(1,E*(1-T)+T)))}},{key:"lab",value:function(){var t=this.xyz(),e=t.x,n=t.y;return new j(116*n-16,500*(e-n),200*(n-t.z),"lab")}},{key:"xyz",value:function(){var t=this.rgb(),e=gr([t._a,t._b,t._c].map(function(t){return t/255}),3),n=e[0],r=e[1],i=e[2],s=.04045<n?Math.pow((n+.055)/1.055,2.4):n/12.92,o=.04045<r?Math.pow((r+.055)/1.055,2.4):r/12.92,u=.04045<i?Math.pow((i+.055)/1.055,2.4):i/12.92,a=(.4124*s+.3576*o+.1805*u)/.95047,h=(.2126*s+.7152*o+.0722*u)/1,l=(.0193*s+.1192*o+.9505*u)/1.08883;return new j(.008856<a?Math.pow(a,1/3):7.787*a+16/116,.008856<h?Math.pow(h,1/3):7.787*h+16/116,.008856<l?Math.pow(l,1/3):7.787*l+16/116,"xyz")}},{key:"lch",value:function(){var t=this.lab(),e=t.l,n=t.a,r=t.b,i=Math.sqrt(Math.pow(n,2)+Math.pow(r,2)),s=180*Math.atan2(r,n)/Math.PI;return s<0&&(s=360-(s*=-1)),new j(e,i,s,"lch")}},{key:"hsl",value:function(){var t=this.rgb(),e=gr([t._a,t._b,t._c].map(function(t){return t/255}),3),n=e[0],r=e[1],i=e[2],s=Math.max(n,r,i),o=Math.min(n,r,i),u=(s+o)/2,a=s===o,h=s-o;return new j(360*(a?0:s===n?((r-i)/h+(r<i?6:0))/6:s===r?((i-n)/h+2)/6:s===i?((n-r)/h+4)/6:0),100*(a?0:.5<u?h/(2-s-o):h/(s+o)),100*u,"hsl")}},{key:"cmyk",value:function(){var t=this.rgb(),e=gr([t._a,t._b,t._c].map(function(t){return t/255}),3),n=e[0],r=e[1],i=e[2],s=Math.min(1-n,1-r,1-i);return 1===s?new j(0,0,0,1,"cmyk"):new j((1-n-s)/(1-s),(1-r-s)/(1-s),(1-i-s)/(1-s),s,"cmyk")}},{key:"_clamped",value:function(){var t=this.rgb(),e=t._a,n=t._b,r=t._c,i=Math.max,s=Math.min,o=Math.round;return[e,n,r].map(function(t){return i(0,s(o(t),255))})}},{key:"toHex",value:function(){var t=gr(this._clamped().map(Sr),3),e=t[0],n=t[1],r=t[2];return"#".concat(e).concat(n).concat(r)}},{key:"toString",value:function(){return this.toHex()}},{key:"toRgb",value:function(){var t=gr(this._clamped(),3),e=t[0],n=t[1],r=t[2];return"rgb(".concat(e,",").concat(n,",").concat(r,")")}},{key:"toArray",value:function(){return[this._a,this._b,this._c,this._d,this.space]}}],[{key:"random",value:function(){var t=0<arguments.length&&void 0!==arguments[0]?arguments[0]:"vibrant",e=1<arguments.length?arguments[1]:void 0,n=Math.random,r=Math.round,i=Math.sin,s=Math.PI;if("vibrant"===t)return new j(24*n()+57,38*n()+45,360*n(),"lch");if("sine"===t)return new j(r(80*i(2*s*(e=null==e?n():e)/.5+.01)+150),r(50*i(2*s*e/.5+4.6)+200),r(100*i(2*s*e/.5+2.3)+150));if("pastel"===t)return new j(8*n()+86,17*n()+9,360*n(),"lch");if("dark"===t)return new j(10+10*n(),50*n()+86,360*n(),"lch");if("rgb"===t)return new j(255*n(),255*n(),255*n());if("lab"===t)return new j(100*n(),256*n()-128,256*n()-128,"lab");if("grey"===t){var o=255*n();return new j(o,o,o)}}},{key:"test",value:function(t){return"string"==typeof t&&(Kn.test(t)||tr.test(t))}},{key:"isRgb",value:function(t){return t&&"number"==typeof t.r&&"number"==typeof t.g&&"number"==typeof t.b}},{key:"isColor",value:function(t){return t&&(t instanceof j||this.isRgb(t)||this.test(t))}}]),j}();function Pr(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}function Ir(t,e){return!e||"object"!==st(e)&&"function"!=typeof e?Pr(t):e}function Lr(t){return(Lr=Object.setPrototypeOf?Object.getPrototypeOf:function(t){return t.__proto__||Object.getPrototypeOf(t)})(t)}function Fr(t,e,n){return(Fr="undefined"!=typeof Reflect&&Reflect.get?Reflect.get:function(t,e,n){var r=function(t,e){for(;!Object.prototype.hasOwnProperty.call(t,e)&&null!==(t=Lr(t)););return t}(t,e);if(r){var i=Object.getOwnPropertyDescriptor(r,e);return i.get?i.get.call(n):i.value}})(t,e,n||t)}function Rr(t,e){return(Rr=Object.setPrototypeOf||function(t,e){return t.__proto__=e,t})(t,e)}function Dr(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}}),e&&Rr(t,e)}Er="keys",Tr=function(){return function(t){return Q(Z(t))}},jr=(y.Object||{})[Er]||Object[Er],(Cr={})[Er]=Tr(jr),M(M.S+M.F*w(function(){jr(1)}),"Object",Cr),pn("match",1,function(r,i,t){return[function(t){var e=r(this),n=null==t?void 0:t[i];return void 0!==n?n.call(t,e):new RegExp(t)[i](String(e))},t]});var zr="\t\n\v\f\r \u2028\u2029\ufeff",qr="["+zr+"]",Yr=RegExp("^"+qr+qr+"*"),Xr=RegExp(qr+qr+"*$"),Gr=function(t,e,n){var r={},i=w(function(){return!!zr[t]()||"
"!="
"[t]()}),s=r[t]=i?e(Vr):zr[t];n&&(r[n]=s),M(M.P+M.F*i,"String",r)},Vr=Gr.trim=function(t,e){return t=String(C(t)),1&e&&(t=t.replace(Yr,"")),2&e&&(t=t.replace(Xr,"")),t},Hr=Gr,Br=fe.f,Ur=ne.f,Wr=a.f,Qr=Hr.trim,$r="Number",Jr=m[$r],Zr=Jr,Kr=Jr.prototype,ti=T(wt(Kr))==$r,ei="trim"in String.prototype,ni=function(t){var e=l(t,!1);if("string"==typeof e&&2<e.length){var n,r,i,s=(e=ei?e.trim():Qr(e,3)).charCodeAt(0);if(43===s||45===s){if(88===(n=e.charCodeAt(2))||120===n)return NaN}else if(48===s){switch(e.charCodeAt(1)){case 66:case 98:r=2,i=49;break;case 79:case 111:r=8,i=55;break;default:return+e}for(var o,u=e.slice(2),a=0,h=u.length;a<h;a++)if((o=u.charCodeAt(a))<48||i<o)return NaN;return parseInt(u,r)}}return+e};if(!Jr(" 0o1")||!Jr("0b1")||Jr("+0x1")){Jr=function(t){var e=arguments.length<1?0:t,n=this;return n instanceof Jr&&(ti?w(function(){Kr.valueOf.call(n)}):T(n)!=$r)?se(new Zr(ni(e)),n,Jr):ni(e)};for(var ri,ii=o?Br(Zr):"MAX_VALUE,MIN_VALUE,NaN,NEGATIVE_INFINITY,POSITIVE_INFINITY,EPSILON,isFinite,isInteger,isNaN,isSafeInteger,MAX_SAFE_INTEGER,MIN_SAFE_INTEGER,parseFloat,parseInt,isInteger".split(","),si=0;ii.length>si;si++)h(Zr,ri=ii[si])&&!h(Jr,ri)&&Wr(Jr,ri,Ur(Zr,ri));(Jr.prototype=Kr).constructor=Jr,O(m,$r,Jr)}var oi=function(){function t(){Cn(this,t),this.init.apply(this,arguments)}return _r(t,[{key:"init",value:function(t,e){var n,r=0,i=0;return n=Array.isArray(t)?{x:t[0],y:t[1]}:"object"===st(t)?{x:t.x,y:t.y}:{x:t,y:e},this.x=null==n.x?r:n.x,this.y=null==n.y?i:n.y,this}},{key:"clone",value:function(){return new t(this)}},{key:"transform",value:function(t){return this.clone().transformO(t)}},{key:"transformO",value:function(t){ai.isMatrixLike(t)||(t=new ai(t));var e=this.x,n=this.y;return this.x=t.a*e+t.c*n+t.e,this.y=t.b*e+t.d*n+t.f,this}},{key:"toArray",value:function(){return[this.x,this.y]}}]),t}();function ui(t,e,n){return Math.abs(e-t)<(n||1e-6)}var ai=function(){function h(){Cn(this,h),this.init.apply(this,arguments)}return _r(h,[{key:"init",value:function(t){var e=h.fromArray([1,0,0,1,0,0]);return t=t instanceof Element?t.matrixify():"string"==typeof t?h.fromArray(t.split(ir).map(parseFloat)):Array.isArray(t)?h.fromArray(t):"object"===st(t)&&h.isMatrixLike(t)?t:"object"===st(t)?(new h).transform(t):6===arguments.length?h.fromArray([].slice.call(arguments)):e,this.a=null!=t.a?t.a:e.a,this.b=null!=t.b?t.b:e.b,this.c=null!=t.c?t.c:e.c,this.d=null!=t.d?t.d:e.d,this.e=null!=t.e?t.e:e.e,this.f=null!=t.f?t.f:e.f,this}},{key:"clone",value:function(){return new h(this)}},{key:"transform",value:function(t){if(h.isMatrixLike(t))return new h(t).multiplyO(this);var e=h.formatTransforms(t),n=new oi(e.ox,e.oy).transform(this),r=n.x,i=n.y,s=(new h).translateO(e.rx,e.ry).lmultiplyO(this).translateO(-r,-i).scaleO(e.scaleX,e.scaleY).skewO(e.skewX,e.skewY).shearO(e.shear).rotateO(e.theta).translateO(r,i);if(isFinite(e.px)||isFinite(e.py)){var o=new oi(r,i).transform(s),u=e.px?e.px-o.x:0,a=e.py?e.py-o.y:0;s.translateO(u,a)}return s.translateO(e.tx,e.ty),s}},{key:"compose",value:function(t){t.origin&&(t.originX=t.origin[0],t.originY=t.origin[1]);var e=t.originX||0,n=t.originY||0,r=t.scaleX||1,i=t.scaleY||1,s=t.shear||0,o=t.rotate||0,u=t.translateX||0,a=t.translateY||0;return(new h).translateO(-e,-n).scaleO(r,i).shearO(s).rotateO(o).translateO(u,a).lmultiplyO(this).translateO(e,n)}},{key:"decompose",value:function(){var t=0<arguments.length&&void 0!==arguments[0]?arguments[0]:0,e=1<arguments.length&&void 0!==arguments[1]?arguments[1]:0,n=this.a,r=this.b,i=this.c,s=this.d,o=this.e,u=this.f,a=n*s-r*i,h=0<a?1:-1,l=h*Math.sqrt(n*n+r*r),c=Math.atan2(h*r,h*n),f=180/Math.PI*c,v=Math.cos(c),d=Math.sin(c),y=(n*i+r*s)/a,p=i*l/(y*n-r)||s*l/(y*r+n);return{scaleX:l,scaleY:p,shear:y,rotate:f,translateX:o-t+t*v*l+e*(y*v*l-d*p),translateY:u-e+t*d*l+e*(y*d*l+v*p),originX:t,originY:e,a:this.a,b:this.b,c:this.c,d:this.d,e:this.e,f:this.f}}},{key:"multiply",value:function(t){return this.clone().multiplyO(t)}},{key:"multiplyO",value:function(t){var e=t instanceof h?t:new h(t);return h.matrixMultiply(this,e,this)}},{key:"lmultiply",value:function(t){return this.clone().lmultiplyO(t)}},{key:"lmultiplyO",value:function(t){var e=t instanceof h?t:new h(t);return h.matrixMultiply(e,this,this)}},{key:"inverseO",value:function(){var t=this.a,e=this.b,n=this.c,r=this.d,i=this.e,s=this.f,o=t*r-e*n;if(!o)throw new Error("Cannot invert "+this);var u=r/o,a=-e/o,h=-n/o,l=t/o,c=-(u*i+h*s),f=-(a*i+l*s);return this.a=u,this.b=a,this.c=h,this.d=l,this.e=c,this.f=f,this}},{key:"inverse",value:function(){return this.clone().inverseO()}},{key:"translate",value:function(t,e){return this.clone().translateO(t,e)}},{key:"translateO",value:function(t,e){return this.e+=t||0,this.f+=e||0,this}},{key:"scale",value:function(t,e,n,r){var i;return(i=this.clone()).scaleO.apply(i,arguments)}},{key:"scaleO",value:function(t){var e=1<arguments.length&&void 0!==arguments[1]?arguments[1]:t,n=2<arguments.length&&void 0!==arguments[2]?arguments[2]:0,r=3<arguments.length&&void 0!==arguments[3]?arguments[3]:0;3===arguments.length&&(r=n,n=e,e=t);var i=this.a,s=this.b,o=this.c,u=this.d,a=this.e,h=this.f;return this.a=i*t,this.b=s*e,this.c=o*t,this.d=u*e,this.e=a*t-n*t+n,this.f=h*e-r*e+r,this}},{key:"rotate",value:function(t,e,n){return this.clone().rotateO(t,e,n)}},{key:"rotateO",value:function(t){var e=1<arguments.length&&void 0!==arguments[1]?arguments[1]:0,n=2<arguments.length&&void 0!==arguments[2]?arguments[2]:0;t=gn(t);var r=Math.cos(t),i=Math.sin(t),s=this.a,o=this.b,u=this.c,a=this.d,h=this.e,l=this.f;return this.a=s*r-o*i,this.b=o*r+s*i,this.c=u*r-a*i,this.d=a*r+u*i,this.e=h*r-l*i+n*i-e*r+e,this.f=l*r+h*i-e*i-n*r+n,this}},{key:"flip",value:function(t,e){return this.clone().flipO(t,e)}},{key:"flipO",value:function(t,e){return"x"===t?this.scaleO(-1,1,e,0):"y"===t?this.scaleO(1,-1,0,e):this.scaleO(-1,-1,t,e||t)}},{key:"shear",value:function(t,e,n){return this.clone().shearO(t,e,n)}},{key:"shearO",value:function(t){var e=2<arguments.length&&void 0!==arguments[2]?arguments[2]:0,n=this.a,r=this.b,i=this.c,s=this.d,o=this.e,u=this.f;return this.a=n+r*t,this.c=i+s*t,this.e=o+u*t-e*t,this}},{key:"skew",value:function(t,e,n,r){var i;return(i=this.clone()).skewO.apply(i,arguments)}},{key:"skewO",value:function(t){var e=1<arguments.length&&void 0!==arguments[1]?arguments[1]:t,n=2<arguments.length&&void 0!==arguments[2]?arguments[2]:0,r=3<arguments.length&&void 0!==arguments[3]?arguments[3]:0;3===arguments.length&&(r=n,n=e,e=t),t=gn(t),e=gn(e);var i=Math.tan(t),s=Math.tan(e),o=this.a,u=this.b,a=this.c,h=this.d,l=this.e,c=this.f;return this.a=o+u*i,this.b=u+o*s,this.c=a+h*i,this.d=h+a*s,this.e=l+c*i-r*i,this.f=c+l*s-n*s,this}},{key:"skewX",value:function(t,e,n){return this.skew(t,0,e,n)}},{key:"skewXO",value:function(t,e,n){return this.skewO(t,0,e,n)}},{key:"skewY",value:function(t,e,n){return this.skew(0,t,e,n)}},{key:"skewYO",value:function(t,e,n){return this.skewO(0,t,e,n)}},{key:"aroundO",value:function(t,e,n){var r=t||0,i=e||0;return this.translateO(-r,-i).lmultiplyO(n).translateO(r,i)}},{key:"around",value:function(t,e,n){return this.clone().aroundO(t,e,n)}},{key:"equals",value:function(t){var e=new h(t);return ui(this.a,e.a)&&ui(this.b,e.b)&&ui(this.c,e.c)&&ui(this.d,e.d)&&ui(this.e,e.e)&&ui(this.f,e.f)}},{key:"toString",value:function(){return"matrix("+this.a+","+this.b+","+this.c+","+this.d+","+this.e+","+this.f+")"}},{key:"toArray",value:function(){return[this.a,this.b,this.c,this.d,this.e,this.f]}},{key:"valueOf",value:function(){return{a:this.a,b:this.b,c:this.c,d:this.d,e:this.e,f:this.f}}}],[{key:"fromArray",value:function(t){return{a:t[0],b:t[1],c:t[2],d:t[3],e:t[4],f:t[5]}}},{key:"isMatrixLike",value:function(t){return null!=t.a||null!=t.b||null!=t.c||null!=t.d||null!=t.e||null!=t.f}},{key:"formatTransforms",value:function(t){var e="both"===t.flip||!0===t.flip,n=t.flip&&(e||"x"===t.flip)?-1:1,r=t.flip&&(e||"y"===t.flip)?-1:1,i=t.skew&&t.skew.length?t.skew[0]:isFinite(t.skew)?t.skew:isFinite(t.skewX)?t.skewX:0,s=t.skew&&t.skew.length?t.skew[1]:isFinite(t.skew)?t.skew:isFinite(t.skewY)?t.skewY:0,o=t.scale&&t.scale.length?t.scale[0]*n:isFinite(t.scale)?t.scale*n:isFinite(t.scaleX)?t.scaleX*n:n,u=t.scale&&t.scale.length?t.scale[1]*r:isFinite(t.scale)?t.scale*r:isFinite(t.scaleY)?t.scaleY*r:r,a=t.shear||0,h=t.rotate||t.theta||0,l=new oi(t.origin||t.around||t.ox||t.originX,t.oy||t.originY),c=l.x,f=l.y,v=new oi(t.position||t.px||t.positionX,t.py||t.positionY),d=v.x,y=v.y,p=new oi(t.translate||t.tx||t.translateX,t.ty||t.translateY),m=p.x,g=p.y,w=new oi(t.relative||t.rx||t.relativeX,t.ry||t.relativeY);return{scaleX:o,scaleY:u,skewX:i,skewY:s,shear:a,theta:h,rx:w.x,ry:w.y,tx:m,ty:g,ox:c,oy:f,px:d,py:y}}},{key:"matrixMultiply",value:function(t,e,n){var r=t.a*e.a+t.c*e.b,i=t.b*e.a+t.d*e.b,s=t.a*e.c+t.c*e.d,o=t.b*e.c+t.d*e.d,u=t.e+t.a*e.e+t.c*e.f,a=t.f+t.b*e.e+t.d*e.f;return n.a=r,n.b=i,n.c=s,n.d=o,n.e=u,n.f=a,n}}]),h}();function hi(){if(!hi.nodes){var t=Fn().size(2,0);t.node.style.cssText=["opacity: 0","position: absolute","left: -100%","top: -100%","overflow: hidden"].join(";"),t.attr("focusable","false");var e=t.path().node;hi.nodes={svg:t,path:e}}if(!hi.nodes.svg.node.parentNode){var n=jn.document.body||jn.document.documentElement;hi.nodes.svg.addTo(n)}return hi.nodes}function li(t){return!(t.width||t.height||t.x||t.y)}qn(ai,"Matrix");var ci=function(){function o(){Cn(this,o),this.init.apply(this,arguments)}return _r(o,[{key:"init",value:function(t){return t="string"==typeof t?t.split(ir).map(parseFloat):Array.isArray(t)?t:"object"===st(t)?[null!=t.left?t.left:t.x,null!=t.top?t.top:t.y,t.width,t.height]:4===arguments.length?[].slice.call(arguments):[0,0,0,0],this.x=t[0]||0,this.y=t[1]||0,this.width=this.w=t[2]||0,this.height=this.h=t[3]||0,this.x2=this.x+this.w,this.y2=this.y+this.h,this.cx=this.x+this.w/2,this.cy=this.y+this.h/2,this}},{key:"merge",value:function(t){var e=Math.min(this.x,t.x),n=Math.min(this.y,t.y);return new o(e,n,Math.max(this.x+this.width,t.x+t.width)-e,Math.max(this.y+this.height,t.y+t.height)-n)}},{key:"transform",value:function(e){e instanceof ai||(e=new ai(e));var n=1/0,r=-1/0,i=1/0,s=-1/0;return[new oi(this.x,this.y),new oi(this.x2,this.y),new oi(this.x,this.y2),new oi(this.x2,this.y2)].forEach(function(t){t=t.transform(e),n=Math.min(n,t.x),r=Math.max(r,t.x),i=Math.min(i,t.y),s=Math.max(s,t.y)}),new o(n,i,r-n,s-i)}},{key:"addOffset",value:function(){return this.x+=jn.window.pageXOffset,this.y+=jn.window.pageYOffset,this}},{key:"toString",value:function(){return this.x+" "+this.y+" "+this.width+" "+this.height}},{key:"toArray",value:function(){return[this.x,this.y,this.width,this.height]}},{key:"isNulled",value:function(){return li(this)}}]),o}();function fi(t,e){var n,r;try{if(li(n=t(this.node))&&((r=this.node)!==jn.document&&!(jn.document.documentElement.contains||function(t){for(;t.parentNode;)t=t.parentNode;return t===jn.document}).call(jn.document.documentElement,r)))throw new Error("Element not in the dom")}catch(t){n=e(this)}return n}an({viewbox:{viewbox:function(t,e,n,r){return null==t?new ci(this.attr("viewBox")):this.attr("viewBox",new ci(t,e,n,r))},zoom:function(t,e){var n=this.node.clientWidth,r=this.node.clientHeight,i=this.viewbox();if(!n&&!r){var s=window.getComputedStyle(this.node);n=parseFloat(s.getPropertyValue("width")),r=parseFloat(s.getPropertyValue("height"))}var o=n/i.width,u=r/i.height,a=Math.min(o,u);if(null==t)return a;var h=a/t;h===1/0&&(h=Number.MIN_VALUE),e=e||new oi(n/2/o+i.x,r/2/u+i.y);var l=new ci(i).transform(new ai({scale:h,origin:e}));return this.viewbox(l)}}}),qn(ci,"Box");var vi=function(){try{return Function("name","baseClass","_constructor",["baseClass = baseClass || Array","return {"," [name]: class extends baseClass {"," constructor (...args) {"," super(...args)"," _constructor && _constructor.apply(this, args)"," }"," }","}[name]"].join("\n"))}catch(t){return function(t){var e=1<arguments.length&&void 0!==arguments[1]?arguments[1]:Array,n=2<arguments.length?arguments[2]:void 0,r=function(){e.apply(this,arguments),n&&n.apply(this,arguments)};return((r.prototype=Object.create(e.prototype)).constructor=r).prototype.map=function(t){var e=new r;return e.push.apply(e,Array.prototype.map.call(this,t)),e},r}}}(),di=vi("List",Array,function(){var t=0<arguments.length&&void 0!==arguments[0]?arguments[0]:[];if("number"==typeof t)return this;this.length=0,this.push.apply(this,oe(t))});Hn(di,{each:function(e){for(var t=arguments.length,n=new Array(1<t?t-1:0),r=1;r<t;r++)n[r-1]=arguments[r];return"function"==typeof e?this.map(function(t){return e.call(t,t)}):this.map(function(t){return t[e].apply(t,n)})},toArray:function(){return Array.prototype.concat.apply([],this)}});var yi=["toArray","constructor","each"];function pi(t,e){return new di(mn((e||jn.document).querySelectorAll(t),function(t){return Dn(t)}))}di.extend=function(t){t=t.reduce(function(t,r){return yi.includes(r)||"_"===r[0]||(t[r]=function(){for(var t=arguments.length,e=new Array(t),n=0;n<t;n++)e[n]=arguments[n];return this.each.apply(this,[r].concat(e))}),t},{}),Hn(di,t)};var mi=function(t){function r(){var t,e=(0<arguments.length&&void 0!==arguments[0]?arguments[0]:{}).events,n=void 0===e?{}:e;return Cn(this,r),(t=Ir(this,Lr(r).call(this))).events=n,t}return Dr(r,Nn),_r(r,[{key:"addEventListener",value:function(){}},{key:"dispatch",value:function(t,e){return mr(this,t,e)}},{key:"dispatchEvent",value:function(t){var e=this.getEventHolder().events;if(!e)return!0;var n=e[t.type];for(var r in n)for(var i in n[r])n[r][i](t);return!t.defaultPrevented}},{key:"fire",value:function(t,e){return this.dispatch(t,e),this}},{key:"getEventHolder",value:function(){return this}},{key:"getEventTarget",value:function(){return this}},{key:"off",value:function(t,e){return pr(this,t,e),this}},{key:"on",value:function(t,e,n,r){return yr(this,t,e,n,r),this}},{key:"removeEventListener",value:function(){}}]),r}();function gi(){}qn(mi,"EventTarget");var wi={duration:400,ease:">",delay:0},_i={"fill-opacity":1,"stroke-opacity":1,"stroke-width":0,"stroke-linejoin":"miter","stroke-linecap":"butt",fill:"#000000",stroke:"#000000",opacity:1,x:0,y:0,cx:0,cy:0,width:0,height:0,r:0,rx:0,ry:0,offset:0,"stop-opacity":1,"stop-color":"#000000","text-anchor":"start"},bi={noop:gi,timeline:wi,attrs:_i},ki=vi("SVGArray",Array,function(t){this.init(t)});Hn(ki,{init:function(t){return"number"==typeof t||(this.length=0,this.push.apply(this,oe(this.parse(t)))),this},toArray:function(){return Array.prototype.concat.apply([],this)},toString:function(){return this.join(" ")},valueOf:function(){var t=[];return t.push.apply(t,oe(this)),t},parse:function(){var t=0<arguments.length&&void 0!==arguments[0]?arguments[0]:[];return t instanceof Array?t:t.trim().split(ir).map(parseFloat)},clone:function(){return new this.constructor(this)},toSet:function(){return new Set(this)}});var xi=function(){function n(){Cn(this,n),this.init.apply(this,arguments)}return _r(n,[{key:"init",value:function(t,e){return e=Array.isArray(t)?t[1]:e,t=Array.isArray(t)?t[0]:t,this.value=0,this.unit=e||"","number"==typeof t?this.value=isNaN(t)?0:isFinite(t)?t:t<0?-34e37:34e37:"string"==typeof t?(e=t.match(Un))&&(this.value=parseFloat(e[1]),"%"===e[5]?this.value/=100:"s"===e[5]&&(this.value*=1e3),this.unit=e[5]):t instanceof n&&(this.value=t.valueOf(),this.unit=t.unit),this}},{key:"toString",value:function(){return("%"===this.unit?~~(1e8*this.value)/1e6:"s"===this.unit?this.value/1e3:this.value)+this.unit}},{key:"toJSON",value:function(){return this.toString()}},{key:"toArray",value:function(){return[this.value,this.unit]}},{key:"valueOf",value:function(){return this.value}},{key:"plus",value:function(t){return new n(this+(t=new n(t)),this.unit||t.unit)}},{key:"minus",value:function(t){return new n(this-(t=new n(t)),this.unit||t.unit)}},{key:"times",value:function(t){return new n(this*(t=new n(t)),this.unit||t.unit)}},{key:"divide",value:function(t){return new n(this/(t=new n(t)),this.unit||t.unit)}},{key:"convert",value:function(t){return new n(this.value,t)}}]),n}(),Oi=[];var Dom=function(t){function Dom(t,e){var n;return Cn(this,Dom),(n=Ir(this,Lr(Dom).call(this,t))).node=t,n.type=t.nodeName,e&&t!==e&&n.attr(e),n}return Dr(Dom,mi),_r(Dom,[{key:"add",value:function(t,e){return t=Fn(t),null==e?this.node.appendChild(t.node):t.node!==this.node.childNodes[e]&&this.node.insertBefore(t.node,this.node.childNodes[e]),this}},{key:"addTo",value:function(t){return Fn(t).put(this)}},{key:"children",value:function(){return new di(mn(this.node.children,function(t){return Dn(t)}))}},{key:"clear",value:function(){for(;this.node.hasChildNodes();)this.node.removeChild(this.node.lastChild);return this}},{key:"clone",value:function(){return this.writeDataToDom(),Vn(this.node.cloneNode(!0))}},{key:"each",value:function(t,e){var n,r,i=this.children();for(n=0,r=i.length;n<r;n++)t.apply(i[n],[n,i]),e&&i[n].each(t,e);return this}},{key:"element",value:function(t){return this.put(new Dom(Ln(t)))}},{key:"first",value:function(){return Dn(this.node.firstChild)}},{key:"get",value:function(t){return Dn(this.node.childNodes[t])}},{key:"getEventHolder",value:function(){return this.node}},{key:"getEventTarget",value:function(){return this.node}},{key:"has",value:function(t){return 0<=this.index(t)}},{key:"id",value:function(t){return void 0!==t||this.node.id||(this.node.id=Gn(this.type)),this.attr("id",t)}},{key:"index",value:function(t){return[].slice.call(this.node.childNodes).indexOf(t.node)}},{key:"last",value:function(){return Dn(this.node.lastChild)}},{key:"matches",value:function(t){var e=this.node;return(e.matches||e.matchesSelector||e.msMatchesSelector||e.mozMatchesSelector||e.webkitMatchesSelector||e.oMatchesSelector).call(e,t)}},{key:"parent",value:function(t){var e=this;if(!e.node.parentNode)return null;if(e=Dn(e.node.parentNode),!t)return e;for(;e;){if("string"==typeof t?e.matches(t):e instanceof t)return e;if(!e.node.parentNode||"#document"===e.node.parentNode.nodeName||"#document-fragment"===e.node.parentNode.nodeName)return null;e=Dn(e.node.parentNode)}}},{key:"put",value:function(t,e){return this.add(t,e),t}},{key:"putIn",value:function(t){return Fn(t).add(this)}},{key:"remove",value:function(){return this.parent()&&this.parent().removeElement(this),this}},{key:"removeElement",value:function(t){return this.node.removeChild(t.node),this}},{key:"replace",value:function(t){return t=Fn(t),this.node.parentNode.replaceChild(t.node,this.node),t}},{key:"round",value:function(){var t=0<arguments.length&&void 0!==arguments[0]?arguments[0]:2,e=1<arguments.length?arguments[1]:void 0,n=Math.pow(10,t),r=this.attr();e||(e=Object.keys(r));var i={};return e.forEach(function(t){i[t]=Math.round(r[t]*n)/n}),this.attr(i),this}},{key:"toString",value:function(){return this.id()}},{key:"svg",value:function(n,t){var e,r,i;if(!1===n&&(t=!1,n=null),null==n||"function"==typeof n){t=null==t||t,this.writeDataToDom();var s=this;if(null!=n){if(s=Dn(s.node.cloneNode(!0)),t){var o=n(s);if(s=o||s,!1===o)return""}s.each(function(){var t=n(this),e=t||this;!1===t?this.remove():t&&this!==e&&this.replace(e)},!0)}return t?s.node.outerHTML:s.node.innerHTML}for(t=null!=t&&t,e=jn.document.createElementNS(Sn,"svg"),i=jn.document.createDocumentFragment(),e.innerHTML=n,r=e.children.length;r--;)i.appendChild(e.firstElementChild);var u=this.parent();return t?this.replace(i)&&u:this.add(i)}},{key:"words",value:function(t){return this.node.textContent=t,this}},{key:"writeDataToDom",value:function(){return this.each(function(){this.writeDataToDom()}),this}}]),Dom}();Hn(Dom,{attr:function(n,t,e){var r=this;if(null==n){n={},t=this.node.attributes;var i=!0,s=!1,o=void 0;try{for(var u,a=t[Symbol.iterator]();!(i=(u=a.next()).done);i=!0){var h=u.value;n[h.nodeName]=nr.test(h.nodeValue)?parseFloat(h.nodeValue):h.nodeValue}}catch(t){s=!0,o=t}finally{try{i||null==a.return||a.return()}finally{if(s)throw o}}return n}if(n instanceof Array)return n.reduce(function(t,e){return t[e]=r.attr(e),t},{});if("object"===st(n)&&n.constructor===Object)for(t in n)this.attr(t,n[t]);else if(null===t)this.node.removeAttribute(n);else{if(null==t)return null==(t=this.node.getAttribute(n))?_i[n]:nr.test(t)?parseFloat(t):t;"number"==typeof(t=Oi.reduce(function(t,e){return e(n,t,r)},t))?t=new xi(t):Nr.isColor(t)?t=new Nr(t):t.constructor===Array&&(t=new ki(t)),"leading"===n?this.leading&&this.leading(t):"string"==typeof e?this.node.setAttributeNS(e,n,t.toString()):this.node.setAttribute(n,t.toString()),!this.rebuild||"font-size"!==n&&"x"!==n||this.rebuild()}return this},find:function(t){return pi(t,this.node)},findOne:function(t){return Dn(this.node.querySelector(t))}}),qn(Dom,"Dom");var Element=function(t){function Element(t,e){var n;return Cn(this,Element),(n=Ir(this,Lr(Element).call(this,t,e))).dom={},n.node.instance=Pr(Pr(n)),t.hasAttribute("svgjs:data")&&n.setData(JSON.parse(t.getAttribute("svgjs:data"))||{}),n}return Dr(Element,Dom),_r(Element,[{key:"center",value:function(t,e){return this.cx(t).cy(e)}},{key:"cx",value:function(t){return null==t?this.x()+this.width()/2:this.x(t-this.width()/2)}},{key:"cy",value:function(t){return null==t?this.y()+this.height()/2:this.y(t-this.height()/2)}},{key:"defs",value:function(){return this.root().defs()}},{key:"dmove",value:function(t,e){return this.dx(t).dy(e)}},{key:"dx",value:function(t){return this.x(new xi(t).plus(this.x()))}},{key:"dy",value:function(t){return this.y(new xi(t).plus(this.y()))}},{key:"root",value:function(){var t=this.parent(Yn(In));return t&&t.root()}},{key:"getEventHolder",value:function(){return this}},{key:"height",value:function(t){return this.attr("height",t)}},{key:"inside",value:function(t,e){var n=this.bbox();return t>n.x&&e>n.y&&t<n.x+n.width&&e<n.y+n.height}},{key:"move",value:function(t,e){return this.x(t).y(e)}},{key:"parents",value:function(){var t=0<arguments.length&&void 0!==arguments[0]?arguments[0]:jn.document;t=Fn(t);for(var e=new di,n=this;(n=n.parent())&&n.node!==t.node&&n.node!==jn.document;)e.push(n);return e}},{key:"reference",value:function(t){if(!(t=this.attr(t)))return null;var e=t.match($n);return e?Fn(e[1]):null}},{key:"setData",value:function(t){return this.dom=t,this}},{key:"size",value:function(t,e){var n=kn(this,t,e);return this.width(new xi(n.width)).height(new xi(n.height))}},{key:"width",value:function(t){return this.attr("width",t)}},{key:"writeDataToDom",value:function(){return this.node.removeAttribute("svgjs:data"),Object.keys(this.dom).length&&this.node.setAttribute("svgjs:data",JSON.stringify(this.dom)),Fr(Lr(Element.prototype),"writeDataToDom",this).call(this)}},{key:"x",value:function(t){return this.attr("x",t)}},{key:"y",value:function(t){return this.attr("y",t)}}]),Element}();Hn(Element,{bbox:function(){return new ci(fi.call(this,function(t){return t.getBBox()},function(e){try{var t=e.clone().addTo(hi().svg).show(),n=t.node.getBBox();return t.remove(),n}catch(t){throw new Error('Getting bbox of element "'+e.node.nodeName+'" is not possible. '+t.toString())}}))},rbox:function(t){var e=new ci(fi.call(this,function(t){return t.getBoundingClientRect()},function(t){throw new Error('Getting rbox of element "'+t.node.nodeName+'" is not possible')}));return t?e.transform(t.screenCTM().inverse()):e.addOffset()},point:function(t,e){return new oi(t,e).transform(this.screenCTM().inverse())},ctm:function(){return new ai(this.node.getCTM())},screenCTM:function(){if("function"!=typeof this.isRoot||this.isRoot())return new ai(this.node.getScreenCTM());var t=this.rect(1,1),e=t.node.getScreenCTM();return t.remove(),new ai(e)}}),qn(Element,"Element");var Si={stroke:["color","width","opacity","linecap","linejoin","miterlimit","dasharray","dashoffset"],fill:["color","opacity","rule"],prefix:function(t,e){return"color"===e?t:t+"-"+e}};function Mi(i){for(var t=1;t<arguments.length;t++){var s=null!=arguments[t]?arguments[t]:{},e=Object.keys(s);"function"==typeof Object.getOwnPropertySymbols&&(e=e.concat(Object.getOwnPropertySymbols(s).filter(function(t){return Object.getOwnPropertyDescriptor(s,t).enumerable}))),e.forEach(function(t){var e,n,r;e=i,r=s[n=t],n in e?Object.defineProperty(e,n,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[n]=r})}return i}function Ai(t){return this.attr("rx",t)}function Ei(t){return this.attr("ry",t)}function Ti(t){return null==t?this.cx()-this.rx():this.cx(t+this.rx())}function ji(t){return null==t?this.cy()-this.ry():this.cy(t+this.ry())}function Ci(t){return null==t?this.attr("cx"):this.attr("cx",t)}function Ni(t){return null==t?this.attr("cy"):this.attr("cy",t)}function Pi(t){return null==t?2*this.rx():this.rx(new xi(t).divide(2))}function Ii(t){return null==t?2*this.ry():this.ry(new xi(t).divide(2))}["fill","stroke"].forEach(function(e){var n,t={};t[e]=function(t){if(void 0===t)return this.attr(e);if("string"==typeof t||t instanceof Nr||Nr.isRgb(t)||t instanceof Element)this.attr(e,t);else for(n=Si[e].length-1;0<=n;n--)null!=t[Si[e][n]]&&this.attr(Si.prefix(e,Si[e][n]),t[Si[e][n]]);return this},an(["Element","Runner"],t)}),an(["Element","Runner"],{matrix:function(t,e,n,r,i,s){return null==t?new ai(this):this.attr("transform",new ai(t,e,n,r,i,s))},rotate:function(t,e,n){return this.transform({rotate:t,ox:e,oy:n},!0)},skew:function(t,e,n,r){return 1===arguments.length||3===arguments.length?this.transform({skew:t,ox:e,oy:n},!0):this.transform({skew:[t,e],ox:n,oy:r},!0)},shear:function(t,e,n){return this.transform({shear:t,ox:e,oy:n},!0)},scale:function(t,e,n,r){return 1===arguments.length||3===arguments.length?this.transform({scale:t,ox:e,oy:n},!0):this.transform({scale:[t,e],ox:n,oy:r},!0)},translate:function(t,e){return this.transform({translate:[t,e]},!0)},relative:function(t,e){return this.transform({relative:[t,e]},!0)},flip:function(t,e){var n="string"==typeof t?t:(isFinite(t),"both"),r="both"===t&&isFinite(e)?[e,e]:"x"===t?[e,0]:"y"===t?[0,e]:isFinite(t)?[t,t]:[0,0];return this.transform({flip:n,origin:r},!0)},opacity:function(t){return this.attr("opacity",t)}}),an("radius",{radius:function(t,e){var n=(this._element||this).type;return"radialGradient"===n||"radialGradient"===n?this.attr("r",new xi(t)):this.rx(t).ry(null==e?t:e)}}),an("Path",{length:function(){return this.node.getTotalLength()},pointAt:function(t){return new oi(this.node.getPointAtLength(t))}}),an(["Element","Runner"],{font:function(t,e){if("object"!==st(t))return"leading"===t?this.leading(e):"anchor"===t?this.attr("text-anchor",e):"size"===t||"family"===t||"weight"===t||"stretch"===t||"variant"===t||"style"===t?this.attr("font-"+t,e):this.attr(t,e);for(e in t)this.font(e,t[e]);return this}}),an("Text",{ax:function(t){return this.attr("x",t)},ay:function(t){return this.attr("y",t)},amove:function(t,e){return this.ax(t).ay(e)}}),an("Element",["click","dblclick","mousedown","mouseup","mouseover","mouseout","mousemove","mouseenter","mouseleave","touchstart","touchmove","touchleave","touchend","touchcancel"].reduce(function(t,e){return t[e]=function(t){return null===t?pr(this,e):yr(this,e,t),this},t},{})),an("Element",{untransform:function(){return this.attr("transform",null)},matrixify:function(){return(this.attr("transform")||"").split(Jn).slice(0,-1).map(function(t){var e=t.trim().split("(");return[e[0],e[1].split(ir).map(function(t){return parseFloat(t)})]}).reverse().reduce(function(t,e){return"matrix"===e[0]?t.lmultiply(ai.fromArray(e[1])):t[e[0]].apply(t,e[1])},new ai)},toParent:function(t){if(this===t)return this;var e=this.screenCTM(),n=t.screenCTM().inverse();return this.addTo(t).untransform().transform(n.multiply(e)),this},toRoot:function(){return this.toParent(this.root())},transform:function(t,e){if(null==t||"string"==typeof t){var n=new ai(this).decompose();return null==t?n:n[t]}ai.isMatrixLike(t)||(t=Mi({},t,{origin:xn(t,this)}));var r=new ai(!0===e?this:e||!1).transform(t);return this.attr("transform",r)}});var Li={rx:Ai,ry:Ei,x:Ti,y:ji,cx:Ci,cy:Ni,width:Pi,height:Ii},Shape=function(t){function Shape(){return Cn(this,Shape),Ir(this,Lr(Shape).apply(this,arguments))}return Dr(Shape,Element),Shape}();qn(Shape,"Shape");var Circle=function(t){function Circle(t){return Cn(this,Circle),Ir(this,Lr(Circle).call(this,Rn("circle",t),t))}return Dr(Circle,Shape),_r(Circle,[{key:"radius",value:function(t){return this.attr("r",t)}},{key:"rx",value:function(t){return this.attr("r",t)}},{key:"ry",value:function(t){return this.rx(t)}},{key:"size",value:function(t){return this.radius(new xi(t).divide(2))}}]),Circle}();Hn(Circle,{x:Ti,y:ji,cx:Ci,cy:Ni,width:Pi,height:Ii}),an({Container:{circle:Bn(function(t){return this.put(new Circle).size(t).move(0,0)})}}),qn(Circle,"Circle");var Container=function(t){function Container(){return Cn(this,Container),Ir(this,Lr(Container).apply(this,arguments))}return Dr(Container,Element),_r(Container,[{key:"flatten",value:function(t){return this.each(function(){return this instanceof Container?this.flatten(t).ungroup(t):this.toParent(t)}),this.node.firstElementChild||this.remove(),this}},{key:"ungroup",value:function(t){return t=t||this.parent(),this.each(function(){return this.toParent(t)}),this.remove(),this}}]),Container}();qn(Container,"Container");var Defs=function(t){function Defs(t){return Cn(this,Defs),Ir(this,Lr(Defs).call(this,Rn("defs",t),t))}return Dr(Defs,Container),_r(Defs,[{key:"flatten",value:function(){return this}},{key:"ungroup",value:function(){return this}}]),Defs}();qn(Defs,"Defs");var Ellipse=function(t){function Ellipse(t){return Cn(this,Ellipse),Ir(this,Lr(Ellipse).call(this,Rn("ellipse",t),t))}return Dr(Ellipse,Shape),_r(Ellipse,[{key:"size",value:function(t,e){var n=kn(this,t,e);return this.rx(new xi(n.width).divide(2)).ry(new xi(n.height).divide(2))}}]),Ellipse}();Hn(Ellipse,Li),an("Container",{ellipse:Bn(function(){var t=0<arguments.length&&void 0!==arguments[0]?arguments[0]:0,e=1<arguments.length&&void 0!==arguments[1]?arguments[1]:t;return this.put(new Ellipse).size(t,e).move(0,0)})}),qn(Ellipse,"Ellipse");var Stop=function(t){function Stop(t){return Cn(this,Stop),Ir(this,Lr(Stop).call(this,Rn("stop",t),t))}return Dr(Stop,Element),_r(Stop,[{key:"update",value:function(t){return("number"==typeof t||t instanceof xi)&&(t={offset:arguments[0],color:arguments[1],opacity:arguments[2]}),null!=t.opacity&&this.attr("stop-opacity",t.opacity),null!=t.color&&this.attr("stop-color",t.color),null!=t.offset&&this.attr("offset",new xi(t.offset)),this}}]),Stop}();function Fi(t,e){return"radialGradient"===(this._element||this).type?this.attr({fx:new xi(t),fy:new xi(e)}):this.attr({x1:new xi(t),y1:new xi(e)})}function Ri(t,e){return"radialGradient"===(this._element||this).type?this.attr({cx:new xi(t),cy:new xi(e)}):this.attr({x2:new xi(t),y2:new xi(e)})}qn(Stop,"Stop");var Di={from:Fi,to:Ri},Gradient=function(t){function Gradient(t,e){return Cn(this,Gradient),Ir(this,Lr(Gradient).call(this,Rn(t+"Gradient","string"==typeof t?null:t),e))}return Dr(Gradient,Container),_r(Gradient,[{key:"stop",value:function(t,e,n){return this.put(new Stop).update(t,e,n)}},{key:"update",value:function(t){return this.clear(),"function"==typeof t&&t.call(this,this),this}},{key:"url",value:function(){return"url(#"+this.id()+")"}},{key:"toString",value:function(){return this.url()}},{key:"attr",value:function(t,e,n){return"transform"===t&&(t="gradientTransform"),Fr(Lr(Gradient.prototype),"attr",this).call(this,t,e,n)}},{key:"targets",value:function(){return pi('svg [fill*="'+this.id()+'"]')}},{key:"bbox",value:function(){return new ci}}]),Gradient}();Hn(Gradient,Di),an({Container:{gradient:Bn(function(t,e){return this.defs().gradient(t,e)})},Defs:{gradient:Bn(function(t,e){return this.put(new Gradient(t)).update(e)})}}),qn(Gradient,"Gradient");var Pattern=function(t){function Pattern(t){return Cn(this,Pattern),Ir(this,Lr(Pattern).call(this,Rn("pattern",t),t))}return Dr(Pattern,Container),_r(Pattern,[{key:"url",value:function(){return"url(#"+this.id()+")"}},{key:"update",value:function(t){return this.clear(),"function"==typeof t&&t.call(this,this),this}},{key:"toString",value:function(){return this.url()}},{key:"attr",value:function(t,e,n){return"transform"===t&&(t="patternTransform"),Fr(Lr(Pattern.prototype),"attr",this).call(this,t,e,n)}},{key:"targets",value:function(){return pi('svg [fill*="'+this.id()+'"]')}},{key:"bbox",value:function(){return new ci}}]),Pattern}();an({Container:{pattern:function(){var t;return(t=this.defs()).pattern.apply(t,arguments)}},Defs:{pattern:Bn(function(t,e,n){return this.put(new Pattern).update(n).attr({x:0,y:0,width:t,height:e,patternUnits:"userSpaceOnUse"})})}}),qn(Pattern,"Pattern");var zi,Image=function(t){function Image(t){return Cn(this,Image),Ir(this,Lr(Image).call(this,Rn("image",t),t))}return Dr(Image,Shape),_r(Image,[{key:"load",value:function(t,n){if(!t)return this;var r=new jn.window.Image;return yr(r,"load",function(t){var e=this.parent(Pattern);0===this.width()&&0===this.height()&&this.size(r.width,r.height),e instanceof Pattern&&0===e.width()&&0===e.height()&&e.size(this.width(),this.height()),"function"==typeof n&&n.call(this,t)},this),yr(r,"load error",function(){pr(r)}),this.attr("href",r.src=t,An)}}]),Image}();zi=function(t,e,n){return"fill"!==t&&"stroke"!==t||rr.test(e)&&(e=n.root().defs().image(e)),e instanceof Image&&(e=n.root().defs().pattern(0,0,function(t){t.add(e)})),e},Oi.push(zi),an({Container:{image:Bn(function(t,e){return this.put(new Image).size(0,0).load(t,e)})}}),qn(Image,"Image");var qi=vi("PointArray",ki);Hn(qi,{toString:function(){for(var t=0,e=this.length,n=[];t<e;t++)n.push(this[t].join(","));return n.join(" ")},toLine:function(){return{x1:this[0][0],y1:this[0][1],x2:this[1][0],y2:this[1][1]}},at:function(t){if(!this.destination)return this;for(var e=0,n=this.length,r=[];e<n;e++)r.push([this[e][0]+(this.destination[e][0]-this[e][0])*t,this[e][1]+(this.destination[e][1]-this[e][1])*t]);return new qi(r)},parse:function(){var t=0<arguments.length&&void 0!==arguments[0]?arguments[0]:[[0,0]],e=[];if(t instanceof Array){if(t[0]instanceof Array)return t}else t=t.trim().split(ir).map(parseFloat);t.length%2!=0&&t.pop();for(var n=0,r=t.length;n<r;n+=2)e.push([t[n],t[n+1]]);return e},transform:function(t){for(var e=[],n=0;n<this.length;n++){var r=this[n];e.push([t.a*r[0]+t.c*r[1]+t.e,t.b*r[0]+t.d*r[1]+t.f])}return new qi(e)},move:function(t,e){var n=this.bbox();if(t-=n.x,e-=n.y,!isNaN(t)&&!isNaN(e))for(var r=this.length-1;0<=r;r--)this[r]=[this[r][0]+t,this[r][1]+e];return this},size:function(t,e){var n,r=this.bbox();for(n=this.length-1;0<=n;n--)r.width&&(this[n][0]=(this[n][0]-r.x)*t/r.width+r.x),r.height&&(this[n][1]=(this[n][1]-r.y)*e/r.height+r.y);return this},bbox:function(){var e=-1/0,n=-1/0,r=1/0,i=1/0;return this.forEach(function(t){e=Math.max(t[0],e),n=Math.max(t[1],n),r=Math.min(t[0],r),i=Math.min(t[1],i)}),{x:r,y:i,width:e-r,height:n-i}}});var Yi={MorphArray:qi,x:function(t){return null==t?this.bbox().x:this.move(t,this.bbox().y)},y:function(t){return null==t?this.bbox().y:this.move(this.bbox().x,t)},width:function(t){var e=this.bbox();return null==t?e.width:this.size(t,e.height)},height:function(t){var e=this.bbox();return null==t?e.height:this.size(e.width,t)}},Line=function(t){function Line(t){return Cn(this,Line),Ir(this,Lr(Line).call(this,Rn("line",t),t))}return Dr(Line,Shape),_r(Line,[{key:"array",value:function(){return new qi([[this.attr("x1"),this.attr("y1")],[this.attr("x2"),this.attr("y2")]])}},{key:"plot",value:function(t,e,n,r){return null==t?this.array():(t=void 0!==e?{x1:t,y1:e,x2:n,y2:r}:new qi(t).toLine(),this.attr(t))}},{key:"move",value:function(t,e){return this.attr(this.array().move(t,e).toLine())}},{key:"size",value:function(t,e){var n=kn(this,t,e);return this.attr(this.array().size(n.width,n.height).toLine())}}]),Line}();Hn(Line,Yi),an({Container:{line:Bn(function(){for(var t=arguments.length,e=new Array(t),n=0;n<t;n++)e[n]=arguments[n];return Line.prototype.plot.apply(this.put(new Line),null!=e[0]?e:[0,0,0,0])})}}),qn(Line,"Line");var Marker=function(t){function Marker(t){return Cn(this,Marker),Ir(this,Lr(Marker).call(this,Rn("marker",t),t))}return Dr(Marker,Container),_r(Marker,[{key:"width",value:function(t){return this.attr("markerWidth",t)}},{key:"height",value:function(t){return this.attr("markerHeight",t)}},{key:"ref",value:function(t,e){return this.attr("refX",t).attr("refY",e)}},{key:"update",value:function(t){return this.clear(),"function"==typeof t&&t.call(this,this),this}},{key:"toString",value:function(){return"url(#"+this.id()+")"}}]),Marker}();an({Container:{marker:function(){var t;return(t=this.defs()).marker.apply(t,arguments)}},Defs:{marker:Bn(function(t,e,n){return this.put(new Marker).size(t,e).ref(t/2,e/2).viewbox(0,0,t,e).attr("orient","auto").update(n)})},marker:{marker:function(t,e,n,r){var i=["marker"];return"all"!==t&&i.push(t),i=i.join("-"),t=e instanceof Marker?e:this.defs().marker(e,n,r),this.attr(i,t)}}}),qn(Marker,"Marker");var Xi,Gi,Vi=[].sort,Hi=[1,2,3];function Bi(e,n){return function(t){return null==t?this[t]:(this[e]=t,n&&n.call(this),this)}}M(M.P+M.F*(w(function(){Hi.sort(void 0)})||!w(function(){Hi.sort(null)})||!((Xi=Vi)&&w(function(){Gi?Xi.call(null,function(){},1):Xi.call(null)}))),"Array",{sort:function(t){return void 0===t?Vi.call(Z(this)):Vi.call(Z(this),d(t))}});var Ui={"-":function(t){return t},"<>":function(t){return-Math.cos(t*Math.PI)/2+.5},">":function(t){return Math.sin(t*Math.PI/2)},"<":function(t){return 1-Math.cos(t*Math.PI/2)},bezier:function(e,n,r,i){return function(t){return t<0?0<e?n/e*t:0<r?i/r*t:0:1<t?r<1?(1-i)/(1-r)*t+(i-r)/(1-r):e<1?(1-n)/(1-e)*t+(n-e)/(1-e):1:3*t*Math.pow(1-t,2)*n+3*Math.pow(t,2)*(1-t)*i+Math.pow(t,3)}},steps:function(i){var s=1<arguments.length&&void 0!==arguments[1]?arguments[1]:"end";s=s.split("-").reverse()[0];var o=i;return"none"===s?--o:"both"===s&&++o,function(t){var e=1<arguments.length&&void 0!==arguments[1]&&arguments[1],n=Math.floor(t*i),r=t*n%1==0;return"start"!==s&&"both"!==s||++n,e&&r&&--n,0<=t&&n<0&&(n=0),t<=1&&o<n&&(n=o),n/o}}},Wi=function(){function t(){Cn(this,t)}return _r(t,[{key:"done",value:function(){return!1}}]),t}(),Qi=function(t){function n(t){var e;return Cn(this,n),(e=Ir(this,Lr(n).call(this))).ease=Ui[t||wi.ease]||t,e}return Dr(n,Wi),_r(n,[{key:"step",value:function(t,e,n){return"number"!=typeof t?n<1?t:e:t+(e-t)*this.ease(n)}}]),n}(),$i=function(t){function n(t){var e;return Cn(this,n),(e=Ir(this,Lr(n).call(this))).stepper=t,e}return Dr(n,Wi),_r(n,[{key:"step",value:function(t,e,n,r){return this.stepper(t,e,n,r)}},{key:"done",value:function(t){return t.done}}]),n}();function Ji(){var t=(this._duration||500)/1e3,e=this._overshoot||0,n=Math.PI,r=Math.log(e/100+1e-10),i=-r/Math.sqrt(n*n+r*r),s=3.9/(i*t);this.d=2*i*s,this.k=s*s}var Zi=function(t){function r(t,e){var n;return Cn(this,r),(n=Ir(this,Lr(r).call(this))).duration(t||500).overshoot(e||0),n}return Dr(r,$i),_r(r,[{key:"step",value:function(t,e,n,r){if("string"==typeof t)return t;if(r.done=n===1/0,n===1/0)return e;if(0===n)return t;100<n&&(n=16),n/=1e3;var i=r.velocity||0,s=-this.d*i-this.k*(t-e),o=t+i*n+s*n*n/2;return r.velocity=i+s*n,r.done=Math.abs(e-o)+Math.abs(i)<.002,r.done?e:o}}]),r}();Hn(Zi,{duration:Bi("_duration",Ji),overshoot:Bi("_overshoot",Ji)});var Ki=function(t){function s(t,e,n,r){var i;return Cn(this,s),t=null==t?.1:t,e=null==e?.01:e,n=null==n?0:n,r=null==r?1e3:r,(i=Ir(this,Lr(s).call(this))).p(t).i(e).d(n).windup(r),i}return Dr(s,$i),_r(s,[{key:"step",value:function(t,e,n,r){if("string"==typeof t)return t;if(r.done=n===1/0,n===1/0)return e;if(0===n)return t;var i=e-t,s=(r.integral||0)+i*n,o=(i-(r.error||0))/n,u=this.windup;return!1!==u&&(s=Math.max(-u,Math.min(s,u))),r.error=i,r.integral=s,r.done=Math.abs(i)<.001,r.done?e:t+(this.P*i+this.I*s+this.D*o)}}]),s}();Hn(Ki,{windup:Bi("windup"),p:Bi("P"),i:Bi("I"),d:Bi("D")});var ts=vi("PathArray",ki);function es(t,e,n,r){return n+r.replace(hr," .")}for(var ns={M:function(t,e,n){return e.x=n.x=t[0],e.y=n.y=t[1],["M",e.x,e.y]},L:function(t,e){return e.x=t[0],e.y=t[1],["L",t[0],t[1]]},H:function(t,e){return e.x=t[0],["H",t[0]]},V:function(t,e){return e.y=t[0],["V",t[0]]},C:function(t,e){return e.x=t[4],e.y=t[5],["C",t[0],t[1],t[2],t[3],t[4],t[5]]},S:function(t,e){return e.x=t[2],e.y=t[3],["S",t[0],t[1],t[2],t[3]]},Q:function(t,e){return e.x=t[2],e.y=t[3],["Q",t[0],t[1],t[2],t[3]]},T:function(t,e){return e.x=t[0],e.y=t[1],["T",t[0],t[1]]},Z:function(t,e,n){return e.x=n.x,e.y=n.y,["Z"]},A:function(t,e){return e.x=t[5],e.y=t[6],["A",t[0],t[1],t[2],t[3],t[4],t[5],t[6]]}},rs="mlhvqtcsaz".split(""),is=0,ss=rs.length;is<ss;++is)ns[rs[is]]=function(s){return function(t,e,n){if("H"===s)t[0]=t[0]+e.x;else if("V"===s)t[0]=t[0]+e.y;else if("A"===s)t[5]=t[5]+e.x,t[6]=t[6]+e.y;else for(var r=0,i=t.length;r<i;++r)t[r]=t[r]+(r%2?e.y:e.x);return ns[s](t,e,n)}}(rs[is].toUpperCase());Hn(ts,{toString:function(){return function(t){for(var e=0,n=t.length,r="";e<n;e++)r+=t[e][0],null!=t[e][1]&&(r+=t[e][1],null!=t[e][2]&&(r+=" ",r+=t[e][2],null!=t[e][3]&&(r+=" ",r+=t[e][3],r+=" ",r+=t[e][4],null!=t[e][5]&&(r+=" ",r+=t[e][5],r+=" ",r+=t[e][6],null!=t[e][7]&&(r+=" ",r+=t[e][7])))));return r+" "}(this)},move:function(t,e){var n=this.bbox();if(t-=n.x,e-=n.y,!isNaN(t)&&!isNaN(e))for(var r,i=this.length-1;0<=i;i--)"M"===(r=this[i][0])||"L"===r||"T"===r?(this[i][1]+=t,this[i][2]+=e):"H"===r?this[i][1]+=t:"V"===r?this[i][1]+=e:"C"===r||"S"===r||"Q"===r?(this[i][1]+=t,this[i][2]+=e,this[i][3]+=t,this[i][4]+=e,"C"===r&&(this[i][5]+=t,this[i][6]+=e)):"A"===r&&(this[i][6]+=t,this[i][7]+=e);return this},size:function(t,e){var n,r,i=this.bbox();for(i.width=0===i.width?1:i.width,i.height=0===i.height?1:i.height,n=this.length-1;0<=n;n--)"M"===(r=this[n][0])||"L"===r||"T"===r?(this[n][1]=(this[n][1]-i.x)*t/i.width+i.x,this[n][2]=(this[n][2]-i.y)*e/i.height+i.y):"H"===r?this[n][1]=(this[n][1]-i.x)*t/i.width+i.x:"V"===r?this[n][1]=(this[n][1]-i.y)*e/i.height+i.y:"C"===r||"S"===r||"Q"===r?(this[n][1]=(this[n][1]-i.x)*t/i.width+i.x,this[n][2]=(this[n][2]-i.y)*e/i.height+i.y,this[n][3]=(this[n][3]-i.x)*t/i.width+i.x,this[n][4]=(this[n][4]-i.y)*e/i.height+i.y,"C"===r&&(this[n][5]=(this[n][5]-i.x)*t/i.width+i.x,this[n][6]=(this[n][6]-i.y)*e/i.height+i.y)):"A"===r&&(this[n][1]=this[n][1]*t/i.width,this[n][2]=this[n][2]*e/i.height,this[n][6]=(this[n][6]-i.x)*t/i.width+i.x,this[n][7]=(this[n][7]-i.y)*e/i.height+i.y);return this},equalCommands:function(t){var e,n,r;for(t=new ts(t),r=this.length===t.length,e=0,n=this.length;r&&e<n;e++)r=this[e][0]===t[e][0];return r},morph:function(t){return t=new ts(t),this.equalCommands(t)?this.destination=t:this.destination=null,this},at:function(t){if(!this.destination)return this;var e,n,r,i,s=this,o=this.destination.value,u=[],a=new ts;for(e=0,n=s.length;e<n;e++){for(u[e]=[s[e][0]],r=1,i=s[e].length;r<i;r++)u[e][r]=s[e][r]+(o[e][r]-s[e][r])*t;"A"===u[e][0]&&(u[e][4]=+(0!==u[e][4]),u[e][5]=+(0!==u[e][5]))}return a.value=u,a},parse:function(){var t,e=0<arguments.length&&void 0!==arguments[0]?arguments[0]:[["M",0,0]];if(e instanceof ts)return e;var n={M:2,L:2,H:1,V:1,C:6,S:4,Q:4,T:2,A:7,Z:0};e="string"==typeof e?e.replace(ar,es).replace(or," $& ").replace(sr,"$1 -").trim().split(ir):e.reduce(function(t,e){return[].concat.call(t,e)},[]);for(var r=[],i=new oi,s=new oi,o=0,u=e.length;ur.test(e[o])?(t=e[o],++o):"M"===t?t="L":"m"===t&&(t="l"),r.push(ns[t].call(null,e.slice(o,o+=n[t.toUpperCase()]).map(parseFloat),i,s)),o<u;);return r},bbox:function(){return hi().path.setAttribute("d",this.toString()),hi.nodes.path.getBBox()}});var os=function(){function e(t){Cn(this,e),this._stepper=t||new Qi("-"),this._from=null,this._to=null,this._type=null,this._context=null,this._morphObj=null}return _r(e,[{key:"from",value:function(t){return null==t?this._from:(this._from=this._set(t),this)}},{key:"to",value:function(t){return null==t?this._to:(this._to=this._set(t),this)}},{key:"type",value:function(t){return null==t?this._type:(this._type=t,this)}},{key:"_set",value:function(t){if(!this._type){var e=st(t);"number"===e?this.type(xi):"string"===e?Nr.isColor(t)?this.type(Nr):ir.test(t)?this.type(or.test(t)?ts:ki):Un.test(t)?this.type(xi):this.type(us):-1<ls.indexOf(t.constructor)?this.type(t.constructor):Array.isArray(t)?this.type(ki):"object"===e?this.type(hs):this.type(us)}var n=new this._type(t);return this._type===Nr&&(n=this._to?n[this._to[4]]():this._from?n[this._from[4]]():n),n=n.toArray(),this._morphObj=this._morphObj||new this._type,this._context=this._context||Array.apply(null,Array(n.length)).map(Object).map(function(t){return t.done=!0,t}),n}},{key:"stepper",value:function(t){return null==t?this._stepper:(this._stepper=t,this)}},{key:"done",value:function(){return this._context.map(this._stepper.done).reduce(function(t,e){return t&&e},!0)}},{key:"at",value:function(n){var r=this;return this._morphObj.fromArray(this._from.map(function(t,e){return r._stepper.step(t,r._to[e],n,r._context[e],r._context)}))}}]),e}(),us=function(){function t(){Cn(this,t),this.init.apply(this,arguments)}return _r(t,[{key:"init",value:function(t){return t=Array.isArray(t)?t[0]:t,this.value=t,this}},{key:"valueOf",value:function(){return this.value}},{key:"toArray",value:function(){return[this.value]}}]),t}(),as=function(){function e(){Cn(this,e),this.init.apply(this,arguments)}return _r(e,[{key:"init",value:function(t){return Array.isArray(t)&&(t={scaleX:t[0],scaleY:t[1],shear:t[2],rotate:t[3],translateX:t[4],translateY:t[5],originX:t[6],originY:t[7]}),Object.assign(this,e.defaults,t),this}},{key:"toArray",value:function(){var t=this;return[t.scaleX,t.scaleY,t.shear,t.rotate,t.translateX,t.translateY,t.originX,t.originY]}}]),e}();as.defaults={scaleX:1,scaleY:1,shear:0,rotate:0,translateX:0,translateY:0,originX:0,originY:0};var hs=function(){function t(){Cn(this,t),this.init.apply(this,arguments)}return _r(t,[{key:"init",value:function(t){if(this.values=[],!Array.isArray(t)){t=t||{};var e=[];for(var n in t)e.push([n,t[n]]);return e.sort(function(t,e){return t[0]-e[0]}),this.values=e.reduce(function(t,e){return t.concat(e)},[]),this}this.values=t}},{key:"valueOf",value:function(){for(var t={},e=this.values,n=0,r=e.length;n<r;n+=2)t[e[n]]=e[n+1];return t}},{key:"toArray",value:function(){return this.values}}]),t}(),ls=[us,as,hs];function cs(){var t=0<arguments.length&&void 0!==arguments[0]?arguments[0]:[];ls.push.apply(ls,oe([].concat(t)))}function fs(){Hn(ls,{to:function(t){return(new os).type(this.constructor).from(this.valueOf()).to(t)},fromArray:function(t){return this.init(t),this}})}var Path=function(t){function Path(t){return Cn(this,Path),Ir(this,Lr(Path).call(this,Rn("path",t),t))}return Dr(Path,Shape),_r(Path,[{key:"array",value:function(){return this._array||(this._array=new ts(this.attr("d")))}},{key:"plot",value:function(t){return null==t?this.array():this.clear().attr("d","string"==typeof t?t:this._array=new ts(t))}},{key:"clear",value:function(){return delete this._array,this}},{key:"move",value:function(t,e){return this.attr("d",this.array().move(t,e))}},{key:"x",value:function(t){return null==t?this.bbox().x:this.move(t,this.bbox().y)}},{key:"y",value:function(t){return null==t?this.bbox().y:this.move(this.bbox().x,t)}},{key:"size",value:function(t,e){var n=kn(this,t,e);return this.attr("d",this.array().size(n.width,n.height))}},{key:"width",value:function(t){return null==t?this.bbox().width:this.size(t,this.bbox().height)}},{key:"height",value:function(t){return null==t?this.bbox().height:this.size(this.bbox().width,t)}},{key:"targets",value:function(){return pi('svg textpath [href*="'+this.id()+'"]')}}]),Path}();Path.prototype.MorphArray=ts,an({Container:{path:Bn(function(t){return this.put(new Path).plot(t||new ts)})}}),qn(Path,"Path");var vs={array:function(){return this._array||(this._array=new qi(this.attr("points")))},plot:function(t){return null==t?this.array():this.clear().attr("points","string"==typeof t?t:this._array=new qi(t))},clear:function(){return delete this._array,this},move:function(t,e){return this.attr("points",this.array().move(t,e))},size:function(t,e){var n=kn(this,t,e);return this.attr("points",this.array().size(n.width,n.height))}},Polygon=function(t){function Polygon(t){return Cn(this,Polygon),Ir(this,Lr(Polygon).call(this,Rn("polygon",t),t))}return Dr(Polygon,Shape),Polygon}();an({Container:{polygon:Bn(function(t){return this.put(new Polygon).plot(t||new qi)})}}),Hn(Polygon,Yi),Hn(Polygon,vs),qn(Polygon,"Polygon");var Polyline=function(t){function Polyline(t){return Cn(this,Polyline),Ir(this,Lr(Polyline).call(this,Rn("polyline",t),t))}return Dr(Polyline,Shape),Polyline}();an({Container:{polyline:Bn(function(t){return this.put(new Polyline).plot(t||new qi)})}}),Hn(Polyline,Yi),Hn(Polyline,vs),qn(Polyline,"Polyline");var Rect=function(t){function Rect(t){return Cn(this,Rect),Ir(this,Lr(Rect).call(this,Rn("rect",t),t))}return Dr(Rect,Shape),Rect}();Hn(Rect,{rx:Ai,ry:Ei}),an({Container:{rect:Bn(function(t,e){return this.put(new Rect).size(t,e)})}}),qn(Rect,"Rect");var ds=function(){function t(){Cn(this,t),this._first=null,this._last=null}return _r(t,[{key:"push",value:function(t){var e=t.next?t:{value:t,next:null,prev:null};return this._last?(e.prev=this._last,this._last.next=e,this._last=e):(this._last=e,this._first=e),e}},{key:"shift",value:function(){var t=this._first;return t?(this._first=t.next,this._first&&(this._first.prev=null),this._last=this._first?this._last:null,t.value):null}},{key:"first",value:function(){return this._first&&this._first.value}},{key:"last",value:function(){return this._last&&this._last.value}},{key:"remove",value:function(t){t.prev&&(t.prev.next=t.next),t.next&&(t.next.prev=t.prev),t===this._last&&(this._last=t.prev),t===this._first&&(this._first=t.next),t.prev=null,t.next=null}}]),t}(),ys={nextDraw:null,frames:new ds,timeouts:new ds,immediates:new ds,timer:function(){return jn.window.performance||jn.window.Date},transforms:[],frame:function(t){var e=ys.frames.push({run:t});return null===ys.nextDraw&&(ys.nextDraw=jn.window.requestAnimationFrame(ys._draw)),e},timeout:function(t,e){e=e||0;var n=ys.timer().now()+e,r=ys.timeouts.push({run:t,time:n});return null===ys.nextDraw&&(ys.nextDraw=jn.window.requestAnimationFrame(ys._draw)),r},immediate:function(t){var e=ys.immediates.push(t);return null===ys.nextDraw&&(ys.nextDraw=jn.window.requestAnimationFrame(ys._draw)),e},cancelFrame:function(t){null!=t&&ys.frames.remove(t)},clearTimeout:function(t){null!=t&&ys.timeouts.remove(t)},cancelImmediate:function(t){null!=t&&ys.immediates.remove(t)},_draw:function(t){for(var e=null,n=ys.timeouts.last();(e=ys.timeouts.shift())&&(t>=e.time?e.run():ys.timeouts.push(e),e!==n););for(var r=null,i=ys.frames.last();r!==i&&(r=ys.frames.shift());)r.run(t);for(var s=null;s=ys.immediates.shift();)s();ys.nextDraw=ys.timeouts.first()||ys.frames.first()?jn.window.requestAnimationFrame(ys._draw):null}},ps=function(t){var e=t.start,n=t.runner.duration();return{start:e,duration:n,end:e+n,runner:t.runner}},ms=function(){var t=jn.window;return(t.performance||t.Date).now()},gs=function(t){function n(){var t,e=0<arguments.length&&void 0!==arguments[0]?arguments[0]:ms;return Cn(this,n),(t=Ir(this,Lr(n).call(this)))._timeSource=e,t._startTime=0,t._speed=1,t._persist=0,t._nextFrame=null,t._paused=!0,t._runners=[],t._runnerIds=[],t._lastRunnerId=-1,t._time=0,t._lastSourceTime=0,t._lastStepTime=0,t._step=t._stepFn.bind(Pr(Pr(t)),!1),t._stepImmediate=t._stepFn.bind(Pr(Pr(t)),!0),t}return Dr(n,mi),_r(n,[{key:"schedule",value:function(t,e,n){if(null==t)return this._runners.map(ps);var r=0,i=this.getEndTime();if(e=e||0,null==n||"last"===n||"after"===n)r=i;else if("absolute"===n||"start"===n)r=e,e=0;else if("now"===n)r=this._time;else{if("relative"!==n)throw new Error('Invalid value for the "when" parameter');var s=this._runners[t.id];s&&(r=s.start+e,e=0)}t.unschedule(),t.timeline(this);var o=t.persist(),u={persist:null===o?this._persist:o,start:r+e,runner:t};return this._lastRunnerId=t.id,this._runners.push(u),this._runners.sort(function(t,e){return t.start-e.start}),this._runnerIds=this._runners.map(function(t){return t.runner.id}),this.updateTime()._continue(),this}},{key:"unschedule",value:function(t){var e=this._runnerIds.indexOf(t.id);return e<0||(this._runners.splice(e,1),this._runnerIds.splice(e,1),t.timeline(null)),this}},{key:"getEndTime",value:function(){var t=this._runners[this._runnerIds.indexOf(this._lastRunnerId)],e=t?t.runner.duration():0;return(t?t.start:0)+e}},{key:"getEndTimeOfTimeline",value:function(){for(var t=0,e=0;e<this._runners.length;e++){var n=this._runners[e],r=n?n.runner.duration():0,i=(n?n.start:0)+r;t<i&&(t=i)}return t}},{key:"updateTime",value:function(){return this.active()||(this._lastSourceTime=this._timeSource()),this}},{key:"play",value:function(){return this._paused=!1,this.updateTime()._continue()}},{key:"pause",value:function(){return this._paused=!0,this._continue()}},{key:"stop",value:function(){return this.time(0),this.pause()}},{key:"finish",value:function(){return this.time(this.getEndTimeOfTimeline()+1),this.pause()}},{key:"speed",value:function(t){return null==t?this._speed:(this._speed=t,this)}},{key:"reverse",value:function(t){var e=this.speed();if(null==t)return this.speed(-e);var n=Math.abs(e);return this.speed(t?n:-n)}},{key:"seek",value:function(t){return this.time(this._time+t)}},{key:"time",value:function(t){return null==t?this._time:(this._time=t,this._continue(!0))}},{key:"persist",value:function(t){return null==t?this._persist:(this._persist=t,this)}},{key:"source",value:function(t){return null==t?this._timeSource:(this._timeSource=t,this)}},{key:"_stepFn",value:function(){var t=0<arguments.length&&void 0!==arguments[0]&&arguments[0],e=this._timeSource(),n=e-this._lastSourceTime;t&&(n=0);var r=this._speed*n+(this._time-this._lastStepTime);this._lastSourceTime=e,t||(this._time+=r,this._time=this._time<0?0:this._time),this._lastStepTime=this._time,this.fire("time",this._time);for(var i=this._runners.length;i--;){var s=this._runners[i],o=s.runner;this._time-s.start<=0&&o.reset()}for(var u=!1,a=0,h=this._runners.length;a<h;a++){var l=this._runners[a],c=l.runner,f=r,v=this._time-l.start;if(v<=0)u=!0;else if(v<f&&(f=v),c.active())if(c.step(f).done){if(!0!==l.persist){c.duration()-c.time()+this._time+l.persist<this._time&&(c.unschedule(),--a,--h)}}else u=!0}return u&&!(this._speed<0&&0===this._time)||this._runnerIds.length&&this._speed<0&&0<this._time?this._continue():(this.pause(),this.fire("finished")),this}},{key:"_continue",value:function(){var t=0<arguments.length&&void 0!==arguments[0]&&arguments[0];return ys.cancelFrame(this._nextFrame),this._nextFrame=null,t?this._stepImmediate():(this._paused||(this._nextFrame=ys.frame(this._step)),this)}},{key:"active",value:function(){return!!this._nextFrame}}]),n}();an({Element:{timeline:function(t){return null==t?(this._timeline=this._timeline||new gs,this._timeline):(this._timeline=t,this)}}});var ws=function(t){function s(t){var e;return Cn(this,s),(e=Ir(this,Lr(s).call(this))).id=s.id++,t="function"==typeof(t=null==t?wi.duration:t)?new $i(t):t,e._element=null,e._timeline=null,e.done=!1,e._queue=[],e._duration="number"==typeof t&&t,e._isDeclarative=t instanceof $i,e._stepper=e._isDeclarative?t:new Qi,e._history={},e.enabled=!0,e._time=0,e._lastTime=0,e._reseted=!0,e.transforms=new ai,e.transformId=1,e._haveReversed=!1,e._reverse=!1,e._loopsDone=0,e._swing=!1,e._wait=0,e._times=1,e._frameId=null,e._persist=!!e._isDeclarative||null,e}return Dr(s,mi),_r(s,[{key:"element",value:function(t){return null==t?this._element:((this._element=t)._prepareRunner(),this)}},{key:"timeline",value:function(t){return void 0===t?this._timeline:(this._timeline=t,this)}},{key:"animate",value:function(t,e,n){var r=s.sanitise(t,e,n),i=new s(r.duration);return this._timeline&&i.timeline(this._timeline),this._element&&i.element(this._element),i.loop(r).schedule(e,n)}},{key:"schedule",value:function(t,e,n){if(t instanceof gs||(n=e,e=t,t=this.timeline()),!t)throw Error("Runner cannot be scheduled without timeline");return t.schedule(this,e,n),this}},{key:"unschedule",value:function(){var t=this.timeline();return t&&t.unschedule(this),this}},{key:"loop",value:function(t,e,n){return"object"===st(t)&&(e=t.swing,n=t.wait,t=t.times),this._times=t||1/0,this._swing=e||!1,this._wait=n||0,!0===this._times&&(this._times=1/0),this}},{key:"delay",value:function(t){return this.animate(0,t)}},{key:"queue",value:function(t,e,n,r){return this._queue.push({initialiser:t||gi,runner:e||gi,retarget:n,isTransform:r,initialised:!1,finished:!1}),this.timeline()&&this.timeline()._continue(),this}},{key:"during",value:function(t){return this.queue(null,t)}},{key:"after",value:function(t){return this.on("finished",t)}},{key:"time",value:function(t){if(null==t)return this._time;var e=t-this._time;return this.step(e),this}},{key:"duration",value:function(){return this._times*(this._wait+this._duration)-this._wait}},{key:"loops",value:function(t){var e=this._duration+this._wait;if(null==t){var n=Math.floor(this._time/e),r=(this._time-n*e)/this._duration;return Math.min(n+r,this._times)}var i=t%1,s=e*Math.floor(t)+this._duration*i;return this.time(s)}},{key:"persist",value:function(t){return null==t?this._persist:(this._persist=t,this)}},{key:"position",value:function(t){var e,n=this._time,i=this._duration,s=this._wait,r=this._times,o=this._swing,u=this._reverse;if(null==t){var a=function(t){var e=o*Math.floor(t%(2*(s+i))/(s+i)),n=e&&!u||!e&&u,r=Math.pow(-1,n)*(t%(s+i))/i+n;return Math.max(Math.min(r,1),0)},h=r*(s+i)-s;return e=n<=0?Math.round(a(1e-5)):n<h?a(n):Math.round(a(h-1e-5)),e}var l=Math.floor(this.loops()),c=o&&l%2==0;return e=l+(c&&!u||u&&c?t:1-t),this.loops(e)}},{key:"progress",value:function(t){return null==t?Math.min(1,this._time/this.duration()):this.time(t*this.duration())}},{key:"step",value:function(t){if(!this.enabled)return this;t=null==t?16:t,this._time+=t;var e=this.position(),n=this._lastPosition!==e&&0<=this._time;this._lastPosition=e;var r=this.duration(),i=this._lastTime<=0&&0<this._time,s=this._lastTime<r&&this._time>=r;this._lastTime=this._time,i&&this.fire("start",this);var o=this._isDeclarative;if(this.done=!o&&!s&&this._time>=r,this._reseted=!1,n||o){this._initialise(n),this.transforms=new ai;var u=this._run(o?t:e);this.fire("step",this)}return this.done=this.done||u&&o,s&&this.fire("finished",this),this}},{key:"reset",value:function(){return this._reseted||(this.time(0),this._reseted=!0),this}},{key:"finish",value:function(){return this.step(1/0)}},{key:"reverse",value:function(t){return this._reverse=null==t?!this._reverse:t,this}},{key:"ease",value:function(t){return this._stepper=new Qi(t),this}},{key:"active",value:function(t){return null==t?this.enabled:(this.enabled=t,this)}},{key:"_rememberMorpher",value:function(t,e){if(this._history[t]={morpher:e,caller:this._queue[this._queue.length-1]},this._isDeclarative){var n=this.timeline();n&&n.play()}}},{key:"_tryRetarget",value:function(t,e,n){if(this._history[t]){if(!this._history[t].caller.initialised){var r=this._queue.indexOf(this._history[t].caller);return this._queue.splice(r,1),!1}this._history[t].caller.retarget?this._history[t].caller.retarget(e,n):this._history[t].morpher.to(e),this._history[t].caller.finished=!1;var i=this.timeline();return i&&i.play(),!0}return!1}},{key:"_initialise",value:function(t){if(t||this._isDeclarative)for(var e=0,n=this._queue.length;e<n;++e){var r=this._queue[e],i=this._isDeclarative||!r.initialised&&t;t=!r.finished,i&&t&&(r.initialiser.call(this),r.initialised=!0)}}},{key:"_run",value:function(t){for(var e=!0,n=0,r=this._queue.length;n<r;++n){var i=this._queue[n],s=i.runner.call(this,t);i.finished=i.finished||!0===s,e=e&&i.finished}return e}},{key:"addTransform",value:function(t,e){return this.transforms.lmultiplyO(t),this}},{key:"clearTransform",value:function(){return this.transforms=new ai,this}},{key:"clearTransformsFromQueue",value:function(){this.done&&this._timeline&&this._timeline._runnerIds.includes(this.id)||(this._queue=this._queue.filter(function(t){return!t.isTransform}))}}],[{key:"sanitise",value:function(t,e,n){var r=1,i=!1,s=0;return e=e||wi.delay,n=n||"last","object"!==st(t=t||wi.duration)||t instanceof Wi||(e=t.delay||e,n=t.when||n,i=t.swing||i,r=t.times||r,s=t.wait||s,t=t.duration||wi.duration),{duration:t,delay:e,swing:i,times:r,wait:s,when:n}}}]),s}();ws.id=0;var _s=function(){function r(){var t=0<arguments.length&&void 0!==arguments[0]?arguments[0]:new ai,e=1<arguments.length&&void 0!==arguments[1]?arguments[1]:-1,n=!(2<arguments.length&&void 0!==arguments[2])||arguments[2];Cn(this,r),this.transforms=t,this.id=e,this.done=n}return _r(r,[{key:"clearTransformsFromQueue",value:function(){}}]),r}();Hn([ws,_s],{mergeWith:function(t){return new _s(t.transforms.lmultiply(this.transforms),t.id)}});var bs=function(t,e){return t.lmultiplyO(e)},ks=function(t){return t.transforms};var xs=function(){function t(){Cn(this,t),this.runners=[],this.ids=[]}return _r(t,[{key:"add",value:function(t){if(!this.runners.includes(t)){var e=t.id+1;return this.runners.push(t),this.ids.push(e),this}}},{key:"getByID",value:function(t){return this.runners[this.ids.indexOf(t+1)]}},{key:"remove",value:function(t){var e=this.ids.indexOf(t+1);return this.ids.splice(e,1),this.runners.splice(e,1),this}},{key:"merge",value:function(){var n=this,r=null;return this.runners.forEach(function(t,e){r&&t.done&&r.done&&(!t._timeline||!t._timeline._runnerIds.includes(t.id))&&(!r._timeline||!r._timeline._runnerIds.includes(r.id))&&(n.remove(t.id),n.edit(r.id,t.mergeWith(r))),r=t}),this}},{key:"edit",value:function(t,e){var n=this.ids.indexOf(t+1);return this.ids.splice(n,1,t+1),this.runners.splice(n,1,e),this}},{key:"length",value:function(){return this.ids.length}},{key:"clearBefore",value:function(t){var e=this.ids.indexOf(t+1)||1;return this.ids.splice(0,e,0),this.runners.splice(0,e,new _s).forEach(function(t){return t.clearTransformsFromQueue()}),this}}]),t}();an({Element:{animate:function(t,e,n){var r=ws.sanitise(t,e,n),i=this.timeline();return new ws(r.duration).loop(r).element(this).timeline(i.play()).schedule(e,n)},delay:function(t,e){return this.animate(0,t,e)},_clearTransformRunnersBefore:function(t){this._transformationRunners.clearBefore(t.id)},_currentTransform:function(e){return this._transformationRunners.runners.filter(function(t){return t.id<=e.id}).map(ks).reduce(bs,new ai)},_addRunner:function(t){this._transformationRunners.add(t),ys.cancelImmediate(this._frameId),this._frameId=ys.immediate(function(){var t=this._transformationRunners.runners.map(ks).reduce(bs,new ai);this.transform(t),this._transformationRunners.merge(),1===this._transformationRunners.length()&&(this._frameId=null)}.bind(this))},_prepareRunner:function(){null==this._frameId&&(this._transformationRunners=(new xs).add(new _s(new ai(this))))}}}),Hn(ws,{attr:function(t,e){return this.styleAttr("attr",t,e)},css:function(t,e){return this.styleAttr("css",t,e)},styleAttr:function(e,n,t){if("object"===st(n)){for(var r in n)this.styleAttr(e,r,n[r]);return this}var i=new os(this._stepper).to(t);return this.queue(function(){i=i.from(this.element()[e](n))},function(t){return this.element()[e](n,i.at(t)),i.done()}),this},zoom:function(t,n){if(this._tryRetarget("zoom",Ri,n))return this;var r=new os(this._stepper).to(new xi(t));return this.queue(function(){r=r.from(this.element().zoom())},function(t){return this.element().zoom(r.at(t),n),r.done()},function(t,e){n=e,r.to(t)}),this._rememberMorpher("zoom",r),this},transform:function(v,d,y){if(d=v.relative||d,this._isDeclarative&&!d&&this._tryRetarget("transform",v))return this;var p=ai.isMatrixLike(v);y=null!=v.affine?v.affine:null!=y?y:!p;var m,g,w,_,b,k=new os(this._stepper).type(y?as:ai);return this.queue(function(){g=g||this.element(),m=m||xn(v,g),b=new ai(d?void 0:g),g._addRunner(this),d||g._clearTransformRunnersBefore(this)},function(t){d||this.clearTransform();var e=new oi(m).transform(g._currentTransform(this)),n=e.x,r=e.y,i=new ai(Mi({},v,{origin:[n,r]})),s=this._isDeclarative&&w?w:b;if(y){i=i.decompose(n,r),s=s.decompose(n,r);var o=i.rotate,u=s.rotate,a=[o-360,o,o+360],h=a.map(function(t){return Math.abs(t-u)}),l=Math.min.apply(Math,oe(h)),c=h.indexOf(l);i.rotate=a[c]}d&&(p||(i.rotate=v.rotate||0),this._isDeclarative&&_&&(s.rotate=_)),k.from(s),k.to(i);var f=k.at(t);return _=f.rotate,w=new ai(f),this.addTransform(w),g._addRunner(this),k.done()},function(t){(t.origin||"center").toString()!==(v.origin||"center").toString()&&(m=xn(v,g)),v=Mi({},t,{origin:m})},!0),this._isDeclarative&&this._rememberMorpher("transform",k),this},x:function(t,e){return this._queueNumber("x",t)},y:function(t){return this._queueNumber("y",t)},dx:function(t){return this._queueNumberDelta("x",t)},dy:function(t){return this._queueNumberDelta("y",t)},_queueNumberDelta:function(e,t){if(t=new xi(t),this._tryRetarget(e,t))return this;var n=new os(this._stepper).to(t),r=null;return this.queue(function(){r=this.element()[e](),n.from(r),n.to(r+t)},function(t){return this.element()[e](n.at(t)),n.done()},function(t){n.to(r+new xi(t))}),this._rememberMorpher(e,n),this},_queueObject:function(e,t){if(this._tryRetarget(e,t))return this;var n=new os(this._stepper).to(t);return this.queue(function(){n.from(this.element()[e]())},function(t){return this.element()[e](n.at(t)),n.done()}),this._rememberMorpher(e,n),this},_queueNumber:function(t,e){return this._queueObject(t,new xi(e))},cx:function(t){return this._queueNumber("cx",t)},cy:function(t){return this._queueNumber("cy",t)},move:function(t,e){return this.x(t).y(e)},center:function(t,e){return this.cx(t).cy(e)},size:function(t,e){var n;return t&&e||(n=this._element.bbox()),t||(t=n.width/n.height*e),e||(e=n.height/n.width*t),this.width(t).height(e)},width:function(t){return this._queueNumber("width",t)},height:function(t){return this._queueNumber("height",t)},plot:function(t,e,n,r){if(4===arguments.length)return this.plot([t,e,n,r]);if(this._tryRetarget("plot",t))return this;var i=new os(this._stepper).type(this._element.MorphArray).to(t);return this.queue(function(){i.from(this._element.array())},function(t){return this._element.plot(i.at(t)),i.done()}),this._rememberMorpher("plot",i),this},leading:function(t){return this._queueNumber("leading",t)},viewbox:function(t,e,n,r){return this._queueObject("viewbox",new ci(t,e,n,r))},update:function(t){return"object"!==st(t)?this.update({offset:t,color:arguments[1],opacity:arguments[2]}):(null!=t.opacity&&this.attr("stop-opacity",t.opacity),null!=t.color&&this.attr("stop-color",t.color),null!=t.offset&&this.attr("offset",t.offset),this)}}),Hn(ws,{rx:Ai,ry:Ei,from:Fi,to:Ri}),qn(ws,"Runner");var Svg=function(t){function Svg(t){var e;return Cn(this,Svg),(e=Ir(this,Lr(Svg).call(this,Rn("svg",t),t))).namespace(),e}return Dr(Svg,Container),_r(Svg,[{key:"isRoot",value:function(){return!(this.node.parentNode&&this.node.parentNode instanceof jn.window.SVGElement&&"#document"!==this.node.parentNode.nodeName)}},{key:"root",value:function(){return this.isRoot()?this:Fr(Lr(Svg.prototype),"root",this).call(this)}},{key:"namespace",value:function(){return this.isRoot()?this.attr({xmlns:Sn,version:"1.1"}).attr("xmlns:xlink",An,Mn).attr("xmlns:svgjs",En,Mn):this.root().namespace()}},{key:"defs",value:function(){return this.isRoot()?Dn(this.node.querySelector("defs"))||this.put(new Defs):this.root().defs()}},{key:"parent",value:function(t){return this.isRoot()?"#document"===this.node.parentNode.nodeName?null:Dn(this.node.parentNode):Fr(Lr(Svg.prototype),"parent",this).call(this,t)}},{key:"clear",value:function(){for(;this.node.hasChildNodes();)this.node.removeChild(this.node.lastChild);return delete this._defs,this}}]),Svg}();an({Container:{nested:Bn(function(){return this.put(new Svg)})}}),qn(Svg,"Svg",!0);var Os=function(t){function e(t){return Cn(this,e),Ir(this,Lr(e).call(this,Rn("symbol",t),t))}return Dr(e,Container),e}();an({Container:{symbol:Bn(function(){return this.put(new Os)})}}),qn(Os,"Symbol");var Ss={plain:function(t){return!1===this._build&&this.clear(),this.node.appendChild(jn.document.createTextNode(t)),this},length:function(){return this.node.getComputedTextLength()}},Text=function(t){function Text(t){var e;return Cn(this,Text),(e=Ir(this,Lr(Text).call(this,Rn("text",t),t))).dom.leading=new xi(1.3),e._rebuild=!0,e._build=!1,e}return Dr(Text,Shape),_r(Text,[{key:"x",value:function(t){var e=1<arguments.length&&void 0!==arguments[1]?arguments[1]:this.bbox();return null==t?e.x:this.attr("x",this.attr("x")+t-e.x)}},{key:"y",value:function(t){var e=1<arguments.length&&void 0!==arguments[1]?arguments[1]:this.bbox();return null==t?e.y:this.attr("y",this.attr("y")+t-e.y)}},{key:"move",value:function(t,e){var n=2<arguments.length&&void 0!==arguments[2]?arguments[2]:this.bbox();return this.x(t,n).y(e,n)}},{key:"cx",value:function(t){var e=1<arguments.length&&void 0!==arguments[1]?arguments[1]:this.bbox();return null==t?e.cx:this.attr("x",this.attr("x")+t-e.cx)}},{key:"cy",value:function(t){var e=1<arguments.length&&void 0!==arguments[1]?arguments[1]:this.bbox();return null==t?e.cy:this.attr("y",this.attr("y")+t-e.cy)}},{key:"center",value:function(t,e){var n=2<arguments.length&&void 0!==arguments[2]?arguments[2]:this.bbox();return this.cx(t,n).cy(e,n)}},{key:"text",value:function(t){if(void 0===t){var e=this.node.childNodes,n=0;t="";for(var r=0,i=e.length;r<i;++r)"textPath"!==e[r].nodeName?(r!==n&&3!==e[r].nodeType&&!0===Dn(e[r]).dom.newLined&&(t+="\n"),t+=e[r].textContent):0===r&&(n=1);return t}if(this.clear().build(!0),"function"==typeof t)t.call(this,this);else for(var s=0,o=(t=t.split("\n")).length;s<o;s++)this.tspan(t[s]).newLine();return this.build(!1).rebuild()}},{key:"leading",value:function(t){return null==t?this.dom.leading:(this.dom.leading=new xi(t),this.rebuild())}},{key:"rebuild",value:function(t){if("boolean"==typeof t&&(this._rebuild=t),this._rebuild){var n=this,r=0,i=this.dom.leading;this.each(function(){var t=jn.window.getComputedStyle(this.node).getPropertyValue("font-size"),e=i*new xi(t);this.dom.newLined&&(this.attr("x",n.attr("x")),"\n"===this.text()?r+=e:(this.attr("dy",e+r),r=0))}),this.fire("rebuild")}return this}},{key:"build",value:function(t){return this._build=!!t,this}},{key:"setData",value:function(t){return this.dom=t,this.dom.leading=new xi(t.leading||1.3),this}}]),Text}();Hn(Text,Ss),an({Container:{text:Bn(function(t){return this.put(new Text).text(t)}),plain:Bn(function(t){return this.put(new Text).plain(t)})}}),qn(Text,"Text");var Tspan=function(t){function Tspan(t){return Cn(this,Tspan),Ir(this,Lr(Tspan).call(this,Rn("tspan",t),t))}return Dr(Tspan,Text),_r(Tspan,[{key:"text",value:function(t){return null==t?this.node.textContent+(this.dom.newLined?"\n":""):("function"==typeof t?t.call(this,this):this.plain(t),this)}},{key:"dx",value:function(t){return this.attr("dx",t)}},{key:"dy",value:function(t){return this.attr("dy",t)}},{key:"x",value:function(t){return this.attr("x",t)}},{key:"y",value:function(t){return this.attr("x",t)}},{key:"move",value:function(t,e){return this.x(t).y(e)}},{key:"newLine",value:function(){var t=this.parent(Text);this.dom.newLined=!0;var e=jn.window.getComputedStyle(this.node).getPropertyValue("font-size"),n=t.dom.leading*new xi(e);return this.dy(n).attr("x",t.x())}}]),Tspan}();Hn(Tspan,Ss),an({Tspan:{tspan:Bn(function(t){var e=new Tspan;return this._build||this.clear(),this.node.appendChild(e.node),e.text(t)})}}),qn(Tspan,"Tspan");var ClipPath=function(t){function ClipPath(t){return Cn(this,ClipPath),Ir(this,Lr(ClipPath).call(this,Rn("clipPath",t),t))}return Dr(ClipPath,Container),_r(ClipPath,[{key:"remove",value:function(){return this.targets().forEach(function(t){t.unclip()}),Fr(Lr(ClipPath.prototype),"remove",this).call(this)}},{key:"targets",value:function(){return pi('svg [clip-path*="'+this.id()+'"]')}}]),ClipPath}();an({Container:{clip:Bn(function(){return this.defs().put(new ClipPath)})},Element:{clipWith:function(t){var e=t instanceof ClipPath?t:this.parent().clip().add(t);return this.attr("clip-path",'url("#'+e.id()+'")')},unclip:function(){return this.attr("clip-path",null)},clipper:function(){return this.reference("clip-path")}}}),qn(ClipPath,"ClipPath");var Ms=function(t){function e(t){return Cn(this,e),Ir(this,Lr(e).call(this,Rn("foreignObject",t),t))}return Dr(e,Element),e}();an({Container:{foreignObject:Bn(function(t,e){return this.put(new Ms).size(t,e)})}}),qn(Ms,"ForeignObject");var G=function(t){function G(t){return Cn(this,G),Ir(this,Lr(G).call(this,Rn("g",t),t))}return Dr(G,Container),_r(G,[{key:"x",value:function(t){var e=1<arguments.length&&void 0!==arguments[1]?arguments[1]:this.bbox();return null==t?e.x:this.move(t,e.y,e)}},{key:"y",value:function(t){var e=1<arguments.length&&void 0!==arguments[1]?arguments[1]:this.bbox();return null==t?e.y:this.move(e.x,t,e)}},{key:"move",value:function(){var t=0<arguments.length&&void 0!==arguments[0]?arguments[0]:0,e=1<arguments.length&&void 0!==arguments[1]?arguments[1]:0,n=2<arguments.length&&void 0!==arguments[2]?arguments[2]:this.bbox(),r=t-n.x,i=e-n.y;return this.dmove(r,i)}},{key:"dx",value:function(t){return this.dmove(t,0)}},{key:"dy",value:function(t){return this.dmove(0,t)}},{key:"dmove",value:function(o,u){return this.children().forEach(function(t,e){var n=t.bbox(),r=new ai(t),i=r.translate(o,u).transform(r.inverse()),s=new oi(n.x,n.y).transform(i);t.move(s.x,s.y)}),this}},{key:"width",value:function(t){var e=1<arguments.length&&void 0!==arguments[1]?arguments[1]:this.bbox();return null==t?e.width:this.size(t,e.height,e)}},{key:"height",value:function(t){var e=1<arguments.length&&void 0!==arguments[1]?arguments[1]:this.bbox();return null==t?e.height:this.size(e.width,t,e)}},{key:"size",value:function(t,e){var r=2<arguments.length&&void 0!==arguments[2]?arguments[2]:this.bbox(),n=kn(this,t,e,r),i=n.width/r.width,s=n.height/r.height;return this.children().forEach(function(t,e){var n=new oi(r).transform(new ai(t).inverse());t.scale(i,s,n.x,n.y)}),this}}]),G}();an({Container:{group:Bn(function(){return this.put(new G)})}}),qn(G,"G");var A=function(t){function A(t){return Cn(this,A),Ir(this,Lr(A).call(this,Rn("a",t),t))}return Dr(A,Container),_r(A,[{key:"to",value:function(t){return this.attr("href",t,An)}},{key:"target",value:function(t){return this.attr("target",t)}}]),A}();an({Container:{link:Bn(function(t){return this.put(new A).to(t)})},Element:{linkTo:function(t){var e=new A;return"function"==typeof t?t.call(e,e):e.to(t),this.parent().put(e).put(this)}}}),qn(A,"A");var Mask=function(t){function Mask(t){return Cn(this,Mask),Ir(this,Lr(Mask).call(this,Rn("mask",t),t))}return Dr(Mask,Container),_r(Mask,[{key:"remove",value:function(){return this.targets().forEach(function(t){t.unmask()}),Fr(Lr(Mask.prototype),"remove",this).call(this)}},{key:"targets",value:function(){return pi('svg [mask*="'+this.id()+'"]')}}]),Mask}();an({Container:{mask:Bn(function(){return this.defs().put(new Mask)})},Element:{maskWith:function(t){var e=t instanceof Mask?t:this.parent().mask().add(t);return this.attr("mask",'url("#'+e.id()+'")')},unmask:function(){return this.attr("mask",null)},masker:function(){return this.reference("mask")}}}),qn(Mask,"Mask");var Style=function(t){function Style(t){return Cn(this,Style),Ir(this,Lr(Style).call(this,Rn("style",t),t))}return Dr(Style,Element),_r(Style,[{key:"addText",value:function(){var t=0<arguments.length&&void 0!==arguments[0]?arguments[0]:"";return this.node.textContent+=t,this}},{key:"font",value:function(t,e){var n=2<arguments.length&&void 0!==arguments[2]?arguments[2]:{};return this.rule("@font-face",Mi({fontFamily:t,src:e},n))}},{key:"rule",value:function(t,e){return this.addText(function(t,e){if(!t)return"";if(!e)return t;var n=t+"{";for(var r in e)n+=_n(r)+":"+e[r]+";";return n+="}"}(t,e))}}]),Style}();an("Dom",{style:Bn(function(t,e){return this.put(new Style).rule(t,e)}),fontface:Bn(function(t,e,n){return this.put(new Style).font(t,e,n)})}),qn(Style,"Style");var TextPath=function(t){function TextPath(t){return Cn(this,TextPath),Ir(this,Lr(TextPath).call(this,Rn("textPath",t),t))}return Dr(TextPath,Text),_r(TextPath,[{key:"array",value:function(){var t=this.track();return t?t.array():null}},{key:"plot",value:function(t){var e=this.track(),n=null;return e&&(n=e.plot(t)),null==t?n:this}},{key:"track",value:function(){return this.reference("href")}}]),TextPath}();an({Container:{textPath:Bn(function(t,e){return t instanceof Text||(t=this.text(t)),t.path(e)})},Text:{path:Bn(function(t){var e,n=!(1<arguments.length&&void 0!==arguments[1])||arguments[1],r=new TextPath;if(t instanceof Path||(t=this.defs().path(t)),r.attr("href","#"+t,An),n)for(;e=this.node.firstChild;)r.node.appendChild(e);return this.put(r)}),textPath:function(){return this.findOne("textPath")}},Path:{text:Bn(function(t){return t instanceof Text||(t=(new Text).addTo(this.parent()).text(t)),t.path(this)}),targets:function(){return pi('svg [href*="'+this.id()+'"]')}}}),TextPath.prototype.MorphArray=ts,qn(TextPath,"TextPath");var Use=function(t){function Use(t){return Cn(this,Use),Ir(this,Lr(Use).call(this,Rn("use",t),t))}return Dr(Use,Shape),_r(Use,[{key:"element",value:function(t,e){return this.attr("href",(e||"")+"#"+t,An)}}]),Use}();an({Container:{use:Bn(function(t,e){return this.put(new Use).element(t,e)})}}),qn(Use,"Use");var As=Fn;Hn([Svg,Os,Image,Pattern,Marker],hn("viewbox")),Hn([Line,Polyline,Polygon,Path],hn("marker")),Hn(Text,hn("Text")),Hn(Path,hn("Path")),Hn(Defs,hn("Defs")),Hn([Text,Tspan],hn("Tspan")),Hn([Rect,Ellipse,Circle,Gradient],hn("radius")),Hn(mi,hn("EventTarget")),Hn(Dom,hn("Dom")),Hn(Element,hn("Element")),Hn(Shape,hn("Shape")),Hn(Container,hn("Container")),Hn(ws,hn("Runner")),di.extend(oe(new Set(un))),cs([xi,Nr,ci,ai,ki,qi,ts]),fs();var Es={Morphable:os,registerMorphableType:cs,makeMorphable:fs,TransformBag:as,ObjectBag:hs,NonMorphable:us,defaults:bi,utils:On,namespaces:Tn,regex:lr,SVG:As,parser:hi,find:pi,registerWindow:function(){var t=0<arguments.length&&void 0!==arguments[0]?arguments[0]:null,e=1<arguments.length&&void 0!==arguments[1]?arguments[1]:null;jn.window=t,jn.document=e},Animator:ys,Controller:$i,Ease:Qi,PID:Ki,Spring:Zi,easing:Ui,Queue:ds,Runner:ws,Timeline:gs,Array:ki,Box:ci,Color:Nr,EventTarget:mi,Matrix:ai,Number:xi,PathArray:ts,Point:oi,PointArray:qi,List:di,Circle:Circle,ClipPath:ClipPath,Container:Container,Defs:Defs,Dom:Dom,Element:Element,Ellipse:Ellipse,ForeignObject:Ms,Gradient:Gradient,G:G,A:A,Image:Image,Line:Line,Marker:Marker,Mask:Mask,Path:Path,Pattern:Pattern,Polygon:Polygon,Polyline:Polyline,Rect:Rect,Shape:Shape,Stop:Stop,Style:Style,Svg:Svg,Symbol:Os,Text:Text,TextPath:TextPath,Tspan:Tspan,Use:Use,on:yr,off:pr,dispatch:mr,root:In,create:Ln,makeInstance:Fn,nodeOrNew:Rn,adopt:Dn,mockAdopt:function(){var t=0<arguments.length&&void 0!==arguments[0]?arguments[0]:Dn;zn=t},register:qn,getClass:Yn,eid:Gn,assignNewId:Vn,extend:Hn,wrapWithAttrCheck:Bn,invent:function(e){var t="function"==typeof e.create?e.create:function(t){this.constructor(t||Ln(e.create))};return e.inherit&&(t.prototype=new e.inherit,t.prototype.constructor=t),e.extend&&Hn(t,e.extend),e.construct&&Hn(e.parent||Pn.Container,e.construct),t}};function Ts(t){return Fn(t)}return Object.assign(Ts,Es),Ts}();
//# sourceMappingURL=svg.min.js.map