3 lines
40 KiB
JavaScript
3 lines
40 KiB
JavaScript
function asyncGeneratorStep(t,e,n,r,i,a,s){try{var h=t[a](s),o=h.value}catch(t){return void n(t)}h.done?e(o):Promise.resolve(o).then(r,i)}function _classCallCheck(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function _defineProperties(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 _createClass(t,e,n){return e&&_defineProperties(t.prototype,e),n&&_defineProperties(t,n),t}function _inherits(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&&_setPrototypeOf(t,e)}function _getPrototypeOf(t){return(_getPrototypeOf=Object.setPrototypeOf?Object.getPrototypeOf:function _getPrototypeOf(t){return t.__proto__||Object.getPrototypeOf(t)})(t)}function _setPrototypeOf(t,e){return(_setPrototypeOf=Object.setPrototypeOf||function _setPrototypeOf(t,e){return t.__proto__=e,t})(t,e)}function _possibleConstructorReturn(t,e){return!e||"object"!=typeof e&&"function"!=typeof e?function _assertThisInitialized(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(t):e}function _createSuper(t){var e=function _isNativeReflectConstruct(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],(function(){}))),!0}catch(t){return!1}}();return function _createSuperInternal(){var n,r=_getPrototypeOf(t);if(e){var i=_getPrototypeOf(this).constructor;n=Reflect.construct(r,arguments,i)}else n=r.apply(this,arguments);return _possibleConstructorReturn(this,n)}}!function(){if(!("SVGPathSeg"in window)){var t=function(){function _SVGPathSeg(t,e,n){_classCallCheck(this,_SVGPathSeg),this.pathSegType=t,this.pathSegTypeAsLetter=e,this._owningPathSegList=n}return _createClass(_SVGPathSeg,[{key:"_segmentChanged",value:function _segmentChanged(){this._owningPathSegList&&this._owningPathSegList.segmentChanged(this)}}]),_SVGPathSeg}();t.prototype.classname="SVGPathSeg",t.PATHSEG_UNKNOWN=0,t.PATHSEG_CLOSEPATH=1,t.PATHSEG_MOVETO_ABS=2,t.PATHSEG_MOVETO_REL=3,t.PATHSEG_LINETO_ABS=4,t.PATHSEG_LINETO_REL=5,t.PATHSEG_CURVETO_CUBIC_ABS=6,t.PATHSEG_CURVETO_CUBIC_REL=7,t.PATHSEG_CURVETO_QUADRATIC_ABS=8,t.PATHSEG_CURVETO_QUADRATIC_REL=9,t.PATHSEG_ARC_ABS=10,t.PATHSEG_ARC_REL=11,t.PATHSEG_LINETO_HORIZONTAL_ABS=12,t.PATHSEG_LINETO_HORIZONTAL_REL=13,t.PATHSEG_LINETO_VERTICAL_ABS=14,t.PATHSEG_LINETO_VERTICAL_REL=15,t.PATHSEG_CURVETO_CUBIC_SMOOTH_ABS=16,t.PATHSEG_CURVETO_CUBIC_SMOOTH_REL=17,t.PATHSEG_CURVETO_QUADRATIC_SMOOTH_ABS=18,t.PATHSEG_CURVETO_QUADRATIC_SMOOTH_REL=19;var e=function(e){_inherits(_SVGPathSegClosePath,e);var n=_createSuper(_SVGPathSegClosePath);function _SVGPathSegClosePath(e){return _classCallCheck(this,_SVGPathSegClosePath),n.call(this,t.PATHSEG_CLOSEPATH,"z",e)}return _createClass(_SVGPathSegClosePath,[{key:"toString",value:function toString(){return"[object SVGPathSegClosePath]"}},{key:"_asPathString",value:function _asPathString(){return this.pathSegTypeAsLetter}},{key:"clone",value:function clone(){return new _SVGPathSegClosePath(void 0)}}]),_SVGPathSegClosePath}(t),n=function(e){_inherits(_SVGPathSegMovetoAbs,e);var n=_createSuper(_SVGPathSegMovetoAbs);function _SVGPathSegMovetoAbs(e,r,i){var a;return _classCallCheck(this,_SVGPathSegMovetoAbs),(a=n.call(this,t.PATHSEG_MOVETO_ABS,"M",e))._x=r,a._y=i,a}return _createClass(_SVGPathSegMovetoAbs,[{key:"toString",value:function toString(){return"[object SVGPathSegMovetoAbs]"}},{key:"_asPathString",value:function _asPathString(){return this.pathSegTypeAsLetter+" "+this._x+" "+this._y}},{key:"clone",value:function clone(){return new _SVGPathSegMovetoAbs(void 0,this._x,this._y)}}]),_SVGPathSegMovetoAbs}(t);Object.defineProperties(n.prototype,{x:{get:function get(){return this._x},set:function set(t){this._x=t,this._segmentChanged()},enumerable:!0},y:{get:function get(){return this._y},set:function set(t){this._y=t,this._segmentChanged()},enumerable:!0}});var r=function(e){_inherits(_SVGPathSegMovetoRel,e);var n=_createSuper(_SVGPathSegMovetoRel);function _SVGPathSegMovetoRel(e,r,i){var a;return _classCallCheck(this,_SVGPathSegMovetoRel),(a=n.call(this,t.PATHSEG_MOVETO_REL,"m",e))._x=r,a._y=i,a}return _createClass(_SVGPathSegMovetoRel,[{key:"toString",value:function toString(){return"[object SVGPathSegMovetoRel]"}},{key:"_asPathString",value:function _asPathString(){return this.pathSegTypeAsLetter+" "+this._x+" "+this._y}},{key:"clone",value:function clone(){return new _SVGPathSegMovetoRel(void 0,this._x,this._y)}}]),_SVGPathSegMovetoRel}(t);Object.defineProperties(r.prototype,{x:{get:function get(){return this._x},set:function set(t){this._x=t,this._segmentChanged()},enumerable:!0},y:{get:function get(){return this._y},set:function set(t){this._y=t,this._segmentChanged()},enumerable:!0}});var i=function(e){_inherits(_SVGPathSegLinetoAbs,e);var n=_createSuper(_SVGPathSegLinetoAbs);function _SVGPathSegLinetoAbs(e,r,i){var a;return _classCallCheck(this,_SVGPathSegLinetoAbs),(a=n.call(this,t.PATHSEG_LINETO_ABS,"L",e))._x=r,a._y=i,a}return _createClass(_SVGPathSegLinetoAbs,[{key:"toString",value:function toString(){return"[object SVGPathSegLinetoAbs]"}},{key:"_asPathString",value:function _asPathString(){return this.pathSegTypeAsLetter+" "+this._x+" "+this._y}},{key:"clone",value:function clone(){return new _SVGPathSegLinetoAbs(void 0,this._x,this._y)}}]),_SVGPathSegLinetoAbs}(t);Object.defineProperties(i.prototype,{x:{get:function get(){return this._x},set:function set(t){this._x=t,this._segmentChanged()},enumerable:!0},y:{get:function get(){return this._y},set:function set(t){this._y=t,this._segmentChanged()},enumerable:!0}});var a=function(e){_inherits(_SVGPathSegLinetoRel,e);var n=_createSuper(_SVGPathSegLinetoRel);function _SVGPathSegLinetoRel(e,r,i){var a;return _classCallCheck(this,_SVGPathSegLinetoRel),(a=n.call(this,t.PATHSEG_LINETO_REL,"l",e))._x=r,a._y=i,a}return _createClass(_SVGPathSegLinetoRel,[{key:"toString",value:function toString(){return"[object SVGPathSegLinetoRel]"}},{key:"_asPathString",value:function _asPathString(){return this.pathSegTypeAsLetter+" "+this._x+" "+this._y}},{key:"clone",value:function clone(){return new _SVGPathSegLinetoRel(void 0,this._x,this._y)}}]),_SVGPathSegLinetoRel}(t);Object.defineProperties(a.prototype,{x:{get:function get(){return this._x},set:function set(t){this._x=t,this._segmentChanged()},enumerable:!0},y:{get:function get(){return this._y},set:function set(t){this._y=t,this._segmentChanged()},enumerable:!0}});var s=function(e){_inherits(_SVGPathSegCurvetoCubicAbs,e);var n=_createSuper(_SVGPathSegCurvetoCubicAbs);function _SVGPathSegCurvetoCubicAbs(e,r,i,a,s,h,o){var _;return _classCallCheck(this,_SVGPathSegCurvetoCubicAbs),(_=n.call(this,t.PATHSEG_CURVETO_CUBIC_ABS,"C",e))._x=r,_._y=i,_._x1=a,_._y1=s,_._x2=h,_._y2=o,_}return _createClass(_SVGPathSegCurvetoCubicAbs,[{key:"toString",value:function toString(){return"[object SVGPathSegCurvetoCubicAbs]"}},{key:"_asPathString",value:function _asPathString(){return this.pathSegTypeAsLetter+" "+this._x1+" "+this._y1+" "+this._x2+" "+this._y2+" "+this._x+" "+this._y}},{key:"clone",value:function clone(){return new _SVGPathSegCurvetoCubicAbs(void 0,this._x,this._y,this._x1,this._y1,this._x2,this._y2)}}]),_SVGPathSegCurvetoCubicAbs}(t);Object.defineProperties(s.prototype,{x:{get:function get(){return this._x},set:function set(t){this._x=t,this._segmentChanged()},enumerable:!0},y:{get:function get(){return this._y},set:function set(t){this._y=t,this._segmentChanged()},enumerable:!0},x1:{get:function get(){return this._x1},set:function set(t){this._x1=t,this._segmentChanged()},enumerable:!0},y1:{get:function get(){return this._y1},set:function set(t){this._y1=t,this._segmentChanged()},enumerable:!0},x2:{get:function get(){return this._x2},set:function set(t){this._x2=t,this._segmentChanged()},enumerable:!0},y2:{get:function get(){return this._y2},set:function set(t){this._y2=t,this._segmentChanged()},enumerable:!0}});var h=function(e){_inherits(_SVGPathSegCurvetoCubicRel,e);var n=_createSuper(_SVGPathSegCurvetoCubicRel);function _SVGPathSegCurvetoCubicRel(e,r,i,a,s,h,o){var _;return _classCallCheck(this,_SVGPathSegCurvetoCubicRel),(_=n.call(this,t.PATHSEG_CURVETO_CUBIC_REL,"c",e))._x=r,_._y=i,_._x1=a,_._y1=s,_._x2=h,_._y2=o,_}return _createClass(_SVGPathSegCurvetoCubicRel,[{key:"toString",value:function toString(){return"[object SVGPathSegCurvetoCubicRel]"}},{key:"_asPathString",value:function _asPathString(){return this.pathSegTypeAsLetter+" "+this._x1+" "+this._y1+" "+this._x2+" "+this._y2+" "+this._x+" "+this._y}},{key:"clone",value:function clone(){return new _SVGPathSegCurvetoCubicRel(void 0,this._x,this._y,this._x1,this._y1,this._x2,this._y2)}}]),_SVGPathSegCurvetoCubicRel}(t);Object.defineProperties(h.prototype,{x:{get:function get(){return this._x},set:function set(t){this._x=t,this._segmentChanged()},enumerable:!0},y:{get:function get(){return this._y},set:function set(t){this._y=t,this._segmentChanged()},enumerable:!0},x1:{get:function get(){return this._x1},set:function set(t){this._x1=t,this._segmentChanged()},enumerable:!0},y1:{get:function get(){return this._y1},set:function set(t){this._y1=t,this._segmentChanged()},enumerable:!0},x2:{get:function get(){return this._x2},set:function set(t){this._x2=t,this._segmentChanged()},enumerable:!0},y2:{get:function get(){return this._y2},set:function set(t){this._y2=t,this._segmentChanged()},enumerable:!0}});var o=function(e){_inherits(_SVGPathSegCurvetoQuadraticAbs,e);var n=_createSuper(_SVGPathSegCurvetoQuadraticAbs);function _SVGPathSegCurvetoQuadraticAbs(e,r,i,a,s){var h;return _classCallCheck(this,_SVGPathSegCurvetoQuadraticAbs),(h=n.call(this,t.PATHSEG_CURVETO_QUADRATIC_ABS,"Q",e))._x=r,h._y=i,h._x1=a,h._y1=s,h}return _createClass(_SVGPathSegCurvetoQuadraticAbs,[{key:"toString",value:function toString(){return"[object SVGPathSegCurvetoQuadraticAbs]"}},{key:"_asPathString",value:function _asPathString(){return this.pathSegTypeAsLetter+" "+this._x1+" "+this._y1+" "+this._x+" "+this._y}},{key:"clone",value:function clone(){return new _SVGPathSegCurvetoQuadraticAbs(void 0,this._x,this._y,this._x1,this._y1)}}]),_SVGPathSegCurvetoQuadraticAbs}(t);Object.defineProperties(o.prototype,{x:{get:function get(){return this._x},set:function set(t){this._x=t,this._segmentChanged()},enumerable:!0},y:{get:function get(){return this._y},set:function set(t){this._y=t,this._segmentChanged()},enumerable:!0},x1:{get:function get(){return this._x1},set:function set(t){this._x1=t,this._segmentChanged()},enumerable:!0},y1:{get:function get(){return this._y1},set:function set(t){this._y1=t,this._segmentChanged()},enumerable:!0}});var _=function(e){_inherits(_SVGPathSegCurvetoQuadraticRel,e);var n=_createSuper(_SVGPathSegCurvetoQuadraticRel);function _SVGPathSegCurvetoQuadraticRel(e,r,i,a,s){var h;return _classCallCheck(this,_SVGPathSegCurvetoQuadraticRel),(h=n.call(this,t.PATHSEG_CURVETO_QUADRATIC_REL,"q",e))._x=r,h._y=i,h._x1=a,h._y1=s,h}return _createClass(_SVGPathSegCurvetoQuadraticRel,[{key:"toString",value:function toString(){return"[object SVGPathSegCurvetoQuadraticRel]"}},{key:"_asPathString",value:function _asPathString(){return this.pathSegTypeAsLetter+" "+this._x1+" "+this._y1+" "+this._x+" "+this._y}},{key:"clone",value:function clone(){return new _SVGPathSegCurvetoQuadraticRel(void 0,this._x,this._y,this._x1,this._y1)}}]),_SVGPathSegCurvetoQuadraticRel}(t);Object.defineProperties(_.prototype,{x:{get:function get(){return this._x},set:function set(t){this._x=t,this._segmentChanged()},enumerable:!0},y:{get:function get(){return this._y},set:function set(t){this._y=t,this._segmentChanged()},enumerable:!0},x1:{get:function get(){return this._x1},set:function set(t){this._x1=t,this._segmentChanged()},enumerable:!0},y1:{get:function get(){return this._y1},set:function set(t){this._y1=t,this._segmentChanged()},enumerable:!0}});var u=function(e){_inherits(_SVGPathSegArcAbs,e);var n=_createSuper(_SVGPathSegArcAbs);function _SVGPathSegArcAbs(e,r,i,a,s,h,o,_){var u;return _classCallCheck(this,_SVGPathSegArcAbs),(u=n.call(this,t.PATHSEG_ARC_ABS,"A",e))._x=r,u._y=i,u._r1=a,u._r2=s,u._angle=h,u._largeArcFlag=o,u._sweepFlag=_,u}return _createClass(_SVGPathSegArcAbs,[{key:"toString",value:function toString(){return"[object SVGPathSegArcAbs]"}},{key:"_asPathString",value:function _asPathString(){return this.pathSegTypeAsLetter+" "+this._r1+" "+this._r2+" "+this._angle+" "+(this._largeArcFlag?"1":"0")+" "+(this._sweepFlag?"1":"0")+" "+this._x+" "+this._y}},{key:"clone",value:function clone(){return new _SVGPathSegArcAbs(void 0,this._x,this._y,this._r1,this._r2,this._angle,this._largeArcFlag,this._sweepFlag)}}]),_SVGPathSegArcAbs}(t);Object.defineProperties(u.prototype,{x:{get:function get(){return this._x},set:function set(t){this._x=t,this._segmentChanged()},enumerable:!0},y:{get:function get(){return this._y},set:function set(t){this._y=t,this._segmentChanged()},enumerable:!0},r1:{get:function get(){return this._r1},set:function set(t){this._r1=t,this._segmentChanged()},enumerable:!0},r2:{get:function get(){return this._r2},set:function set(t){this._r2=t,this._segmentChanged()},enumerable:!0},angle:{get:function get(){return this._angle},set:function set(t){this._angle=t,this._segmentChanged()},enumerable:!0},largeArcFlag:{get:function get(){return this._largeArcFlag},set:function set(t){this._largeArcFlag=t,this._segmentChanged()},enumerable:!0},sweepFlag:{get:function get(){return this._sweepFlag},set:function set(t){this._sweepFlag=t,this._segmentChanged()},enumerable:!0}});var c=function(e){_inherits(_SVGPathSegArcRel,e);var n=_createSuper(_SVGPathSegArcRel);function _SVGPathSegArcRel(e,r,i,a,s,h,o,_){var u;return _classCallCheck(this,_SVGPathSegArcRel),(u=n.call(this,t.PATHSEG_ARC_REL,"a",e))._x=r,u._y=i,u._r1=a,u._r2=s,u._angle=h,u._largeArcFlag=o,u._sweepFlag=_,u}return _createClass(_SVGPathSegArcRel,[{key:"toString",value:function toString(){return"[object SVGPathSegArcRel]"}},{key:"_asPathString",value:function _asPathString(){return this.pathSegTypeAsLetter+" "+this._r1+" "+this._r2+" "+this._angle+" "+(this._largeArcFlag?"1":"0")+" "+(this._sweepFlag?"1":"0")+" "+this._x+" "+this._y}},{key:"clone",value:function clone(){return new _SVGPathSegArcRel(void 0,this._x,this._y,this._r1,this._r2,this._angle,this._largeArcFlag,this._sweepFlag)}}]),_SVGPathSegArcRel}(t);Object.defineProperties(c.prototype,{x:{get:function get(){return this._x},set:function set(t){this._x=t,this._segmentChanged()},enumerable:!0},y:{get:function get(){return this._y},set:function set(t){this._y=t,this._segmentChanged()},enumerable:!0},r1:{get:function get(){return this._r1},set:function set(t){this._r1=t,this._segmentChanged()},enumerable:!0},r2:{get:function get(){return this._r2},set:function set(t){this._r2=t,this._segmentChanged()},enumerable:!0},angle:{get:function get(){return this._angle},set:function set(t){this._angle=t,this._segmentChanged()},enumerable:!0},largeArcFlag:{get:function get(){return this._largeArcFlag},set:function set(t){this._largeArcFlag=t,this._segmentChanged()},enumerable:!0},sweepFlag:{get:function get(){return this._sweepFlag},set:function set(t){this._sweepFlag=t,this._segmentChanged()},enumerable:!0}});var S=function(e){_inherits(_SVGPathSegLinetoHorizontalAbs,e);var n=_createSuper(_SVGPathSegLinetoHorizontalAbs);function _SVGPathSegLinetoHorizontalAbs(e,r){var i;return _classCallCheck(this,_SVGPathSegLinetoHorizontalAbs),(i=n.call(this,t.PATHSEG_LINETO_HORIZONTAL_ABS,"H",e))._x=r,i}return _createClass(_SVGPathSegLinetoHorizontalAbs,[{key:"toString",value:function toString(){return"[object SVGPathSegLinetoHorizontalAbs]"}},{key:"_asPathString",value:function _asPathString(){return this.pathSegTypeAsLetter+" "+this._x}},{key:"clone",value:function clone(){return new _SVGPathSegLinetoHorizontalAbs(void 0,this._x)}}]),_SVGPathSegLinetoHorizontalAbs}(t);Object.defineProperty(S.prototype,"x",{get:function get(){return this._x},set:function set(t){this._x=t,this._segmentChanged()},enumerable:!0});var g=function(e){_inherits(_SVGPathSegLinetoHorizontalRel,e);var n=_createSuper(_SVGPathSegLinetoHorizontalRel);function _SVGPathSegLinetoHorizontalRel(e,r){var i;return _classCallCheck(this,_SVGPathSegLinetoHorizontalRel),(i=n.call(this,t.PATHSEG_LINETO_HORIZONTAL_REL,"h",e))._x=r,i}return _createClass(_SVGPathSegLinetoHorizontalRel,[{key:"toString",value:function toString(){return"[object SVGPathSegLinetoHorizontalRel]"}},{key:"_asPathString",value:function _asPathString(){return this.pathSegTypeAsLetter+" "+this._x}},{key:"clone",value:function clone(){return new _SVGPathSegLinetoHorizontalRel(void 0,this._x)}}]),_SVGPathSegLinetoHorizontalRel}(t);Object.defineProperty(g.prototype,"x",{get:function get(){return this._x},set:function set(t){this._x=t,this._segmentChanged()},enumerable:!0});var l=function(e){_inherits(_SVGPathSegLinetoVerticalAbs,e);var n=_createSuper(_SVGPathSegLinetoVerticalAbs);function _SVGPathSegLinetoVerticalAbs(e,r){var i;return _classCallCheck(this,_SVGPathSegLinetoVerticalAbs),(i=n.call(this,t.PATHSEG_LINETO_VERTICAL_ABS,"V",e))._y=r,i}return _createClass(_SVGPathSegLinetoVerticalAbs,[{key:"toString",value:function toString(){return"[object SVGPathSegLinetoVerticalAbs]"}},{key:"_asPathString",value:function _asPathString(){return this.pathSegTypeAsLetter+" "+this._y}},{key:"clone",value:function clone(){return new _SVGPathSegLinetoVerticalAbs(void 0,this._y)}}]),_SVGPathSegLinetoVerticalAbs}(t);Object.defineProperty(l.prototype,"y",{get:function get(){return this._y},set:function set(t){this._y=t,this._segmentChanged()},enumerable:!0});var P=function(e){_inherits(_SVGPathSegLinetoVerticalRel,e);var n=_createSuper(_SVGPathSegLinetoVerticalRel);function _SVGPathSegLinetoVerticalRel(e,r){var i;return _classCallCheck(this,_SVGPathSegLinetoVerticalRel),(i=n.call(this,t.PATHSEG_LINETO_VERTICAL_REL,"v",e))._y=r,i}return _createClass(_SVGPathSegLinetoVerticalRel,[{key:"toString",value:function toString(){return"[object SVGPathSegLinetoVerticalRel]"}},{key:"_asPathString",value:function _asPathString(){return this.pathSegTypeAsLetter+" "+this._y}},{key:"clone",value:function clone(){return new _SVGPathSegLinetoVerticalRel(void 0,this._y)}}]),_SVGPathSegLinetoVerticalRel}(t);Object.defineProperty(P.prototype,"y",{get:function get(){return this._y},set:function set(t){this._y=t,this._segmentChanged()},enumerable:!0});var p=function(e){_inherits(_SVGPathSegCurvetoCubicSmoothAbs,e);var n=_createSuper(_SVGPathSegCurvetoCubicSmoothAbs);function _SVGPathSegCurvetoCubicSmoothAbs(e,r,i,a,s){var h;return _classCallCheck(this,_SVGPathSegCurvetoCubicSmoothAbs),(h=n.call(this,t.PATHSEG_CURVETO_CUBIC_SMOOTH_ABS,"S",e))._x=r,h._y=i,h._x2=a,h._y2=s,h}return _createClass(_SVGPathSegCurvetoCubicSmoothAbs,[{key:"toString",value:function toString(){return"[object SVGPathSegCurvetoCubicSmoothAbs]"}},{key:"_asPathString",value:function _asPathString(){return this.pathSegTypeAsLetter+" "+this._x2+" "+this._y2+" "+this._x+" "+this._y}},{key:"clone",value:function clone(){return new _SVGPathSegCurvetoCubicSmoothAbs(void 0,this._x,this._y,this._x2,this._y2)}}]),_SVGPathSegCurvetoCubicSmoothAbs}(t);Object.defineProperties(p.prototype,{x:{get:function get(){return this._x},set:function set(t){this._x=t,this._segmentChanged()},enumerable:!0},y:{get:function get(){return this._y},set:function set(t){this._y=t,this._segmentChanged()},enumerable:!0},x2:{get:function get(){return this._x2},set:function set(t){this._x2=t,this._segmentChanged()},enumerable:!0},y2:{get:function get(){return this._y2},set:function set(t){this._y2=t,this._segmentChanged()},enumerable:!0}});var f=function(e){_inherits(_SVGPathSegCurvetoCubicSmoothRel,e);var n=_createSuper(_SVGPathSegCurvetoCubicSmoothRel);function _SVGPathSegCurvetoCubicSmoothRel(e,r,i,a,s){var h;return _classCallCheck(this,_SVGPathSegCurvetoCubicSmoothRel),(h=n.call(this,t.PATHSEG_CURVETO_CUBIC_SMOOTH_REL,"s",e))._x=r,h._y=i,h._x2=a,h._y2=s,h}return _createClass(_SVGPathSegCurvetoCubicSmoothRel,[{key:"toString",value:function toString(){return"[object SVGPathSegCurvetoCubicSmoothRel]"}},{key:"_asPathString",value:function _asPathString(){return this.pathSegTypeAsLetter+" "+this._x2+" "+this._y2+" "+this._x+" "+this._y}},{key:"clone",value:function clone(){return new _SVGPathSegCurvetoCubicSmoothRel(void 0,this._x,this._y,this._x2,this._y2)}}]),_SVGPathSegCurvetoCubicSmoothRel}(t);Object.defineProperties(f.prototype,{x:{get:function get(){return this._x},set:function set(t){this._x=t,this._segmentChanged()},enumerable:!0},y:{get:function get(){return this._y},set:function set(t){this._y=t,this._segmentChanged()},enumerable:!0},x2:{get:function get(){return this._x2},set:function set(t){this._x2=t,this._segmentChanged()},enumerable:!0},y2:{get:function get(){return this._y2},set:function set(t){this._y2=t,this._segmentChanged()},enumerable:!0}});var C=function(e){_inherits(_SVGPathSegCurvetoQuadraticSmoothAbs,e);var n=_createSuper(_SVGPathSegCurvetoQuadraticSmoothAbs);function _SVGPathSegCurvetoQuadraticSmoothAbs(e,r,i){var a;return _classCallCheck(this,_SVGPathSegCurvetoQuadraticSmoothAbs),(a=n.call(this,t.PATHSEG_CURVETO_QUADRATIC_SMOOTH_ABS,"T",e))._x=r,a._y=i,a}return _createClass(_SVGPathSegCurvetoQuadraticSmoothAbs,[{key:"toString",value:function toString(){return"[object SVGPathSegCurvetoQuadraticSmoothAbs]"}},{key:"_asPathString",value:function _asPathString(){return this.pathSegTypeAsLetter+" "+this._x+" "+this._y}},{key:"clone",value:function clone(){return new _SVGPathSegCurvetoQuadraticSmoothAbs(void 0,this._x,this._y)}}]),_SVGPathSegCurvetoQuadraticSmoothAbs}(t);Object.defineProperties(C.prototype,{x:{get:function get(){return this._x},set:function set(t){this._x=t,this._segmentChanged()},enumerable:!0},y:{get:function get(){return this._y},set:function set(t){this._y=t,this._segmentChanged()},enumerable:!0}});var A=function(e){_inherits(_SVGPathSegCurvetoQuadraticSmoothRel,e);var n=_createSuper(_SVGPathSegCurvetoQuadraticSmoothRel);function _SVGPathSegCurvetoQuadraticSmoothRel(e,r,i){var a;return _classCallCheck(this,_SVGPathSegCurvetoQuadraticSmoothRel),(a=n.call(this,t.PATHSEG_CURVETO_QUADRATIC_SMOOTH_REL,"t",e))._x=r,a._y=i,a}return _createClass(_SVGPathSegCurvetoQuadraticSmoothRel,[{key:"toString",value:function toString(){return"[object SVGPathSegCurvetoQuadraticSmoothRel]"}},{key:"_asPathString",value:function _asPathString(){return this.pathSegTypeAsLetter+" "+this._x+" "+this._y}},{key:"clone",value:function clone(){return new _SVGPathSegCurvetoQuadraticSmoothRel(void 0,this._x,this._y)}}]),_SVGPathSegCurvetoQuadraticSmoothRel}(t);Object.defineProperties(A.prototype,{x:{get:function get(){return this._x},set:function set(t){this._x=t,this._segmentChanged()},enumerable:!0},y:{get:function get(){return this._y},set:function set(t){this._y=t,this._segmentChanged()},enumerable:!0}}),SVGPathElement.prototype.createSVGPathSegClosePath=function(){return new e(void 0)},SVGPathElement.prototype.createSVGPathSegMovetoAbs=function(t,e){return new n(void 0,t,e)},SVGPathElement.prototype.createSVGPathSegMovetoRel=function(t,e){return new r(void 0,t,e)},SVGPathElement.prototype.createSVGPathSegLinetoAbs=function(t,e){return new i(void 0,t,e)},SVGPathElement.prototype.createSVGPathSegLinetoRel=function(t,e){return new a(void 0,t,e)},SVGPathElement.prototype.createSVGPathSegCurvetoCubicAbs=function(t,e,n,r,i,a){return new s(void 0,t,e,n,r,i,a)},SVGPathElement.prototype.createSVGPathSegCurvetoCubicRel=function(t,e,n,r,i,a){return new h(void 0,t,e,n,r,i,a)},SVGPathElement.prototype.createSVGPathSegCurvetoQuadraticAbs=function(t,e,n,r){return new o(void 0,t,e,n,r)},SVGPathElement.prototype.createSVGPathSegCurvetoQuadraticRel=function(t,e,n,r){return new _(void 0,t,e,n,r)},SVGPathElement.prototype.createSVGPathSegArcAbs=function(t,e,n,r,i,a,s){return new u(void 0,t,e,n,r,i,a,s)},SVGPathElement.prototype.createSVGPathSegArcRel=function(t,e,n,r,i,a,s){return new c(void 0,t,e,n,r,i,a,s)},SVGPathElement.prototype.createSVGPathSegLinetoHorizontalAbs=function(t){return new S(void 0,t)},SVGPathElement.prototype.createSVGPathSegLinetoHorizontalRel=function(t){return new g(void 0,t)},SVGPathElement.prototype.createSVGPathSegLinetoVerticalAbs=function(t){return new l(void 0,t)},SVGPathElement.prototype.createSVGPathSegLinetoVerticalRel=function(t){return new P(void 0,t)},SVGPathElement.prototype.createSVGPathSegCurvetoCubicSmoothAbs=function(t,e,n,r){return new p(void 0,t,e,n,r)},SVGPathElement.prototype.createSVGPathSegCurvetoCubicSmoothRel=function(t,e,n,r){return new f(void 0,t,e,n,r)},SVGPathElement.prototype.createSVGPathSegCurvetoQuadraticSmoothAbs=function(t,e){return new C(void 0,t,e)},SVGPathElement.prototype.createSVGPathSegCurvetoQuadraticSmoothRel=function(t,e){return new A(void 0,t,e)},"getPathSegAtLength"in SVGPathElement.prototype||(SVGPathElement.prototype.getPathSegAtLength=function(t){if(void 0===t||!isFinite(t))throw new Error("Invalid arguments.");var e=document.createElementNS("http://www.w3.org/2000/svg","path");e.setAttribute("d",this.getAttribute("d"));var n=e.pathSegList.numberOfItems-1;if(n<=0)return 0;do{if(e.pathSegList.removeItem(n),t>e.getTotalLength())break;n--}while(n>0);return n}),window.SVGPathSeg=t,window.SVGPathSegClosePath=e,window.SVGPathSegMovetoAbs=n,window.SVGPathSegMovetoRel=r,window.SVGPathSegLinetoAbs=i,window.SVGPathSegLinetoRel=a,window.SVGPathSegCurvetoCubicAbs=s,window.SVGPathSegCurvetoCubicRel=h,window.SVGPathSegCurvetoQuadraticAbs=o,window.SVGPathSegCurvetoQuadraticRel=_,window.SVGPathSegArcAbs=u,window.SVGPathSegArcRel=c,window.SVGPathSegLinetoHorizontalAbs=S,window.SVGPathSegLinetoHorizontalRel=g,window.SVGPathSegLinetoVerticalAbs=l,window.SVGPathSegLinetoVerticalRel=P,window.SVGPathSegCurvetoCubicSmoothAbs=p,window.SVGPathSegCurvetoCubicSmoothRel=f,window.SVGPathSegCurvetoQuadraticSmoothAbs=C,window.SVGPathSegCurvetoQuadraticSmoothRel=A}if(!("SVGPathSegList"in window)||!("appendItem"in window.SVGPathSegList.prototype)){var y=function(){function SVGPathSegList(t){_classCallCheck(this,SVGPathSegList),this._pathElement=t,this._list=this._parsePath(this._pathElement.getAttribute("d")),this._mutationObserverConfig={attributes:!0,attributeFilter:["d"]},this._pathElementMutationObserver=new MutationObserver(this._updateListFromPathMutations.bind(this)),this._pathElementMutationObserver.observe(this._pathElement,this._mutationObserverConfig)}return _createClass(SVGPathSegList,[{key:"_checkPathSynchronizedToList",value:function _checkPathSynchronizedToList(){this._updateListFromPathMutations(this._pathElementMutationObserver.takeRecords())}},{key:"_updateListFromPathMutations",value:function _updateListFromPathMutations(t){if(this._pathElement){var e=!1;t.forEach((function(t){"d"===t.attributeName&&(e=!0)})),e&&(this._list=this._parsePath(this._pathElement.getAttribute("d")))}}},{key:"_writeListToPath",value:function _writeListToPath(){this._pathElementMutationObserver.disconnect(),this._pathElement.setAttribute("d",SVGPathSegList._pathSegArrayAsString(this._list)),this._pathElementMutationObserver.observe(this._pathElement,this._mutationObserverConfig)}},{key:"segmentChanged",value:function segmentChanged(t){this._writeListToPath()}},{key:"clear",value:function clear(){this._checkPathSynchronizedToList(),this._list.forEach((function(t){t._owningPathSegList=null})),this._list=[],this._writeListToPath()}},{key:"initialize",value:function initialize(t){return this._checkPathSynchronizedToList(),this._list=[t],t._owningPathSegList=this,this._writeListToPath(),t}},{key:"_checkValidIndex",value:function _checkValidIndex(t){if(isNaN(t)||t<0||t>=this.numberOfItems)throw new Error("INDEX_SIZE_ERR")}},{key:"getItem",value:function getItem(t){return this._checkPathSynchronizedToList(),this._checkValidIndex(t),this._list[t]}},{key:"insertItemBefore",value:function insertItemBefore(t,e){return this._checkPathSynchronizedToList(),e>this.numberOfItems&&(e=this.numberOfItems),t._owningPathSegList&&(t=t.clone()),this._list.splice(e,0,t),t._owningPathSegList=this,this._writeListToPath(),t}},{key:"replaceItem",value:function replaceItem(t,e){return this._checkPathSynchronizedToList(),t._owningPathSegList&&(t=t.clone()),this._checkValidIndex(e),this._list[e]=t,t._owningPathSegList=this,this._writeListToPath(),t}},{key:"removeItem",value:function removeItem(t){this._checkPathSynchronizedToList(),this._checkValidIndex(t);var e=this._list[t];return this._list.splice(t,1),this._writeListToPath(),e}},{key:"appendItem",value:function appendItem(t){return this._checkPathSynchronizedToList(),t._owningPathSegList&&(t=t.clone()),this._list.push(t),t._owningPathSegList=this,this._writeListToPath(),t}},{key:"_parsePath",value:function _parsePath(t){if(!t||!t.length)return[];var e=this,n=function(){function Builder(){_classCallCheck(this,Builder),this.pathSegList=[]}return _createClass(Builder,[{key:"appendSegment",value:function appendSegment(t){this.pathSegList.push(t)}}]),Builder}(),r=function(){function Source(t){_classCallCheck(this,Source),this._string=t,this._currentIndex=0,this._endIndex=this._string.length,this._previousCommand=SVGPathSeg.PATHSEG_UNKNOWN,this._skipOptionalSpaces()}return _createClass(Source,[{key:"_isCurrentSpace",value:function _isCurrentSpace(){var t=this._string[this._currentIndex];return t<=" "&&(" "===t||"\n"===t||"\t"===t||"\r"===t||"\f"===t)}},{key:"_skipOptionalSpaces",value:function _skipOptionalSpaces(){for(;this._currentIndex<this._endIndex&&this._isCurrentSpace();)this._currentIndex++;return this._currentIndex<this._endIndex}},{key:"_skipOptionalSpacesOrDelimiter",value:function _skipOptionalSpacesOrDelimiter(){return!(this._currentIndex<this._endIndex&&!this._isCurrentSpace()&&","!==this._string.charAt(this._currentIndex))&&(this._skipOptionalSpaces()&&this._currentIndex<this._endIndex&&","===this._string.charAt(this._currentIndex)&&(this._currentIndex++,this._skipOptionalSpaces()),this._currentIndex<this._endIndex)}},{key:"hasMoreData",value:function hasMoreData(){return this._currentIndex<this._endIndex}},{key:"peekSegmentType",value:function peekSegmentType(){var t=this._string[this._currentIndex];return this._pathSegTypeFromChar(t)}},{key:"_pathSegTypeFromChar",value:function _pathSegTypeFromChar(t){switch(t){case"Z":case"z":return SVGPathSeg.PATHSEG_CLOSEPATH;case"M":return SVGPathSeg.PATHSEG_MOVETO_ABS;case"m":return SVGPathSeg.PATHSEG_MOVETO_REL;case"L":return SVGPathSeg.PATHSEG_LINETO_ABS;case"l":return SVGPathSeg.PATHSEG_LINETO_REL;case"C":return SVGPathSeg.PATHSEG_CURVETO_CUBIC_ABS;case"c":return SVGPathSeg.PATHSEG_CURVETO_CUBIC_REL;case"Q":return SVGPathSeg.PATHSEG_CURVETO_QUADRATIC_ABS;case"q":return SVGPathSeg.PATHSEG_CURVETO_QUADRATIC_REL;case"A":return SVGPathSeg.PATHSEG_ARC_ABS;case"a":return SVGPathSeg.PATHSEG_ARC_REL;case"H":return SVGPathSeg.PATHSEG_LINETO_HORIZONTAL_ABS;case"h":return SVGPathSeg.PATHSEG_LINETO_HORIZONTAL_REL;case"V":return SVGPathSeg.PATHSEG_LINETO_VERTICAL_ABS;case"v":return SVGPathSeg.PATHSEG_LINETO_VERTICAL_REL;case"S":return SVGPathSeg.PATHSEG_CURVETO_CUBIC_SMOOTH_ABS;case"s":return SVGPathSeg.PATHSEG_CURVETO_CUBIC_SMOOTH_REL;case"T":return SVGPathSeg.PATHSEG_CURVETO_QUADRATIC_SMOOTH_ABS;case"t":return SVGPathSeg.PATHSEG_CURVETO_QUADRATIC_SMOOTH_REL;default:return SVGPathSeg.PATHSEG_UNKNOWN}}},{key:"_nextCommandHelper",value:function _nextCommandHelper(t,e){return("+"===t||"-"===t||"."===t||t>="0"&&t<="9")&&e!==SVGPathSeg.PATHSEG_CLOSEPATH?e===SVGPathSeg.PATHSEG_MOVETO_ABS?SVGPathSeg.PATHSEG_LINETO_ABS:e===SVGPathSeg.PATHSEG_MOVETO_REL?SVGPathSeg.PATHSEG_LINETO_REL:e:SVGPathSeg.PATHSEG_UNKNOWN}},{key:"initialCommandIsMoveTo",value:function initialCommandIsMoveTo(){if(!this.hasMoreData())return!0;var t=this.peekSegmentType();return t===SVGPathSeg.PATHSEG_MOVETO_ABS||t===SVGPathSeg.PATHSEG_MOVETO_REL}},{key:"_parseNumber",value:function _parseNumber(){var t=0,e=0,n=1,r=0,i=1,a=1,s=this._currentIndex;if(this._skipOptionalSpaces(),this._currentIndex<this._endIndex&&"+"===this._string.charAt(this._currentIndex)?this._currentIndex++:this._currentIndex<this._endIndex&&"-"===this._string.charAt(this._currentIndex)&&(this._currentIndex++,i=-1),!(this._currentIndex===this._endIndex||(this._string.charAt(this._currentIndex)<"0"||this._string.charAt(this._currentIndex)>"9")&&"."!==this._string.charAt(this._currentIndex))){for(var h=this._currentIndex;this._currentIndex<this._endIndex&&this._string.charAt(this._currentIndex)>="0"&&this._string.charAt(this._currentIndex)<="9";)this._currentIndex++;if(this._currentIndex!==h)for(var o=this._currentIndex-1,_=1;o>=h;)e+=_*(this._string.charAt(o--)-"0"),_*=10;if(this._currentIndex<this._endIndex&&"."===this._string.charAt(this._currentIndex)){if(this._currentIndex++,this._currentIndex>=this._endIndex||this._string.charAt(this._currentIndex)<"0"||this._string.charAt(this._currentIndex)>"9")return;for(;this._currentIndex<this._endIndex&&this._string.charAt(this._currentIndex)>="0"&&this._string.charAt(this._currentIndex)<="9";)n*=10,r+=(this._string.charAt(this._currentIndex)-"0")/n,this._currentIndex+=1}if(this._currentIndex!==s&&this._currentIndex+1<this._endIndex&&("e"===this._string.charAt(this._currentIndex)||"E"===this._string.charAt(this._currentIndex))&&"x"!==this._string.charAt(this._currentIndex+1)&&"m"!==this._string.charAt(this._currentIndex+1)){if(this._currentIndex++,"+"===this._string.charAt(this._currentIndex)?this._currentIndex++:"-"===this._string.charAt(this._currentIndex)&&(this._currentIndex++,a=-1),this._currentIndex>=this._endIndex||this._string.charAt(this._currentIndex)<"0"||this._string.charAt(this._currentIndex)>"9")return;for(;this._currentIndex<this._endIndex&&this._string.charAt(this._currentIndex)>="0"&&this._string.charAt(this._currentIndex)<="9";)t*=10,t+=this._string.charAt(this._currentIndex)-"0",this._currentIndex++}var u=e+r;if(u*=i,t&&(u*=Math.pow(10,a*t)),s!==this._currentIndex)return this._skipOptionalSpacesOrDelimiter(),u}}},{key:"_parseArcFlag",value:function _parseArcFlag(){if(!(this._currentIndex>=this._endIndex)){var t=!1,e=this._string.charAt(this._currentIndex++);if("0"===e)t=!1;else{if("1"!==e)return;t=!0}return this._skipOptionalSpacesOrDelimiter(),t}}},{key:"parseSegment",value:function parseSegment(){var t=this._string[this._currentIndex],n=this._pathSegTypeFromChar(t);if(n===SVGPathSeg.PATHSEG_UNKNOWN){if(this._previousCommand===SVGPathSeg.PATHSEG_UNKNOWN)return null;if((n=this._nextCommandHelper(t,this._previousCommand))===SVGPathSeg.PATHSEG_UNKNOWN)return null}else this._currentIndex++;switch(this._previousCommand=n,n){case SVGPathSeg.PATHSEG_MOVETO_REL:return new SVGPathSegMovetoRel(e,this._parseNumber(),this._parseNumber());case SVGPathSeg.PATHSEG_MOVETO_ABS:return new SVGPathSegMovetoAbs(e,this._parseNumber(),this._parseNumber());case SVGPathSeg.PATHSEG_LINETO_REL:return new SVGPathSegLinetoRel(e,this._parseNumber(),this._parseNumber());case SVGPathSeg.PATHSEG_LINETO_ABS:return new SVGPathSegLinetoAbs(e,this._parseNumber(),this._parseNumber());case SVGPathSeg.PATHSEG_LINETO_HORIZONTAL_REL:return new SVGPathSegLinetoHorizontalRel(e,this._parseNumber());case SVGPathSeg.PATHSEG_LINETO_HORIZONTAL_ABS:return new SVGPathSegLinetoHorizontalAbs(e,this._parseNumber());case SVGPathSeg.PATHSEG_LINETO_VERTICAL_REL:return new SVGPathSegLinetoVerticalRel(e,this._parseNumber());case SVGPathSeg.PATHSEG_LINETO_VERTICAL_ABS:return new SVGPathSegLinetoVerticalAbs(e,this._parseNumber());case SVGPathSeg.PATHSEG_CLOSEPATH:return this._skipOptionalSpaces(),new SVGPathSegClosePath(e);case SVGPathSeg.PATHSEG_CURVETO_CUBIC_REL:var r={x1:this._parseNumber(),y1:this._parseNumber(),x2:this._parseNumber(),y2:this._parseNumber(),x:this._parseNumber(),y:this._parseNumber()};return new SVGPathSegCurvetoCubicRel(e,r.x,r.y,r.x1,r.y1,r.x2,r.y2);case SVGPathSeg.PATHSEG_CURVETO_CUBIC_ABS:var i={x1:this._parseNumber(),y1:this._parseNumber(),x2:this._parseNumber(),y2:this._parseNumber(),x:this._parseNumber(),y:this._parseNumber()};return new SVGPathSegCurvetoCubicAbs(e,i.x,i.y,i.x1,i.y1,i.x2,i.y2);case SVGPathSeg.PATHSEG_CURVETO_CUBIC_SMOOTH_REL:var a={x2:this._parseNumber(),y2:this._parseNumber(),x:this._parseNumber(),y:this._parseNumber()};return new SVGPathSegCurvetoCubicSmoothRel(e,a.x,a.y,a.x2,a.y2);case SVGPathSeg.PATHSEG_CURVETO_CUBIC_SMOOTH_ABS:var s={x2:this._parseNumber(),y2:this._parseNumber(),x:this._parseNumber(),y:this._parseNumber()};return new SVGPathSegCurvetoCubicSmoothAbs(e,s.x,s.y,s.x2,s.y2);case SVGPathSeg.PATHSEG_CURVETO_QUADRATIC_REL:var h={x1:this._parseNumber(),y1:this._parseNumber(),x:this._parseNumber(),y:this._parseNumber()};return new SVGPathSegCurvetoQuadraticRel(e,h.x,h.y,h.x1,h.y1);case SVGPathSeg.PATHSEG_CURVETO_QUADRATIC_ABS:var o={x1:this._parseNumber(),y1:this._parseNumber(),x:this._parseNumber(),y:this._parseNumber()};return new SVGPathSegCurvetoQuadraticAbs(e,o.x,o.y,o.x1,o.y1);case SVGPathSeg.PATHSEG_CURVETO_QUADRATIC_SMOOTH_REL:return new SVGPathSegCurvetoQuadraticSmoothRel(e,this._parseNumber(),this._parseNumber());case SVGPathSeg.PATHSEG_CURVETO_QUADRATIC_SMOOTH_ABS:return new SVGPathSegCurvetoQuadraticSmoothAbs(e,this._parseNumber(),this._parseNumber());case SVGPathSeg.PATHSEG_ARC_REL:var _={x1:this._parseNumber(),y1:this._parseNumber(),arcAngle:this._parseNumber(),arcLarge:this._parseArcFlag(),arcSweep:this._parseArcFlag(),x:this._parseNumber(),y:this._parseNumber()};return new SVGPathSegArcRel(e,_.x,_.y,_.x1,_.y1,_.arcAngle,_.arcLarge,_.arcSweep);case SVGPathSeg.PATHSEG_ARC_ABS:var u={x1:this._parseNumber(),y1:this._parseNumber(),arcAngle:this._parseNumber(),arcLarge:this._parseArcFlag(),arcSweep:this._parseArcFlag(),x:this._parseNumber(),y:this._parseNumber()};return new SVGPathSegArcAbs(e,u.x,u.y,u.x1,u.y1,u.arcAngle,u.arcLarge,u.arcSweep);default:throw new Error("Unknown path seg type.")}}}]),Source}(),i=new n,a=new r(t);if(!a.initialCommandIsMoveTo())return[];for(;a.hasMoreData();){var s=a.parseSegment();if(!s)return[];i.appendSegment(s)}return i.pathSegList}}],[{key:"_pathSegArrayAsString",value:function _pathSegArrayAsString(t){var e="",n=!0;return t.forEach((function(t){n?(n=!1,e+=t._asPathString()):e+=" "+t._asPathString()})),e}}]),SVGPathSegList}();y.prototype.classname="SVGPathSegList",Object.defineProperty(y.prototype,"numberOfItems",{get:function get(){return this._checkPathSynchronizedToList(),this._list.length},enumerable:!0}),Object.defineProperties(SVGPathElement.prototype,{pathSegList:{get:function get(){return this._pathSegList||(this._pathSegList=new y(this)),this._pathSegList},enumerable:!0},normalizedPathSegList:{get:function get(){return this.pathSegList},enumerable:!0},animatedPathSegList:{get:function get(){return this.pathSegList},enumerable:!0},animatedNormalizedPathSegList:{get:function get(){return this.pathSegList},enumerable:!0}}),window.SVGPathSegList=y}}();var t={name:"closepath",init:function init(t){return function _asyncToGenerator(t){return function(){var e=this,n=arguments;return new Promise((function(r,i){var a=t.apply(e,n);function _next(t){asyncGeneratorStep(a,r,i,_next,_throw,"next",t)}function _throw(t){asyncGeneratorStep(a,r,i,_next,_throw,"throw",t)}_next(void 0)}))}}(regeneratorRuntime.mark((function _callee(){var e,n,r,i,a,s,h,o;return regeneratorRuntime.wrap((function _callee$(_){for(;;)switch(_.prev=_.next){case 0:return e=t.importLocale,n=t.$,_.next=3,e();case 3:return r=_.sent,a=function updateButton(t){var e=t.pathSegList,r=1===e.getItem(e.numberOfItems-1).pathSegType,i=r?"#tool_openpath":"#tool_closepath";n(r?"#tool_closepath":"#tool_openpath").hide(),n(i).show()},s=function showPanel(t){if(n("#closepath_panel").toggle(t),t){var e=i[0];e&&a(e)}},h=function toggleClosed(){var t=i[0];if(t){var e=t.pathSegList,n=e.numberOfItems-1;1===e.getItem(n).pathSegType?e.removeItem(n):e.appendItem(t.createSVGPathSegClosePath()),a(t)}},o=[{id:"tool_openpath",icon:"openpath.png",type:"context",panel:"closepath_panel",events:{click:function click(){h()}}},{id:"tool_closepath",icon:"closepath.png",type:"context",panel:"closepath_panel",events:{click:function click(){h()}}}],_.abrupt("return",{name:r.name,svgicons:"closepath_icons.svg",buttons:r.buttons.map((function(t,e){return Object.assign(o[e],t)})),callback:function callback(){n("#closepath_panel").hide()},selectedChanged:function selectedChanged(t){for(var e=(i=t.elems).length;e--;){var n=i[e];n&&"path"===n.tagName&&t.selectedElement&&!t.multiselected?s(!0):s(!1)}}});case 9:case"end":return _.stop()}}),_callee)})))()}};export default t;
|
|
//# sourceMappingURL=ext-closepath.js.map
|