diff options
Diffstat (limited to 'dist/svg.min.js')
-rw-r--r-- | dist/svg.min.js | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/dist/svg.min.js b/dist/svg.min.js new file mode 100644 index 0000000..8e94ddb --- /dev/null +++ b/dist/svg.min.js @@ -0,0 +1,3 @@ +/*! @svgdotjs/svg.js v3.0.0 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=(y.version,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}},u=!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=!u&&!w(function(){return 7!=Object.defineProperty(r("div"),"a",{get:function(){return 7}}).a}),s=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")},o=Object.defineProperty,a={f:u?Object.defineProperty:function(t,e,n){if(p(t),e=s(e,!0),p(n),i)try{return o(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=u?function(t,e,n){return a.f(t,e,k(1,n))}:function(t,e,n){return t[e]=n,t},h={}.hasOwnProperty,l=function(t,e){return h.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],u=(""+n).split(e);y.inspectSource=function(t){return n.call(t)},(t.exports=function(t,e,n,r){var i="function"==typeof n;i&&(l(n,"name")||x(n,"name",e)),t[e]!==n&&(i&&(l(n,s)||x(n,s,t[e]?""+t[e]:u.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},b=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)}},_="prototype",S=function(t,e,n){var r,i,s,u,o=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]||{})[_],v=a?y:y[e]||(y[e]={}),d=v[_]||(v[_]={});for(r in a&&(n=e),n)s=((i=!o&&f&&void 0!==f[r])?f:n)[r],u=c&&i?b(s,m):l&&"function"==typeof s?b(Function.call,s):s,f&&O(f,r,s,t&S.U),v[r]!=s&&x(v,r,u),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 j=S,M={}.toString,E=function(t){return M.call(t).slice(8,-1)},T=Object("z").propertyIsEnumerable(0)?Object:function(t){return"String"==E(t)?t.split(""):Object(t)},C=function(t){if(null==t)throw TypeError("Can't call method on "+t);return t},P=function(t){return T(C(t))},N=Math.ceil,L=Math.floor,D=function(t){return isNaN(t=+t)?0:(0<t?L:N)(t)},F=Math.min,R=function(t){return 0<t?F(D(t),9007199254740991):0},z=Math.max,I=Math.min,q=function(h){return function(t,e,n){var r,i,s,u=P(t),o=R(u.length),a=(i=o,(r=D(r=n))<0?z(r+i,0):I(r,i));if(h&&e!=e){for(;a<o;)if((s=u[a++])!=s)return!0}else for(;a<o;a++)if((h||a in u)&&u[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"),H=function(t){return X[t]||(X[t]=v(t))},B=q(!1),V=H("IE_PROTO"),W=function(t,e){var n,r=P(t),i=0,s=[];for(n in r)n!=V&&l(r,n)&&s.push(n);for(;e.length>i;)l(r,n=e[i++])&&(~B(s,n)||s.push(n));return s},Q="constructor,hasOwnProperty,isPrototypeOf,propertyIsEnumerable,toLocaleString,toString,valueOf".split(","),U=Object.keys||function(t){return W(t,Q)},J={f:Object.getOwnPropertySymbols},$={f:{}.propertyIsEnumerable},K=function(t){return Object(C(t))},Z=Object.assign,tt=!Z||w(function(){var A={},e={},t=Symbol(),n="abcdefghijklmnopqrst";return A[t]=7,n.split("").forEach(function(t){e[t]=t}),7!=Z({},A)[t]||Object.keys(Z({},e)).join("")!=n})?function(t,e){for(var n=K(t),r=arguments.length,i=1,s=J.f,u=$.f;i<r;)for(var o,a=T(arguments[i++]),h=s?U(a).concat(s(a)):U(a),l=h.length,c=0;c<l;)u.call(a,o=h[c++])&&(n[o]=a[o]);return n}:Z;j(j.S+j.F,"Object",{assign:tt});var et=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}),nt=et("unscopables"),rt=Array.prototype;null==rt[nt]&&x(rt,nt,{});var it=function(t){rt[nt][t]=!0},st=function(t,e){return{value:e,done:!!t}},ut={},ot=u?Object.defineProperties:function(t,e){p(t);for(var n,r=U(e),i=r.length,s=0;s<i;)a.f(t,n=r[s++],e[n]);return t},at=m.document,ht=at&&at.documentElement,lt=H("IE_PROTO"),ct=function(){},ft="prototype",vt=function(){var t,e=r("iframe"),n=Q.length;for(e.style.display="none",ht.appendChild(e),e.src="javascript:",(t=e.contentWindow.document).open(),t.write("<script>document.F=Object<\/script>"),t.close(),vt=t.F;n--;)delete vt[ft][Q[n]];return vt()},dt=Object.create||function(t,e){var n;return null!==t?(ct[ft]=p(t),n=new ct,ct[ft]=null,n[lt]=t):n=vt(),void 0===e?n:ot(n,e)},yt=a.f,pt=et("toStringTag"),mt=function(t,e,n){t&&!l(t=n?t:t.prototype,pt)&&yt(t,pt,{configurable:!0,value:e})},gt={};x(gt,et("iterator"),function(){return this});var wt=H("IE_PROTO"),bt=Object.prototype,_t=Object.getPrototypeOf||function(t){return t=K(t),l(t,wt)?t[wt]:"function"==typeof t.constructor&&t instanceof t.constructor?t.constructor.prototype:t instanceof Object?bt:null},kt=et("iterator"),xt=!([].keys&&"next"in[].keys()),Ot="values",St=function(){return this},At=function(t,e,n,r,i,s,u){var o,a,h;a=e,h=r,(o=n).prototype=dt(gt,{next:k(1,h)}),mt(o,a+" Iterator");var l,c,f,v=function(t){if(!xt&&t in m)return m[t];switch(t){case"keys":case Ot:return function(){return new n(this,t)}}return function(){return new n(this,t)}},d=e+" Iterator",y=i==Ot,p=!1,m=t.prototype,g=m[kt]||m["@@iterator"]||i&&m[i],w=g||v(i),b=i?y?v("entries"):w:void 0,_="Array"==e&&m.entries||g;if(_&&(f=_t(_.call(new t)))!==Object.prototype&&f.next&&(mt(f,d,!0),"function"!=typeof f[kt]&&x(f,kt,St)),y&&g&&g.name!==Ot&&(p=!0,w=function(){return g.call(this)}),(xt||p||!m[kt])&&x(m,kt,w),ut[e]=w,ut[d]=St,i)if(l={values:y?w:v(Ot),keys:s?w:v("keys"),entries:b},u)for(c in l)c in m||O(m,c,l[c]);else j(j.P+j.F*(xt||p),e,l);return l},jt=At(Array,"Array",function(t,e){this._t=P(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,st(1)):st(0,"keys"==e?n:"values"==e?t[n]:[n,t[n]])},"values");ut.Arguments=ut.Array,it("keys"),it("values"),it("entries");for(var Mt=et("iterator"),Et=et("toStringTag"),Tt=ut.Array,Ct={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},Pt=U(Ct),Nt=0;Nt<Pt.length;Nt++){var Lt,Dt=Pt[Nt],Ft=Ct[Dt],Rt=m[Dt],zt=Rt&&Rt.prototype;if(zt&&(zt[Mt]||x(zt,Mt,Tt),zt[Et]||x(zt,Et,Dt),ut[Dt]=Tt,Ft))for(Lt in jt)zt[Lt]||O(zt,Lt,jt[Lt],!0)}var It,qt,Yt,Xt;It="keys",qt=function(){return function(t){return U(K(t))}},Yt=(y.Object||{})[It]||Object[It],(Xt={})[It]=qt(Yt),j(j.S+j.F*w(function(){Yt(1)}),"Object",Xt);var Ht=a.f,Gt=Function.prototype,Bt=/^\s*function ([^ (]*)/;function Vt(t){return(Vt="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 Wt(t){return(Wt="function"==typeof Symbol&&"symbol"===Vt(Symbol.iterator)?function(t){return Vt(t)}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":Vt(t)})(t)}"name"in Gt||u&&Ht(Gt,"name",{configurable:!0,get:function(){try{return(""+this).match(Bt)[1]}catch(t){return""}}});var Qt,Ut=(Qt=!0,function(t,e){var n,r,i=String(C(t)),s=D(e),u=i.length;return s<0||u<=s?Qt?"":void 0:(n=i.charCodeAt(s))<55296||56319<n||s+1===u||(r=i.charCodeAt(s+1))<56320||57343<r?Qt?i.charAt(s):n:Qt?i.slice(s,s+2):r-56320+(n-55296<<10)+65536});At(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=Ut(e,n),this._i+=t.length,{value:t,done:!1})});var Jt=function(t,e,n){for(var r in e)O(t,r,e[r],n);return t},$t=function(t,e,n,r){if(!(t instanceof e)||void 0!==r&&r in t)throw TypeError(n+": incorrect invocation!");return t},Kt=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}},Zt=et("iterator"),te=Array.prototype,ee=et("toStringTag"),ne="Arguments"==E(function(){return arguments}()),re=et("iterator"),ie=y.getIteratorMethod=function(t){if(null!=t)return t[re]||t["@@iterator"]||ut[(e=t,void 0===e?"Undefined":null===e?"Null":"string"==typeof(r=function(t,e){try{return t[e]}catch(t){}}(n=Object(e),ee))?r:ne?E(n):"Object"==(i=E(n))&&"function"==typeof n.callee?"Arguments":i)];var e,n,r,i},se=t(function(t){var v={},d={},e=t.exports=function(t,e,n,r,i){var s,u,o,a,h,l=i?function(){return t}:ie(t),c=b(n,r,e?2:1),f=0;if("function"!=typeof l)throw TypeError(t+" is not iterable!");if(void 0===(h=l)||ut.Array!==h&&te[Zt]!==h){for(o=l.call(t);!(u=o.next()).done;)if((a=Kt(o,c,u.value,e))===v||a===d)return a}else for(s=R(t.length);f<s;f++)if((a=e?c(p(u=t[f])[0],u[1]):c(t[f]))===v||a===d)return a};e.BREAK=v,e.RETURN=d}),ue=et("species"),oe=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({}))}),u=function(t){e(t,n,{value:{i:"O"+ ++r,w:{}}})},o=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(!l(t,n)){if(!i(t))return"F";if(!e)return"E";u(t)}return t[n].i},getWeak:function(t,e){if(!l(t,n)){if(!i(t))return!0;if(!e)return!1;u(t)}return t[n].w},onFreeze:function(t){return s&&o.NEED&&i(t)&&!l(t,n)&&u(t),t}}}),ae=(oe.KEY,oe.NEED,oe.fastKey,oe.getWeak,oe.onFreeze,function(t,e){if(!g(t)||t._t!==e)throw TypeError("Incompatible receiver, "+e+" required!");return t}),he=a.f,le=oe.fastKey,ce=u?"_s":"size",fe=function(t,e){var n,r=le(e);if("F"!==r)return t._i[r];for(n=t._f;n;n=n.n)if(n.k==e)return n},ve={getConstructor:function(t,s,n,r){var i=t(function(t,e){$t(t,i,s,"_i"),t._t=s,t._i=dt(null),t._f=void 0,t._l=void 0,t[ce]=0,null!=e&&se(e,n,t[r],t)});return Jt(i.prototype,{clear:function(){for(var t=ae(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[ce]=0},delete:function(t){var e=ae(this,s),n=fe(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[ce]--}return!!n},forEach:function(t){ae(this,s);for(var e,n=b(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!!fe(ae(this,s),t)}}),u&&he(i.prototype,"size",{get:function(){return ae(this,s)[ce]}}),i},def:function(t,e,n){var r,i,s=fe(t,e);return s?s.v=n:(t._l=s={i:i=le(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[ce]++,"F"!==i&&(t._i[i]=s)),t},getEntry:fe,setStrong:function(t,n,e){var r;At(t,n,function(t,e){this._t=ae(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)?st(0,"keys"==e?n.k:"values"==e?n.v:[n.k,n.v]):(t._t=void 0,st(1))},e?"entries":"values",!e,!0),r=m[n],u&&r&&!r[ue]&&a.f(r,ue,{configurable:!0,get:function(){return this}})}},de=et("iterator"),ye=!1;try{[7][de]().return=function(){ye=!0}}catch(t){}var pe=Object.getOwnPropertyDescriptor,me={f:u?pe:function(t,e){if(t=P(t),e=s(e,!0),i)try{return pe(t,e)}catch(t){}if(l(t,e))return k(!$.f.call(t,e),t[e])}},ge=function(t,e){if(p(t),!g(e)&&null!==e)throw TypeError(e+": can't set as prototype!")},we={set:Object.setPrototypeOf||("__proto__"in{}?function(t,n,r){try{(r=b(Function.call,me.f(Object.prototype,"__proto__").set,2))(t,[]),n=!(t instanceof Array)}catch(t){n=!0}return function(t,e){return ge(t,e),n?t.__proto__=e:r(t,e),t}}({},!1):void 0),check:ge}.set;!function(o,t,e,n,a,r){var h=m[o],l=h,c=a?"set":"add",i=l&&l.prototype,s={},u=function(t){var n=i[t];O(i,t,"delete"==t?function(t){return!(r&&!g(t))&&n.call(this,0===t?0:t)}:"has"==t?function(t){return!(r&&!g(t))&&n.call(this,0===t?0:t)}:"get"==t?function(t){return r&&!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 l&&(r||i.forEach&&!w(function(){(new l).entries().next()}))){var f=new l,v=f[c](r?{}:-0,1)!=f,d=w(function(){f.has(1)}),y=function(t,e){if(!e&&!ye)return!1;var n=!1;try{var r=[7],i=r[de]();i.next=function(){return{done:n=!0}},r[de]=function(){return i},t(r)}catch(t){}return n}(function(t){new l(t)}),p=!r&&w(function(){for(var t=new l,e=5;e--;)t[c](e,e);return!t.has(-0)});y||(((l=t(function(t,e){$t(t,l,o);var n,r,i,s,u=(n=new h,r=l,(s=t.constructor)!==r&&"function"==typeof s&&(i=s.prototype)!==r.prototype&&g(i)&&we&&we(n,i),n);return null!=e&&se(e,a,u[c],u),u})).prototype=i).constructor=l),(d||p)&&(u("delete"),u("has"),a&&u("get")),(p||v)&&u(c),r&&i.clear&&delete i.clear}else l=n.getConstructor(t,o,a,c),Jt(l.prototype,e),oe.NEED=!0;mt(l,o),s[o]=l,j(j.G+j.W+j.F*(l!=h),s),r||n.setStrong(l,o,a)}("Set",function(t){return function(){return t(this,0<arguments.length?arguments[0]:void 0)}},{add:function(t){return ve.def(ae(this,"Set"),t=0===t?0:t,t)}},ve);function be(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 _e={f:et},ke=a.f,xe=function(t){var e=y.Symbol||(y.Symbol=m.Symbol||{});"_"==t.charAt(0)||t in e||ke(e,t,{value:_e.f(t)})};xe("asyncIterator");var Oe=Array.isArray||function(t){return"Array"==E(t)},Se=Q.concat("length","prototype"),Ae={f:Object.getOwnPropertyNames||function(t){return W(t,Se)}},je=Ae.f,Me={}.toString,Ee="object"==typeof window&&window&&Object.getOwnPropertyNames?Object.getOwnPropertyNames(window):[],Te={f:function(t){return Ee&&"[object Window]"==Me.call(t)?function(t){try{return je(t)}catch(t){return Ee.slice()}}(t):je(P(t))}},Ce=oe.KEY,Pe=me.f,Ne=a.f,Le=Te.f,De=m.Symbol,Fe=m.JSON,Re=Fe&&Fe.stringify,ze="prototype",Ie=et("_hidden"),qe=et("toPrimitive"),Ye={}.propertyIsEnumerable,Xe=Y("symbol-registry"),He=Y("symbols"),Ge=Y("op-symbols"),Be=Object[ze],Ve="function"==typeof De,We=m.QObject,Qe=!We||!We[ze]||!We[ze].findChild,Ue=u&&w(function(){return 7!=dt(Ne({},"a",{get:function(){return Ne(this,"a",{value:7}).a}})).a})?function(t,e,n){var r=Pe(Be,e);r&&delete Be[e],Ne(t,e,n),r&&t!==Be&&Ne(Be,e,r)}:Ne,Je=function(t){var e=He[t]=dt(De[ze]);return e._k=t,e},$e=Ve&&"symbol"==typeof De.iterator?function(t){return"symbol"==typeof t}:function(t){return t instanceof De},Ke=function(t,e,n){return t===Be&&Ke(Ge,e,n),p(t),e=s(e,!0),p(n),l(He,e)?(n.enumerable?(l(t,Ie)&&t[Ie][e]&&(t[Ie][e]=!1),n=dt(n,{enumerable:k(0,!1)})):(l(t,Ie)||Ne(t,Ie,k(1,{})),t[Ie][e]=!0),Ue(t,e,n)):Ne(t,e,n)},Ze=function(t,e){p(t);for(var n,r=function(t){var e=U(t),n=J.f;if(n)for(var r,i=n(t),s=$.f,u=0;i.length>u;)s.call(t,r=i[u++])&&e.push(r);return e}(e=P(e)),i=0,s=r.length;i<s;)Ke(t,n=r[i++],e[n]);return t},tn=function(t){var e=Ye.call(this,t=s(t,!0));return!(this===Be&&l(He,t)&&!l(Ge,t))&&(!(e||!l(this,t)||!l(He,t)||l(this,Ie)&&this[Ie][t])||e)},en=function(t,e){if(t=P(t),e=s(e,!0),t!==Be||!l(He,e)||l(Ge,e)){var n=Pe(t,e);return!n||!l(He,e)||l(t,Ie)&&t[Ie][e]||(n.enumerable=!0),n}},nn=function(t){for(var e,n=Le(P(t)),r=[],i=0;n.length>i;)l(He,e=n[i++])||e==Ie||e==Ce||r.push(e);return r},rn=function(t){for(var e,n=t===Be,r=Le(n?Ge:P(t)),i=[],s=0;r.length>s;)!l(He,e=r[s++])||n&&!l(Be,e)||i.push(He[e]);return i};Ve||(O((De=function(){if(this instanceof De)throw TypeError("Symbol is not a constructor!");var e=v(0<arguments.length?arguments[0]:void 0),n=function(t){this===Be&&n.call(Ge,t),l(this,Ie)&&l(this[Ie],e)&&(this[Ie][e]=!1),Ue(this,e,k(1,t))};return u&&Qe&&Ue(Be,e,{configurable:!0,set:n}),Je(e)})[ze],"toString",function(){return this._k}),me.f=en,a.f=Ke,Ae.f=Te.f=nn,$.f=tn,J.f=rn,u&&O(Be,"propertyIsEnumerable",tn,!0),_e.f=function(t){return Je(et(t))}),j(j.G+j.W+j.F*!Ve,{Symbol:De});for(var sn="hasInstance,isConcatSpreadable,iterator,match,replace,search,species,split,toPrimitive,toStringTag,unscopables".split(","),un=0;sn.length>un;)et(sn[un++]);for(var on=U(et.store),an=0;on.length>an;)xe(on[an++]);j(j.S+j.F*!Ve,"Symbol",{for:function(t){return l(Xe,t+="")?Xe[t]:Xe[t]=De(t)},keyFor:function(t){if(!$e(t))throw TypeError(t+" is not a symbol!");for(var e in Xe)if(Xe[e]===t)return e},useSetter:function(){Qe=!0},useSimple:function(){Qe=!1}}),j(j.S+j.F*!Ve,"Object",{create:function(t,e){return void 0===e?dt(t):Ze(dt(t),e)},defineProperty:Ke,defineProperties:Ze,getOwnPropertyDescriptor:en,getOwnPropertyNames:nn,getOwnPropertySymbols:rn}),Fe&&j(j.S+j.F*(!Ve||w(function(){var t=De();return"[null]"!=Re([t])||"{}"!=Re({a:t})||"{}"!=Re(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)&&!$e(t))return Oe(e)||(e=function(t,e){if("function"==typeof n&&(e=n.call(this,t,e)),!$e(e))return e}),r[1]=e,Re.apply(Fe,r)}}),De[ze][qe]||x(De[ze],qe,De[ze].valueOf),mt(De,"Symbol"),mt(Math,"Math",!0),mt(m.JSON,"JSON",!0);var hn={},ln=[];function cn(t,e){if(Array.isArray(t)){var n=!0,r=!1,i=void 0;try{for(var s,u=t[Symbol.iterator]();!(n=(s=u.next()).done);n=!0){cn(s.value,e)}}catch(t){r=!0,i=t}finally{try{n||null==u.return||u.return()}finally{if(r)throw i}}}else if("object"!==Wt(t))vn(Object.keys(e)),hn[t]=Object.assign(hn[t]||{},e);else for(var o in t)cn(o,t[o])}function fn(t){return hn[t]||{}}function vn(t){ln.push.apply(ln,be(t))}var dn=q(!0);j(j.P,"Array",{includes:function(t){return dn(this,t,1<arguments.length?arguments[1]:void 0)}}),it("includes");var yn=et("match"),pn=function(t){var e;return g(t)&&(void 0!==(e=t[yn])?!!e:"RegExp"==E(t))},mn=et("match"),gn="includes";j(j.P+j.F*function(e){var n=/./;try{"/./"[e](n)}catch(t){try{return n[mn]=!1,!"/./"[e](n)}catch(t){}}return!0}(gn),"String",{includes:function(t){return!!~function(t,e,n){if(pn(e))throw TypeError("String#"+n+" doesn't accept regex!");return String(C(t))}(this,t,gn).indexOf(t,1<arguments.length?arguments[1]:void 0)}});var wn=function(e,t,n){var r=et(e),i=n(C,r,""[e]),s=i[0],u=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 u.call(t,this,e)}:function(t){return u.call(t,this)}))};function bn(t,e){var n,r=t.length,i=[];for(n=0;n<r;n++)i.push(e(t[n]));return i}function _n(t){return t%360*Math.PI/180}function kn(t){return t.toLowerCase().replace(/-(.)/g,function(t,e){return e.toUpperCase()})}function xn(t){return t.replace(/([A-Z])/g,function(t,e){return"-"+e.toLowerCase()})}function On(t){return t.charAt(0).toUpperCase()+t.slice(1)}function Sn(t,e,n){if(null==e||null==n){var r=t.bbox();null==e?e=r.width/r.height*n:null==n&&(n=r.height/r.width*e)}return{width:e,height:n}}function An(t,e){var n,r,i=t.origin;if("string"==typeof i||null==i){var s=(i||"center").toLowerCase().trim(),u=e.bbox(),o=u.height,a=u.width,h=u.x,l=u.y,c=s.includes("left")?h:s.includes("right")?h+a:h+a/2,f=s.includes("top")?l:s.includes("bottom")?l+o:l+o/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]}wn("replace",2,function(i,s,u){return[function(t,e){var n=i(this),r=null==t?void 0:t[s];return void 0!==r?r.call(t,n,e):u.call(String(n),t,e)},u]});var jn=Object.freeze({map:bn,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:_n,degrees:function(t){return 180*t/Math.PI%360},camelCase:kn,unCamelCase:xn,capitalize:On,proportionalSize:Sn,getOrigin:An}),Mn="http://www.w3.org/2000/svg",En="http://www.w3.org/2000/xmlns/",Tn="http://www.w3.org/1999/xlink",Cn="http://svgjs.com/svgjs",Pn=Object.freeze({ns:Mn,xmlns:En,xlink:Tn,svgjs:Cn}),Nn={window:"undefined"==typeof window?null:window,document:"undefined"==typeof document?null:document};function Ln(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}var Dn=function t(){Ln(this,t)},Fn={},Rn="___SYMBOL___ROOT___";function zn(t){return Nn.document.createElementNS(Mn,t)}function In(t){if(t instanceof Dn)return t;if("object"===Wt(t))return Yn(t);if(null==t)return new Fn[Rn];if("string"==typeof t&&"<"!==t.charAt(0))return Yn(Nn.document.querySelector(t));var e=zn("svg");return e.innerHTML=t,t=Yn(e.firstChild)}function qn(t,e){return e instanceof Nn.window.Node?e:zn(t)}function Yn(t){if(!t)return null;if(t.instance instanceof Dn)return t.instance;var e=On(t.nodeName);return"LinearGradient"===e||"RadialGradient"===e?e="Gradient":Fn[e]||(e="Dom"),new Fn[e](t)}function Xn(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 Fn[e]=t,n&&(Fn[Rn]=t),vn(Object.keys(t.prototype)),t}function Hn(t){return Fn[t]}var Gn=1e3;function Bn(t){return"Svgjs"+On(t)+Gn++}function Vn(t){for(var e=t.children.length-1;0<=e;e--)Vn(t.children[e]);return t.id?Yn(t).id(Bn(t.nodeName)):Yn(t)}function Wn(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=Qn(e[r])),t[i].prototype[r]=s}}function Qn(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)}}cn("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=In(t)).remove();var e=this.position();return this.parent().add(t,e),this},after:function(t){(t=In(t)).remove();var e=this.position();return this.parent().add(t,e+1),this},insertBefore:function(t){(t=In(t)).before(this)},insertAfter:function(t){(t=In(t)).after(this)}}),wn("split",2,function(i,s,u){var v=pn,d=u,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];u=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,u,o,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(o=1;o<arguments[p]-2;o++)void 0===arguments[o]&&(i[o]=void 0)}),1<i[p]&&i.index<n[p]&&y.apply(a,i.slice(1)),u=i[0][p],l=s,a[p]>=c));)f[m]===i.index&&f[m]++;return l===n[p]?!u&&f.test("")||a.push(""):a.push(n.slice(l)),a[p]>c?a.slice(0,c):a}}else"0"[t](void 0,0)[p]&&(u=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):u.call(String(n),t,e)},u]});var Un=/^([+-]?(\d+(\.\d*)?|\.\d+)(e[+-]?\d+)?)([a-z%]*)$/i,Jn=/^#?([a-f\d]{2})([a-f\d]{2})([a-f\d]{2})$/i,$n=/rgb\((\d+),(\d+),(\d+)\)/,Kn=/(#[a-z0-9\-_]+)/i,Zn=/\)\s*,?\s*/,tr=/\s/g,er=/^#[a-f0-9]{3,6}$/i,nr=/^rgb\(/,rr=/^(\s+)?$/,ir=/^[+-]?(\d+(\.\d*)?|\.\d+)(e[+-]?\d+)?$/i,sr=/\.(jpg|jpeg|png|gif|svg)(\?[^=]+.*)?/i,ur=/[\s,]+/,or=/([^e])-/gi,ar=/[MLHVCSQTAZ]/gi,hr=/[MLHVCSQTAZ]/i,lr=/((\d?\.\d+(?:e[+-]?\d+)?)((?:\.\d+(?:e[+-]?\d+)?)+))+/gi,cr=/\./g,fr=Object.freeze({numberAndUnit:Un,hex:Jn,rgb:$n,reference:Kn,transforms:Zn,whitespace:tr,isHex:er,isRgb:nr,isCss:/[^:]+:[^;]+;?/,isBlank:rr,isNumber:ir,isPercent:/^-?[\d.]+%$/,isImage:sr,delimiter:ur,hyphen:or,pathLetters:ar,isPathLetter:hr,numbersWithDots:lr,dots:cr});cn("Dom",{classes:function(){var t=this.attr("class");return null==t?[]:t.trim().split(ur)},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)}}),cn("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 u,o=t[Symbol.iterator]();!(r=(u=o.next()).done);r=!0){var a=kn(u.value);n[a]=this.node.style[a]}}catch(t){i=!0,s=t}finally{try{r||null==o.return||o.return()}finally{if(i)throw s}}return n}if("string"==typeof t)return this.node.style[kn(t)];if("object"===Wt(t))for(var h in t)this.node.style[kn(h)]=null==t[h]||rr.test(t[h])?"":t[h]}return 2===arguments.length&&(this.node.style[kn(t)]=null==e||rr.test(e)?"":e),this},show:function(){return this.css("display","")},hide:function(){return this.css("display","none")},visible:function(){return"none"!==this.css("display")}}),cn("Dom",{data:function(e,t,n){if("object"===Wt(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}}),cn("Dom",{remember:function(t,e){if("object"===Wt(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 vr=0;function dr(t){var e=In(t).getEventHolder();return e.events||(e.events={}),e.events}function yr(t){return In(t).getEventTarget()}function pr(t,e,r,n,i){var s=r.bind(n||t),u=dr(t),o=yr(t);e=Array.isArray(e)?e:e.split(ur),r._svgjsListenerId||(r._svgjsListenerId=++vr),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,o.addEventListener(e,s,i||!1)})}function mr(u,t,o,a){var h=dr(u),l=yr(u);("function"!=typeof o||(o=o._svgjsListenerId))&&(t=Array.isArray(t)?t:(t||"").split(ur)).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],a||!1),delete h[i][s||"*"][o]);else if(i&&s){if(h[i]&&h[i][s]){for(n in h[i][s])mr(l,[i,s].join("."),n);delete h[i][s]}}else if(s)for(t in h)for(e in h[t])s===e&&mr(l,[t,s].join("."));else if(i){if(h[i]){for(e in h[i])mr(l,[i,e].join("."));delete h[i]}}else{for(t in h)mr(l,t);(r=In(u).getEventHolder()).events&&(r.events={})}})}function gr(t,e,n){var r=yr(t);return e instanceof Nn.window.Event||(e=new Nn.window.CustomEvent(e,{detail:n,cancelable:!0})),r.dispatchEvent(e),e}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 br(t,e,n){return e&&wr(t.prototype,e),n&&wr(t,n),t}var _r=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};u&&"g"!=/./g.flags&&a.f(RegExp.prototype,"flags",{configurable:!0,get:_r});var kr="toString",xr=/./[kr],Or=function(t){O(RegExp.prototype,kr,t,!0)};function Sr(t){var e=t.toString(16);return 1===e.length?"0"+e:e}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:!u&&t instanceof RegExp?_r.call(t):void 0)}):xr.name!=kr&&Or(function(){return xr.call(this)});var Ar=function(){function t(){Ln(this,t),this.init.apply(this,arguments)}return br(t,[{key:"init",value:function(t,e,n){var r,i;if(this.r=0,this.g=0,this.b=0,t)return"string"==typeof t?nr.test(t)?(r=$n.exec(t.replace(tr,"")),this.r=parseInt(r[1]),this.g=parseInt(r[2]),this.b=parseInt(r[3])):er.test(t)&&(r=Jn.exec(4===(i=t).length?["#",i.substring(1,2),i.substring(1,2),i.substring(2,3),i.substring(2,3),i.substring(3,4),i.substring(3,4)].join(""):i),this.r=parseInt(r[1],16),this.g=parseInt(r[2],16),this.b=parseInt(r[3],16)):Array.isArray(t)?(this.r=t[0],this.g=t[1],this.b=t[2]):"object"===Wt(t)?(this.r=t.r,this.g=t.g,this.b=t.b):3===arguments.length&&(this.r=t,this.g=e,this.b=n),this}},{key:"toString",value:function(){return this.toHex()}},{key:"toArray",value:function(){return[this.r,this.g,this.b]}},{key:"toHex",value:function(){return"#"+Sr(Math.round(this.r))+Sr(Math.round(this.g))+Sr(Math.round(this.b))}},{key:"toRgb",value:function(){return"rgb("+[this.r,this.g,this.b].join()+")"}},{key:"brightness",value:function(){return this.r/255*.3+this.g/255*.59+this.b/255*.11}}],[{key:"test",value:function(t){return t+="",er.test(t)||nr.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 this.isRgb(t)||this.test(t)}}]),t}();function jr(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}function Mr(t,e){return!e||"object"!==Wt(e)&&"function"!=typeof e?jr(t):e}function Er(t){return(Er=Object.setPrototypeOf?Object.getPrototypeOf:function(t){return t.__proto__||Object.getPrototypeOf(t)})(t)}function Tr(t,e,n){return(Tr="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=Er(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 Cr(t,e){return(Cr=Object.setPrototypeOf||function(t,e){return t.__proto__=e,t})(t,e)}function Pr(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&&Cr(t,e)}wn("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 Nr=function(){function e(){Ln(this,e),this.init.apply(this,arguments)}return br(e,[{key:"init",value:function(t,e){var n,r=0,i=0;return n=Array.isArray(t)?{x:t[0],y:t[1]}:"object"===Wt(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 e(this)}},{key:"transform",value:function(t){return new e(t.a*this.x+t.c*this.y+t.e,t.b*this.x+t.d*this.y+t.f)}},{key:"toArray",value:function(){return[this.x,this.y]}}]),e}();function Lr(){if(!Lr.nodes){var t=In().size(2,0);t.node.cssText=["opacity: 0","position: absolute","left: -100%","top: -100%","overflow: hidden"].join(";");var e=t.path().node;Lr.nodes={svg:t,path:e}}if(!Lr.nodes.svg.node.parentNode){var n=Nn.document.body||Nn.document.documentElement;Lr.nodes.svg.addTo(n)}return Lr.nodes}function Dr(t){return!(t.w||t.h||t.x||t.y)}var Fr=function(){function u(){Ln(this,u),this.init.apply(this,arguments)}return br(u,[{key:"init",value:function(t){return t="string"==typeof t?t.split(ur).map(parseFloat):Array.isArray(t)?t:"object"===Wt(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 u(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){var n=1/0,r=-1/0,i=1/0,s=-1/0;return[new Nr(this.x,this.y),new Nr(this.x2,this.y),new Nr(this.x,this.y2),new Nr(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 u(n,i,r-n,s-i)}},{key:"addOffset",value:function(){return this.x+=Nn.window.pageXOffset,this.y+=Nn.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 Dr(this)}}]),u}();function Rr(e){var n,t;try{if(Dr(n=e(this.node))&&(t=this.node,!(Nn.document.documentElement.contains||function(t){for(;t.parentNode;)t=t.parentNode;return t===document}).call(Nn.document.documentElement,t)))throw new Error("Element not in the dom")}catch(t){try{var r=this.clone().addTo(Lr().svg).show();n=e(r.node),r.remove()}catch(t){throw new Error('Getting a bounding box of element "'+this.node.nodeName+'" is not possible')}}return n}function zr(t,e,n){return Math.abs(e-t)<(n||1e-6)}cn({viewbox:{viewbox:function(t,e,n,r){return null==t?new Fr(this.attr("viewBox")):this.attr("viewBox",new Fr(t,e,n,r))}}});var Ir=function(){function h(){Ln(this,h),this.init.apply(this,arguments)}return br(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(ur).map(parseFloat)):Array.isArray(t)?h.fromArray(t):"object"===Wt(t)&&h.isMatrixLike(t)?t:"object"===Wt(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 Nr(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 u=new Nr(r,i).transform(s),o=e.px?e.px-u.x:0,a=e.py?e.py-u.y:0;s.translateO(o,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,u=t.rotate||0,o=t.translateX||0,a=t.translateY||0;return(new h).translateO(-e,-n).scaleO(r,i).shearO(s).rotateO(u).translateO(o,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,u=this.e,o=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:u-t+t*v*l+e*(y*v*l-d*p),translateY:o-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,u=t*r-e*n;if(!u)throw new Error("Cannot invert "+this);var o=r/u,a=-e/u,h=-n/u,l=t/u,c=-(o*i+h*s),f=-(a*i+l*s);return this.a=o,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,u=this.c,o=this.d,a=this.e,h=this.f;return this.a=i*t,this.b=s*e,this.c=u*t,this.d=o*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=_n(t);var r=Math.cos(t),i=Math.sin(t),s=this.a,u=this.b,o=this.c,a=this.d,h=this.e,l=this.f;return this.a=s*r-u*i,this.b=u*r+s*i,this.c=o*r-a*i,this.d=a*r+o*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,u=this.e,o=this.f;return this.a=n+r*t,this.c=i+s*t,this.e=u+o*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=_n(t),e=_n(e);var i=Math.tan(t),s=Math.tan(e),u=this.a,o=this.b,a=this.c,h=this.d,l=this.e,c=this.f;return this.a=u+o*i,this.b=o+u*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 zr(this.a,e.a)&&zr(this.b,e.b)&&zr(this.c,e.c)&&zr(this.d,e.d)&&zr(this.e,e.e)&&zr(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,u=t.scale&&t.scale.length?t.scale[0]*n:isFinite(t.scale)?t.scale*n:isFinite(t.scaleX)?t.scaleX*n:n,o=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 Nr(t.origin||t.around||t.ox||t.originX,t.oy||t.originY),c=l.x,f=l.y,v=new Nr(t.position||t.px||t.positionX,t.py||t.positionY),d=v.x,y=v.y,p=new Nr(t.translate||t.tx||t.translateX,t.ty||t.translateY),m=p.x,g=p.y,w=new Nr(t.relative||t.rx||t.relativeX,t.ry||t.relativeY);return{scaleX:u,scaleY:o,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,u=t.b*e.c+t.d*e.d,o=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=u,n.e=o,n.f=a,n}}]),h}();var qr=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}}}(),Yr=qr("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,be(t))});function Xr(t,e){return new Yr(bn((e||Nn.document).querySelectorAll(t),function(t){return Yn(t)}))}Wn(Yr,{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 t[e].apply(t,n)}):(this.forEach(function(t){e.call(t,t)}),this)},toArray:function(){return Array.prototype.concat.apply([],this)}}),Yr.extend=function(t){t=t.reduce(function(t,r){return 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},{}),Wn(Yr,t)};var Hr=function(t){function r(){var t,e=(0<arguments.length&&void 0!==arguments[0]?arguments[0]:{}).events,n=void 0===e?{}:e;return Ln(this,r),(t=Mr(this,Er(r).call(this))).events=n,t}return Pr(r,Dn),br(r,[{key:"addEventListener",value:function(){}},{key:"dispatch",value:function(t,e){return gr(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 mr(this,t,e),this}},{key:"on",value:function(t,e,n,r){return pr(this,t,e,n,r),this}},{key:"removeEventListener",value:function(){}}]),r}();function Gr(){}var Br={duration:400,ease:">",delay:0},Vr={"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","font-size":16,"font-family":"Helvetica, Arial, sans-serif","text-anchor":"start"},Wr=Object.freeze({noop:Gr,timeline:Br,attrs:Vr}),Qr=qr("SVGArray",Array,function(t){this.init(t)});Wn(Qr,{init:function(t){return"number"==typeof t||(this.length=0,this.push.apply(this,be(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,be(this)),t},parse:function(){var t=0<arguments.length&&void 0!==arguments[0]?arguments[0]:[];return t instanceof Array?t:t.trim().split(ur).map(parseFloat)},clone:function(){return new this.constructor(this)},toSet:function(){return new Set(this)}});var Ur=function(){function n(){Ln(this,n),this.init.apply(this,arguments)}return br(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)}}]),n}(),Jr=[];var Dom=function(t){function Dom(t,e){var n;return Ln(this,Dom),(n=Mr(this,Er(Dom).call(this,t))).node=t,n.type=t.nodeName,e&&t!==e&&n.attr(e),n}return Pr(Dom,Hr),br(Dom,[{key:"add",value:function(t,e){return t=In(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 In(t).put(this)}},{key:"children",value:function(){return new Yr(bn(this.node.children,function(t){return Yn(t)}))}},{key:"clear",value:function(){for(;this.node.hasChildNodes();)this.node.removeChild(this.node.lastChild);return delete this._defs,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(zn(t)))}},{key:"first",value:function(){return Yn(this.node.firstChild)}},{key:"get",value:function(t){return Yn(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=Bn(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 Yn(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=Yn(e.node.parentNode),!t)return e;for(;e&&e.node instanceof Nn.window.SVGElement;){if("string"==typeof t?e.matches(t):e instanceof t)return e;e=Yn(e.node.parentNode)}}},{key:"put",value:function(t,e){return this.add(t,e),t}},{key:"putIn",value:function(t){return In(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=In(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=Yn(s.node.cloneNode(!0)),t){var u=n(s);if(s=u||s,!1===u)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=Nn.document.createElementNS(Mn,"svg"),i=Nn.document.createDocumentFragment(),e.innerHTML=n,r=e.children.length;r--;)i.appendChild(e.firstElementChild);var o=this.parent();return t?this.replace(i)&&o: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}();Wn(Dom,{attr:function(n,t,e){var r=this;if(null==n){n={},t=this.node.attributes;var i=!0,s=!1,u=void 0;try{for(var o,a=t[Symbol.iterator]();!(i=(o=a.next()).done);i=!0){var h=o.value;n[h.nodeName]=ir.test(h.nodeValue)?parseFloat(h.nodeValue):h.nodeValue}}catch(t){s=!0,u=t}finally{try{i||null==a.return||a.return()}finally{if(s)throw u}}return n}if(n instanceof Array)return n.reduce(function(t,e){return t[e]=r.attr(e),t},{});if("object"===Wt(n))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))?Vr[n]:ir.test(t)?parseFloat(t):t;"number"==typeof(t=Jr.reduce(function(t,e){return e(n,t,r)},t))?t=new Ur(t):Ar.isColor(t)?t=new Ar(t):t.constructor===Array&&(t=new Qr(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 Xr(t,this.node)}}),Xn(Dom);var Svg=Hn(Rn),Element=function(t){function Element(t,e){var n;return Ln(this,Element),(n=Mr(this,Er(Element).call(this,t,e))).dom={},n.node.instance=jr(jr(n)),t.hasAttribute("svgjs:data")&&n.setData(JSON.parse(t.getAttribute("svgjs:data"))||{}),n}return Pr(Element,Dom),br(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:"root",value:function(){var t=this.parent(Svg);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]:Nn.document;t=In(t);for(var e=new Yr,n=this;(n=n.parent())&&n.node!==t.node&&n.node!==Nn.document;)e.push(n);return e}},{key:"reference",value:function(t){if(!(t=this.attr(t)))return null;var e=t.match(Kn);return e?In(e[1]):null}},{key:"setData",value:function(t){return this.dom=t,this}},{key:"size",value:function(t,e){var n=Sn(this,t,e);return this.width(new Ur(n.width)).height(new Ur(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)),Tr(Er(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}();Wn(Element,{bbox:function(){return new Fr(Rr.call(this,function(t){return t.getBBox()}))},rbox:function(t){var e=new Fr(Rr.call(this,function(t){return t.getBoundingClientRect()}));return t?e.transform(t.screenCTM().inverse()):e.addOffset()},point:function(t,e){return new Nr(t,e).transform(this.screenCTM().inverse())},ctm:function(){return new Ir(this.node.getCTM())},screenCTM:function(){if("function"!=typeof this.isRoot||this.isRoot())return new Ir(this.node.getScreenCTM());var t=this.rect(1,1),e=t.node.getScreenCTM();return t.remove(),new Ir(e)}}),Xn(Element);var $r={stroke:["color","width","opacity","linecap","linejoin","miterlimit","dasharray","dashoffset"],fill:["color","opacity","rule"],prefix:function(t,e){return"color"===e?t:t+"-"+e}};function Kr(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 Zr(t){return this.attr("rx",t)}function ti(t){return this.attr("ry",t)}function ei(t){return null==t?this.cx()-this.rx():this.cx(t+this.rx())}function ni(t){return null==t?this.cy()-this.ry():this.cy(t+this.ry())}function ri(t){return null==t?this.attr("cx"):this.attr("cx",t)}function ii(t){return null==t?this.attr("cy"):this.attr("cy",t)}function si(t){return null==t?2*this.rx():this.rx(new Ur(t).divide(2))}function ui(t){return null==t?2*this.ry():this.ry(new Ur(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||Ar.isRgb(t)||t instanceof Element)this.attr(e,t);else for(n=$r[e].length-1;0<=n;n--)null!=t[$r[e][n]]&&this.attr($r.prefix(e,$r[e][n]),t[$r[e][n]]);return this},cn(["Shape","Runner"],t)}),cn(["Element","Runner"],{matrix:function(t,e,n,r,i,s){return null==t?new Ir(this):this.attr("transform",new Ir(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];this.transform({flip:n,origin:r},!0)},opacity:function(t){return this.attr("opacity",t)},dmove:function(t,e){return this.dx(t).dy(e)}}),cn("Element",{dx:function(t){return this.x(new Ur(t).plus(this.x()))},dy:function(t){return this.y(new Ur(t).plus(this.y()))}}),cn("radius",{radius:function(t,e){var n=(this._element||this).type;return"radialGradient"===n||"radialGradient"===n?this.attr("r",new Ur(t)):this.rx(t).ry(null==e?t:e)}}),cn("Path",{length:function(){return this.node.getTotalLength()},pointAt:function(t){return new Nr(this.node.getPointAtLength(t))}}),cn(["Element","Runner"],{font:function(t,e){if("object"===Wt(t))for(e in t)this.font(e,t[e]);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)}}),cn("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)}}),cn("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?mr(this,e):pr(this,e,t),this},t},{})),cn("Element",{untransform:function(){return this.attr("transform",null)},matrixify:function(){return(this.attr("transform")||"").split(Zn).slice(0,-1).map(function(t){var e=t.trim().split("(");return[e[0],e[1].split(ur).map(function(t){return parseFloat(t)})]}).reverse().reduce(function(t,e){return"matrix"===e[0]?t.lmultiply(Ir.fromArray(e[1])):t[e[0]].apply(t,e[1])},new Ir)},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 Ir(this).decompose();return n[t]||n}Ir.isMatrixLike(t)||(t=Kr({},t,{origin:An(t,this)}));var r=new Ir(!0===e?this:e||!1).transform(t);return this.attr("transform",r)}});var oi=Object.freeze({rx:Zr,ry:ti,x:ei,y:ni,cx:ri,cy:ii,width:si,height:ui}),Shape=function(t){function Shape(){return Ln(this,Shape),Mr(this,Er(Shape).apply(this,arguments))}return Pr(Shape,Element),Shape}();Xn(Shape);var Circle=function(t){function Circle(t){return Ln(this,Circle),Mr(this,Er(Circle).call(this,qn("circle",t),t))}return Pr(Circle,Shape),br(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 Ur(t).divide(2))}}]),Circle}();Wn(Circle,{x:ei,y:ni,cx:ri,cy:ii,width:si,height:ui}),cn({Element:{circle:Qn(function(t){return this.put(new Circle).size(t).move(0,0)})}}),Xn(Circle);var Container=function(t){function Container(){return Ln(this,Container),Mr(this,Er(Container).apply(this,arguments))}return Pr(Container,Element),br(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}();Xn(Container);var Defs=function(t){function Defs(t){return Ln(this,Defs),Mr(this,Er(Defs).call(this,qn("defs",t),t))}return Pr(Defs,Container),br(Defs,[{key:"flatten",value:function(){return this}},{key:"ungroup",value:function(){return this}}]),Defs}();Xn(Defs);var Ellipse=function(t){function Ellipse(t){return Ln(this,Ellipse),Mr(this,Er(Ellipse).call(this,qn("ellipse",t),t))}return Pr(Ellipse,Shape),br(Ellipse,[{key:"size",value:function(t,e){var n=Sn(this,t,e);return this.rx(new Ur(n.width).divide(2)).ry(new Ur(n.height).divide(2))}}]),Ellipse}();Wn(Ellipse,oi),cn("Container",{ellipse:Qn(function(t,e){return this.put(new Ellipse).size(t,e).move(0,0)})}),Xn(Ellipse);var Stop=function(t){function Stop(t){return Ln(this,Stop),Mr(this,Er(Stop).call(this,qn("stop",t),t))}return Pr(Stop,Element),br(Stop,[{key:"update",value:function(t){return("number"==typeof t||t instanceof Ur)&&(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 Ur(t.offset)),this}}]),Stop}();function ai(t,e){return"radialGradient"===(this._element||this).type?this.attr({fx:new Ur(t),fy:new Ur(e)}):this.attr({x1:new Ur(t),y1:new Ur(e)})}function hi(t,e){return"radialGradient"===(this._element||this).type?this.attr({cx:new Ur(t),cy:new Ur(e)}):this.attr({x2:new Ur(t),y2:new Ur(e)})}Xn(Stop);var li=Object.freeze({from:ai,to:hi}),Gradient=function(t){function Gradient(t,e){return Ln(this,Gradient),Mr(this,Er(Gradient).call(this,qn(t+"Gradient","string"==typeof t?null:t),e))}return Pr(Gradient,Container),br(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"),Tr(Er(Gradient.prototype),"attr",this).call(this,t,e,n)}},{key:"targets",value:function(){return Xr('svg [fill*="'+this.id()+'"]')}},{key:"bbox",value:function(){return new Fr}}]),Gradient}();Wn(Gradient,li),cn({Container:{gradient:Qn(function(t,e){return this.defs().gradient(t,e)})},Defs:{gradient:Qn(function(t,e){return this.put(new Gradient(t)).update(e)})}}),Xn(Gradient);var Pattern=function(t){function Pattern(t){return Ln(this,Pattern),Mr(this,Er(Pattern).call(this,qn("pattern",t),t))}return Pr(Pattern,Container),br(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"),Tr(Er(Pattern.prototype),"attr",this).call(this,t,e,n)}},{key:"targets",value:function(){return Xr('svg [fill*="'+this.id()+'"]')}},{key:"bbox",value:function(){return new Fr}}]),Pattern}();cn({Container:{pattern:function(){var t;return(t=this.defs()).pattern.apply(t,arguments)}},Defs:{pattern:Qn(function(t,e,n){return this.put(new Pattern).update(n).attr({x:0,y:0,width:t,height:e,patternUnits:"userSpaceOnUse"})})}}),Xn(Pattern);var ci,Image=function(t){function Image(t){return Ln(this,Image),Mr(this,Er(Image).call(this,qn("image",t),t))}return Pr(Image,Shape),br(Image,[{key:"load",value:function(t,n){if(!t)return this;var r=new Nn.window.Image;return pr(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),pr(r,"load error",function(){mr(r)}),this.attr("href",r.src=t,Tn)}}]),Image}();ci=function(t,e,n){return"fill"!==t&&"stroke"!==t||sr.test(e)&&(e=n.root().defs().image(e)),e instanceof Image&&(e=n.root().defs().pattern(0,0,function(t){t.add(e)})),e},Jr.push(ci),cn({Container:{image:Qn(function(t,e){return this.put(new Image).size(0,0).load(t,e)})}}),Xn(Image);var fi=qr("PointArray",Qr);Wn(fi,{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 fi(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(ur).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},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 vi=fi;var di=Object.freeze({MorphArray:vi,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 Ln(this,Line),Mr(this,Er(Line).call(this,qn("line",t),t))}return Pr(Line,Shape),br(Line,[{key:"array",value:function(){return new fi([[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 fi(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=Sn(this,t,e);return this.attr(this.array().size(n.width,n.height).toLine())}}]),Line}();Wn(Line,di),cn({Container:{line:Qn(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])})}}),Xn(Line);var Marker=function(t){function Marker(t){return Ln(this,Marker),Mr(this,Er(Marker).call(this,qn("marker",t),t))}return Pr(Marker,Container),br(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}();cn({Container:{marker:function(){var t;return(t=this.defs()).marker.apply(t,arguments)}},Defs:{marker:Qn(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)}}}),Xn(Marker);var yi,pi,mi=[].sort,gi=[1,2,3];function wi(e,n){return function(t){return null==t?this[t]:(this[e]=t,n&&n.call(this),this)}}j(j.P+j.F*(w(function(){gi.sort(void 0)})||!w(function(){gi.sort(null)})||!((yi=mi)&&w(function(){pi?yi.call(null,function(){},1):yi.call(null)}))),"Array",{sort:function(t){return void 0===t?mi.call(K(this)):mi.call(K(this),d(t))}});var bi={"-":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 u=i;return"none"===s?--u:"both"===s&&++u,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&&u<n&&(n=u),n/u}}},_i=function(){function t(){Ln(this,t)}return br(t,[{key:"done",value:function(){return!1}}]),t}(),ki=function(t){function n(t){var e;return Ln(this,n),(e=Mr(this,Er(n).call(this))).ease=bi[t||Br.ease]||t,e}return Pr(n,_i),br(n,[{key:"step",value:function(t,e,n){return"number"!=typeof t?n<1?t:e:t+(e-t)*this.ease(n)}}]),n}(),xi=function(t){function n(t){var e;return Ln(this,n),(e=Mr(this,Er(n).call(this))).stepper=t,e}return Pr(n,_i),br(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 Oi(){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 Si=function(t){function r(t,e){var n;return Ln(this,r),(n=Mr(this,Er(r).call(this))).duration(t||500).overshoot(e||0),n}return Pr(r,xi),br(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),u=t+i*n+s*n*n/2;return r.velocity=i+s*n,r.done=Math.abs(e-u)+Math.abs(i)<.002,r.done?e:u}}]),r}();Wn(Si,{duration:wi("_duration",Oi),overshoot:wi("_overshoot",Oi)});var Ai=function(t){function s(t,e,n,r){var i;return Ln(this,s),t=null==t?.1:t,e=null==e?.01:e,n=null==n?0:n,r=null==r?1e3:r,(i=Mr(this,Er(s).call(this))).p(t).i(e).d(n).windup(r),i}return Pr(s,xi),br(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,u=(i-(r.error||0))/n,o=this.windup;return!1!==o&&(s=Math.max(-o,Math.min(s,o))),r.error=i,r.integral=s,r.done=Math.abs(i)<.001,r.done?e:t+(this.P*i+this.I*s+this.D*u)}}]),s}();Wn(Ai,{windup:wi("windup"),p:wi("P"),i:wi("I"),d:wi("D")});var ji=qr("PathArray",Qr);function Mi(t,e,n,r){return n+r.replace(cr," .")}for(var Ei={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]]}},Ti="mlhvqtcsaz".split(""),Ci=0,Pi=Ti.length;Ci<Pi;++Ci)Ei[Ti[Ci]]=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 Ei[s](t,e,n)}}(Ti[Ci].toUpperCase());Wn(ji,{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(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 ji(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 ji(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,u=this.destination.value,o=[],a=new ji;for(e=0,n=s.length;e<n;e++){for(o[e]=[s[e][0]],r=1,i=s[e].length;r<i;r++)o[e][r]=s[e][r]+(u[e][r]-s[e][r])*t;"A"===o[e][0]&&(o[e][4]=+(0!==o[e][4]),o[e][5]=+(0!==o[e][5]))}return a.value=o,a},parse:function(){var t,e=0<arguments.length&&void 0!==arguments[0]?arguments[0]:[["M",0,0]];if(e instanceof ji)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(lr,Mi).replace(ar," $& ").replace(or,"$1 -").trim().split(ur):e.reduce(function(t,e){return[].concat.call(t,e)},[]);for(var r=[],i=new Nr,s=new Nr,u=0,o=e.length;hr.test(e[u])?(t=e[u],++u):"M"===t?t="L":"m"===t&&(t="l"),r.push(Ei[t].call(null,e.slice(u,u+=n[t.toUpperCase()]).map(parseFloat),i,s)),u<o;);return r},bbox:function(){return Lr().path.setAttribute("d",this.toString()),Lr.nodes.path.getBBox()}});var Ni=function(){function e(t){Ln(this,e),this._stepper=t||new ki("-"),this._from=null,this._to=null,this._type=null,this._context=null,this._morphObj=null}return br(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=Wt(t);"number"===e?this.type(Ur):"string"===e?Ar.isColor(t)?this.type(Ar):ur.test(t)?this.type(ar.test(t)?ji:Qr):Un.test(t)?this.type(Ur):this.type(Li):-1<Ri.indexOf(t.constructor)?this.type(t.constructor):Array.isArray(t)?this.type(Qr):"object"===e?this.type(Fi):this.type(Li)}var n=new this._type(t).toArray();return this._morphObj=this._morphObj||new this._type,this._context=this._context||Array.apply(null,Array(n.length)).map(Object),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}(),Li=function(){function t(){Ln(this,t),this.init.apply(this,arguments)}return br(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}(),Di=function(){function e(){Ln(this,e),this.init.apply(this,arguments)}return br(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}();Di.defaults={scaleX:1,scaleY:1,shear:0,rotate:0,translateX:0,translateY:0,originX:0,originY:0};var Fi=function(){function t(){Ln(this,t),this.init.apply(this,arguments)}return br(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}(),Ri=[Li,Di,Fi];function zi(){var t=0<arguments.length&&void 0!==arguments[0]?arguments[0]:[];Ri.push.apply(Ri,be([].concat(t)))}function Ii(){Wn(Ri,{to:function(t){return(new Ni).type(this.constructor).from(this.valueOf()).to(t)},fromArray:function(t){return this.init(t),this}})}var Path=function(t){function Path(t){return Ln(this,Path),Mr(this,Er(Path).call(this,qn("path",t),t))}return Pr(Path,Shape),br(Path,[{key:"array",value:function(){return this._array||(this._array=new ji(this.attr("d")))}},{key:"plot",value:function(t){return null==t?this.array():this.clear().attr("d","string"==typeof t?t:this._array=new ji(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=Sn(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 Xr('svg textpath [href*="'+this.id()+'"]')}}]),Path}();Path.prototype.MorphArray=ji,cn({Container:{path:Qn(function(t){return this.put(new Path).plot(t||new ji)})}}),Xn(Path);var qi=Object.freeze({array:function(){return this._array||(this._array=new fi(this.attr("points")))},plot:function(t){return null==t?this.array():this.clear().attr("points","string"==typeof t?t:this._array=new fi(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=Sn(this,t,e);return this.attr("points",this.array().size(n.width,n.height))}}),Polygon=function(t){function Polygon(t){return Ln(this,Polygon),Mr(this,Er(Polygon).call(this,qn("polygon",t),t))}return Pr(Polygon,Shape),Polygon}();cn({Container:{polygon:Qn(function(t){return this.put(new Polygon).plot(t||new fi)})}}),Wn(Polygon,di),Wn(Polygon,qi),Xn(Polygon);var Polyline=function(t){function Polyline(t){return Ln(this,Polyline),Mr(this,Er(Polyline).call(this,qn("polyline",t),t))}return Pr(Polyline,Shape),Polyline}();cn({Container:{polyline:Qn(function(t){return this.put(new Polyline).plot(t||new fi)})}}),Wn(Polyline,di),Wn(Polyline,qi),Xn(Polyline);var Rect=function(t){function Rect(t){return Ln(this,Rect),Mr(this,Er(Rect).call(this,qn("rect",t),t))}return Pr(Rect,Shape),Rect}();Wn(Rect,{rx:Zr,ry:ti}),cn({Container:{rect:Qn(function(t,e){return this.put(new Rect).size(t,e)})}}),Xn(Rect);var Yi=function(){function t(){Ln(this,t),this._first=null,this._last=null}return br(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}(),Xi={nextDraw:null,frames:new Yi,timeouts:new Yi,timer:Nn.window.performance||Nn.window.Date,transforms:[],frame:function(t){var e=Xi.frames.push({run:t});return null===Xi.nextDraw&&(Xi.nextDraw=Nn.window.requestAnimationFrame(Xi._draw)),e},transform_frame:function(t,e){Xi.transforms[e]=t},timeout:function(t,e){e=e||0;var n=Xi.timer.now()+e,r=Xi.timeouts.push({run:t,time:n});return null===Xi.nextDraw&&(Xi.nextDraw=Nn.window.requestAnimationFrame(Xi._draw)),r},cancelFrame:function(t){null!=t&&Xi.frames.remove(t)},clearTimeout:function(t){null!=t&&Xi.timeouts.remove(t)},_draw:function(t){for(var e=null,n=Xi.timeouts.last();(e=Xi.timeouts.shift())&&(t>=e.time?e.run():Xi.timeouts.push(e),e!==n););for(var r=null,i=Xi.frames.last();r!==i&&(r=Xi.frames.shift());)r.run();Xi.transforms.forEach(function(t){t()}),Xi.nextDraw=Xi.timeouts.first()||Xi.frames.first()?Nn.window.requestAnimationFrame(Xi._draw):null}},Hi=function(t){var e=t.start,n=t.runner.duration();return{start:e,duration:n,end:e+n,runner:t.runner}},Gi=function(){var t=Nn.window;return(t.performance||t.Date).now()},Bi=function(t){function n(){var t,e=0<arguments.length&&void 0!==arguments[0]?arguments[0]:Gi;return Ln(this,n),(t=Mr(this,Er(n).call(this)))._timeSource=e,t._startTime=0,t._speed=1,t._persist=0,t._nextFrame=null,t._paused=!0,t._runners=[],t._order=[],t._time=0,t._lastSourceTime=0,t._lastStepTime=0,t._step=t._step.bind(jr(jr(t))),t}return Pr(n,Hr),br(n,[{key:"schedule",value:function(t,e,n){if(null==t)return this._runners.map(Hi).sort(function(t,e){return t.runner.id-e.runner.id});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)}return t.unschedule(),t.timeline(this),this._runners[t.id]={persist:this.persist(),runner:t,start:r+e},this._order.push(t.id),this.updateTime()._continue(),this}},{key:"unschedule",value:function(t){var e=this._order.indexOf(t.id);return e<0||(delete this._runners[t.id],this._order.splice(e,1),t.timeline(null)),this}},{key:"getEndTime",value:function(){var t=this._runners[this._order[this._order.length-1]],e=t?t.runner.duration():0;return(t?t.start:0)+e}},{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.getEndTime()+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:"_step",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=!1,s=0,u=this._order.length;s<u;s++){var o=this._runners[this._order[s]],a=o.runner,h=r,l=this._time-o.start;if(l<=0)i=!0,a.reset();else if(l<h&&(h=l),a.active())if(a.step(h).done){if(!0!==o.persist){a.duration()-a.time()+this._time+this._persist<this._time&&(delete this._runners[this._order[s]],this._order.splice(s--,1)&&--u,a.timeline(null))}}else i=!0}return i&&!(this._speed<0&&0===this._time)||this._order.length&&this._speed<0&&0<this._time?this._continue():(this.fire("finished"),this.pause()),this}},{key:"_continue",value:function(){var t=0<arguments.length&&void 0!==arguments[0]&&arguments[0];return Xi.cancelFrame(this._nextFrame),this._nextFrame=null,t?this._step(!0):(this._paused||(this._nextFrame=Xi.frame(this._step)),this)}},{key:"active",value:function(){return!!this._nextFrame}}]),n}();cn({Element:{timeline:function(){return this._timeline=this._timeline||new Bi,this._timeline}}});var Vi=function(t){function s(t){var e;return Ln(this,s),(e=Mr(this,Er(s).call(this))).id=s.id++,t="function"==typeof(t=null==t?Br.duration:t)?new xi(t):t,e._element=null,e._timeline=null,e.done=!1,e._queue=[],e._duration="number"==typeof t&&t,e._isDeclarative=t instanceof xi,e._stepper=e._isDeclarative?t:new ki,e._history={},e.enabled=!0,e._time=0,e._lastTime=0,e._reseted=!0,e.transforms=new Ir,e.transformId=1,e._haveReversed=!1,e._reverse=!1,e._loopsDone=0,e._swing=!1,e._wait=0,e._times=1,e}return Pr(s,Hr),br(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 Bi||(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"===Wt(t)&&(e=t.swing,n=t.wait,t=t.times),this._times=t||1/0,this._swing=e||!1,this._wait=n||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||Gr,runner:e||Gr,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("finish",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:"position",value:function(t){var e,n=this._time,i=this._duration,s=this._wait,r=this._times,u=this._swing,o=this._reverse;if(null==t){var a=function(t){var e=u*Math.floor(t%(2*(s+i))/(s+i)),n=e&&!o||!e&&o,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=u&&l%2==0;return e=l+(c&&!o||o&&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<this._time&&this.time>r;this._lastTime=this._time,i&&this.fire("start",this);var u=this._isDeclarative;if(this.done=!u&&!s&&this._time>=r,this._reseted=!1,n||u){this._initialise(n),this.transforms=new Ir;var o=this._run(u?t:e);this.fire("step",this)}return this.done=this.done||o&&u,this.done&&this.fire("finish",this),this}},{key:"reset",value:function(){return this._reseted||(this.loops(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 ki(t),this}},{key:"active",value:function(t){return null==t?this.enabled:(this.enabled=t,this)}},{key:"_rememberMorpher",value:function(t,e){this._history[t]={morpher:e,caller:this._queue[this._queue.length-1]}}},{key:"_tryRetarget",value:function(t,e){if(this._history[t]){if(!this._history[t].caller.initialised){var n=this._queue.indexOf(this._history[t].caller);return this._queue.splice(n,1),!1}this._history[t].caller.retarget?this._history[t].caller.retarget(e):this._history[t].morpher.to(e),this._history[t].caller.finished=!1;var r=this.timeline();return r&&r._continue(),!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 Ir,this}},{key:"clearTransformsFromQueue",value:function(){this.done||(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||Br.delay,n=n||"last","object"!==Wt(t=t||Br.duration)||t instanceof _i||(e=t.delay||e,n=t.when||n,i=t.swing||i,r=t.times||r,s=t.wait||s,t=t.duration||Br.duration),{duration:t,delay:e,swing:i,times:r,wait:s,when:n}}}]),s}();Vi.id=0;var Wi=function(){function r(){var t=0<arguments.length&&void 0!==arguments[0]?arguments[0]:new Ir,e=1<arguments.length&&void 0!==arguments[1]?arguments[1]:-1,n=!(2<arguments.length&&void 0!==arguments[2])||arguments[2];Ln(this,r),this.transforms=t,this.id=e,this.done=n}return br(r,[{key:"clearTransformsFromQueue",value:function(){}}]),r}();Wn([Vi,Wi],{mergeWith:function(t){return new Wi(t.transforms.lmultiply(this.transforms),t.id)}});var Qi=function(t,e){return t.lmultiplyO(e)},Ui=function(t){return t.transforms};var Ji=function(){function t(){Ln(this,t),this.runners=[],this.ids=[]}return br(t,[{key:"add",value:function(t){if(!this.runners.includes(t)){var n=t.id+1,e=this.ids.reduce(function(t,e){return t<e&&e<n?e:t},0),r=this.ids.indexOf(e)+1;return this.ids.splice(r,0,n),this.runners.splice(r,0,t),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&&(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),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 Wi).forEach(function(t){return t.clearTransformsFromQueue()}),this}}]),t}(),$i=0;cn({Element:{animate:function(t,e,n){var r=Vi.sanitise(t,e,n),i=this.timeline();return new Vi(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(Ui).reduce(Qi,new Ir)},addRunner:function(t){this._transformationRunners.add(t),Xi.transform_frame(function(){var t=this._transformationRunners.runners.map(Ui).reduce(Qi,new Ir);this.transform(t),this._transformationRunners.merge(),1===this._transformationRunners.length()&&(this._frameId=null)}.bind(this),this._frameId)},_prepareRunner:function(){null==this._frameId&&(this._transformationRunners=(new Ji).add(new Wi(new Ir(this))),this._frameId=$i++)}}}),Wn(Vi,{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"===Wt(n))for(var r in t)this.styleAttr(e,r,t[r]);var i=new Ni(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,e){var n=new Ni(this._stepper).to(new Ur(t));return this.queue(function(){n=n.from(this.zoom())},function(t){return this.element().zoom(n.at(t),e),n.done()}),this},transform:function(v,d,y){if(d=v.relative||d,this._isDeclarative&&!d&&this._tryRetarget("transform",v))return this;var p=Ir.isMatrixLike(v);y=null!=v.affine?v.affine:null!=y?y:!p;var m,g,w,b,_,k=new Ni(this._stepper).type(y?Di:Ir);return this.queue(function(){g=g||this.element(),m=m||An(v,g),_=new Ir(d?void 0:g),g.addRunner(this),d||g._clearTransformRunnersBefore(this)},function(t){d||this.clearTransform();var e=new Nr(m).transform(g._currentTransform(this)),n=e.x,r=e.y,i=new Ir(Kr({},v,{origin:[n,r]})),s=this._isDeclarative&&w?w:_;if(y){i=i.decompose(n,r),s=s.decompose(n,r);var u=i.rotate,o=s.rotate,a=[u-360,u,u+360],h=a.map(function(t){return Math.abs(t-o)}),l=Math.min.apply(Math,be(h)),c=h.indexOf(l);i.rotate=a[c]}d&&(p||(i.rotate=v.rotate||0),this._isDeclarative&&b&&(s.rotate=b)),k.from(s),k.to(i);var f=k.at(t);return b=f.rotate,w=new Ir(f),this.addTransform(w),k.done()},function(t){(t.origin||"center").toString()!==(v.origin||"center").toString()&&(m=An(v,g)),v=Kr({},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 Ur(t),this._tryRetarget(e,t))return this;var n=new Ni(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 Ur(t))}),this._rememberMorpher(e,n),this},_queueObject:function(e,t){if(this._tryRetarget(e,t))return this;var n=new Ni(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 Ur(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]);var i=this._element.MorphArray().to(t);return this.queue(function(){i.from(this._element.array())},function(t){this._element.plot(i.at(t))}),this},leading:function(t){return this._queueNumber("leading",t)},viewbox:function(t,e,n,r){return this._queueObject("viewbox",new Fr(t,e,n,r))},update:function(t){return"object"!==Wt(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)}}),Wn(Vi,{rx:Zr,ry:ti,from:ai,to:hi});var Ki=function(t){function Svg(t){var e;return Ln(this,Svg),(e=Mr(this,Er(Svg).call(this,qn("svg",t),t))).namespace(),e}return Pr(Svg,Container),br(Svg,[{key:"isRoot",value:function(){return!(this.node.parentNode&&this.node.parentNode instanceof Nn.window.SVGElement&&"#document"!==this.node.parentNode.nodeName)}},{key:"root",value:function(){return this.isRoot()?this:Tr(Er(Svg.prototype),"root",this).call(this)}},{key:"namespace",value:function(){return this.isRoot()?this.attr({xmlns:Mn,version:"1.1"}).attr("xmlns:xlink",Tn,En).attr("xmlns:svgjs",Cn,En):this.root().namespace()}},{key:"defs",value:function(){return this.isRoot()?Yn(this.node.getElementsByTagName("defs")[0])||this.put(new Defs):this.root().defs()}},{key:"parent",value:function(t){return this.isRoot()?"#document"===this.node.parentNode.nodeName?null:Yn(this.node.parentNode):Tr(Er(Svg.prototype),"parent",this).call(this,t)}},{key:"clear",value:function(){for(;this.node.hasChildNodes();)this.node.removeChild(this.node.lastChild);return this}}]),Svg}();cn({Container:{nested:Qn(function(){return this.put(new Ki)})}}),Xn(Ki,"Svg",!0);var Zi=function(t){function e(t){return Ln(this,e),Mr(this,Er(e).call(this,qn("symbol",t),t))}return Pr(e,Container),e}();cn({Container:{symbol:Qn(function(){return this.put(new Zi)})}}),Xn(Zi);var ts=Object.freeze({plain:function(t){return!1===this._build&&this.clear(),this.node.appendChild(Nn.document.createTextNode(t)),this},length:function(){return this.node.getComputedTextLength()}}),Text=function(t){function Text(t){var e;return Ln(this,Text),(e=Mr(this,Er(Text).call(this,qn("text",t),t))).dom.leading=new Ur(1.3),e._rebuild=!0,e._build=!1,e.attr("font-family",Vr["font-family"]),e}return Pr(Text,Shape),br(Text,[{key:"x",value:function(t){return null==t?this.attr("x"):this.attr("x",t)}},{key:"y",value:function(t){var e=this.attr("y"),n="number"==typeof e?e-this.bbox().y:0;return null==t?"number"==typeof e?e-n:e:this.attr("y","number"==typeof t?t+n:t)}},{key:"cx",value:function(t){return null==t?this.bbox().cx:this.x(t-this.bbox().width/2)}},{key:"cy",value:function(t){return null==t?this.bbox().cy:this.y(t-this.bbox().height/2)}},{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===Yn(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,u=(t=t.split("\n")).length;s<u;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 Ur(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=Nn.window.getComputedStyle(this.node).getPropertyValue("font-size"),e=i*new Ur(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 Ur(t.leading||1.3),this}}]),Text}();Wn(Text,ts),cn({Container:{text:Qn(function(t){return this.put(new Text).text(t)}),plain:Qn(function(t){return this.put(new Text).plain(t)})}}),Xn(Text);var Tspan=function(t){function Tspan(t){return Ln(this,Tspan),Mr(this,Er(Tspan).call(this,qn("tspan",t),t))}return Pr(Tspan,Text),br(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:"newLine",value:function(){var t=this.parent(Text);return this.dom.newLined=!0,this.dy(t.dom.leading*t.attr("font-size")).attr("x",t.x())}}]),Tspan}();Wn(Tspan,ts),cn({Tspan:{tspan:Qn(function(t){var e=new Tspan;return this._build||this.clear(),this.node.appendChild(e.node),e.text(t)})}}),Xn(Tspan);var ClipPath=function(t){function ClipPath(t){return Ln(this,ClipPath),Mr(this,Er(ClipPath).call(this,qn("clipPath",t),t))}return Pr(ClipPath,Container),br(ClipPath,[{key:"remove",value:function(){return this.targets().forEach(function(t){t.unclip()}),Tr(Er(ClipPath.prototype),"remove",this).call(this)}},{key:"targets",value:function(){return Xr('svg [clip-path*="'+this.id()+'"]')}}]),ClipPath}();cn({Container:{clip:Qn(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")}}}),Xn(ClipPath);var G=function(t){function G(t){return Ln(this,G),Mr(this,Er(G).call(this,qn("g",t),t))}return Pr(G,Container),G}();cn({Element:{group:Qn(function(){return this.put(new G)})}}),Xn(G);var A=function(t){function A(t){return Ln(this,A),Mr(this,Er(A).call(this,qn("a",t),t))}return Pr(A,Container),br(A,[{key:"to",value:function(t){return this.attr("href",t,Tn)}},{key:"target",value:function(t){return this.attr("target",t)}}]),A}();cn({Container:{link:Qn(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)}}}),Xn(A);var Mask=function(t){function Mask(t){return Ln(this,Mask),Mr(this,Er(Mask).call(this,qn("mask",t),t))}return Pr(Mask,Container),br(Mask,[{key:"remove",value:function(){return this.targets().forEach(function(t){t.unmask()}),Tr(Er(Mask.prototype),"remove",this).call(this)}},{key:"targets",value:function(){return Xr('svg [mask*="'+this.id()+'"]')}}]),Mask}();cn({Container:{mask:Qn(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")}}}),Xn(Mask);var Style=function(t){function Style(t){return Ln(this,Style),Mr(this,Er(Style).call(this,qn("style",t),t))}return Pr(Style,Element),br(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",Kr({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+=xn(r)+":"+e[r]+";";return n+="}"}(t,e))}}]),Style}();cn("Dom",{style:Qn(function(t,e){return this.put(new Style).rule(t,e)}),fontface:Qn(function(t,e,n){return this.put(new Style).font(t,e,n)})}),Xn(Style);var es,ns,rs,is,ss,us,os,as,hs,ls=et("species"),cs=(rs=1==(es=5),is=2==es,ss=3==es,us=4==es,os=6==es,as=5==es||os,hs=ns||function(t,e){return Oe(n=t)&&("function"!=typeof(r=n.constructor)||r!==Array&&!Oe(r.prototype)||(r=void 0),g(r)&&null===(r=r[ls])&&(r=void 0)),new(void 0===r?Array:r)(e);var n,r},function(t,e,n){for(var r,i,s=K(t),u=T(s),o=b(e,n,3),a=R(u.length),h=0,l=rs?hs(t,a):is?hs(t,0):void 0;h<a;h++)if((as||h in u)&&(i=o(r=u[h],h,s),es))if(rs)l[h]=i;else if(i)switch(es){case 3:return!0;case 5:return r;case 6:return h;case 2:l.push(r)}else if(us)return!1;return os?-1:ss||us?us:l}),fs="find",vs=!0;fs in[]&&Array(1)[fs](function(){vs=!1}),j(j.P+j.F*vs,"Array",{find:function(t){return cs(this,t,1<arguments.length?arguments[1]:void 0)}}),it(fs);var TextPath=function(t){function TextPath(t){return Ln(this,TextPath),Mr(this,Er(TextPath).call(this,qn("textPath",t),t))}return Pr(TextPath,Text),br(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}();cn({Container:{textPath:Qn(function(t,e){return this.defs().path(e).text(t).addTo(this)})},Text:{path:Qn(function(t){var e=new TextPath;return t instanceof Path||(t=this.root().defs().path(t)),e.attr("href","#"+t,Tn),this.put(e)}),textPath:function(){return this.find("textPath")[0]}},Path:{text:Qn(function(t){if(t instanceof Text){var e=t.text();return t.clear().path(this).text(e)}return this.parent().put(new Text).path(this).text(t)}),targets:function(){return Xr('svg [href*="'+this.id()+'"]')}}}),TextPath.prototype.MorphArray=ji,Xn(TextPath);var Use=function(t){function Use(t){return Ln(this,Use),Mr(this,Er(Use).call(this,qn("use",t),t))}return Pr(Use,Shape),br(Use,[{key:"element",value:function(t,e){return this.attr("href",(e||"")+"#"+t,Tn)}}]),Use}();cn({Container:{use:Qn(function(t,e){return this.put(new Use).element(t,e)})}}),Xn(Use);var ds=In;Wn([Ki,Zi,Image,Pattern,Marker],fn("viewbox")),Wn([Line,Polyline,Polygon,Path],fn("marker")),Wn(Text,fn("Text")),Wn(Path,fn("Path")),Wn(Defs,fn("Defs")),Wn([Text,Tspan],fn("Tspan")),Wn([Rect,Ellipse,Circle,Gradient],fn("radius")),Wn(Hr,fn("EventTarget")),Wn(Dom,fn("Dom")),Wn(Element,fn("Element")),Wn(Shape,fn("Shape")),Wn(Container,fn("Container")),Wn(Vi,fn("Runner")),Yr.extend(be(new Set(ln))),zi([Ur,Ar,Fr,Ir,Qr,fi,ji]),Ii();var ys=Object.freeze({Morphable:Ni,registerMorphableType:zi,makeMorphable:Ii,TransformBag:Di,ObjectBag:Fi,NonMorphable:Li,defaults:Wr,utils:jn,namespaces:Pn,regex:fr,SVG:ds,parser:Lr,find:Xr,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;Nn.window=t,Nn.document=e},Animator:Xi,Controller:xi,Ease:ki,PID:Ai,Spring:Si,easing:bi,Queue:Yi,Runner:Vi,Timeline:Bi,Array:Qr,Box:Fr,Color:Ar,EventTarget:Hr,Matrix:Ir,Number:Ur,PathArray:ji,Point:Nr,PointArray:fi,List:Yr,Circle:Circle,ClipPath:ClipPath,Container:Container,Defs:Defs,Dom:Dom,Element:Element,Ellipse:Ellipse,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:Ki,Symbol:Zi,Text:Text,TextPath:TextPath,Tspan:Tspan,Use:Use,on:pr,off:mr,dispatch:gr,root:Rn,makeNode:zn,makeInstance:In,nodeOrNew:qn,adopt:Yn,register:Xn,getClass:Hn,eid:Bn,assignNewId:Vn,extend:Wn,extendWithAttrCheck:function(){for(var t=arguments.length,e=new Array(t),n=0;n<t;n++)e[n]=arguments[n];Wn.apply(void 0,e.concat([!0]))},wrapWithAttrCheck:Qn});function ps(t){return In(t)}return Object.assign(ps,ys),ps}(); +//# sourceMappingURL=svg.min.js.map |