!function(e,t){"object"==typeofexports&&"undefined"!=typeofmodule?module.exports=t():"function"==typeofdefine&&define.amd?define(t):(e=e||self).svgEditor=t()}(this,function(){"use strict";functione(t){return(e="function"==typeofSymbol&&"symbol"==typeofSymbol.iterator?function(e){returntypeofe}:function(e){returne&&"function"==typeofSymbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeofe})(t)}functiont(e,t,n,r,a,i,o){try{vars=e[i](o),l=s.value}catch(e){returnvoidn(e)}s.done?t(l):Promise.resolve(l).then(r,a)}functionn(e){returnfunction(){varn=this,r=arguments;returnnewPromise(function(a,i){varo=e.apply(n,r);functions(e){t(o,a,i,s,l,"next",e)}functionl(e){t(o,a,i,s,l,"throw",e)}s(void0)})}}functionr(e,t){if(!(einstanceoft))thrownewTypeError("Cannot call a class as a function")}functiona(e,t){for(varn=0;n<t.length;n++){varr=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"inr&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}functioni(e,t,n){returnt&&a(e.prototype,t),n&&a(e,n),e}functiono(){return(o=Object.assign||function(e){for(vart=1;t<arguments.length;t++){varn=arguments[t];for(varrinn)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}returne}).apply(this,arguments)}functions(e,t){if("function"!=typeoft&&null!==t)thrownewTypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&c(e,t)}functionl(e){return(l=Object.setPrototypeOf?Object.getPrototypeOf:function(e){returne.__proto__||Object.getPrototypeOf(e)})(e)}functionc(e,t){return(c=Object.setPrototypeOf||function(e,t){returne.__proto__=t,e})(e,t)}functionu(e,t){return!t||"object"!=typeoft&&"function"!=typeoft?function(e){if(void0===e)thrownewReferenceError("this hasn't been initialised - super() hasn't been called");returne}(e):t}functiond(e,t){returnfunction(e){if(Array.isArray(e))returne}(e)||function(e,t){varn=[],r=!0,a=!1,i=void0;try{for(varo,s=e[Symbol.iterator]();!(r=(o=s.next()).done)&&(n.push(o.value),!t||n.length!==t);r=!0);}catch(e){a=!0,i=e}finally{try{r||null==s.return||s.return()}finally{if(a)throwi}}returnn}(e,t)||function(){thrownewTypeError("Invalid attempt to destructure non-iterable instance")}()}functionh(e){returnfunction(e){if(Array.isArray(e)){for(vart=0,n=newArray(e.length);t<e.length;t++)n[t]=e[t];returnn}}(e)||function(e){if(Symbol.iteratorinObject(e)||"[object Arguments]"===Object.prototype.toString.call(e))returnArray.from(e)}(e)||function(){thrownewTypeError("Invalid attempt to spread non-iterable instance")}()}functionp(e){vart=e.changedTouches,n=t[0],r="";switch(e.type){case"touchstart":r="mousedown";break;case"touchmove":r="mousemove";break;case"touchend":r="mouseup";break;default:return}vara=n.screenX,i=n.screenY,o=n.clientX,s=n.clientY,l=newMouseEvent(r,{bubbles:!0,cancelable:!0,view:window,detail:1,screenX:a,screenY:i,clientX:o,clientY:s,ctrlKey:!1,altKey:!1,shiftKey:!1,metaKey:!1,button:0,relatedTarget:null});t.length<2&&(n.target.dispatchEvent(l),e.preventDefault())}document.addEventListener("touchstart",p,!0),document.addEventListener("touchmove",p,!0),document.addEventListener("touchend",p,!0),document.addEventListener("touchcancel",p,!0);varf={HTML:"http://www.w3.org/1999/xhtml",MATH:"http://www.w3.org/1998/Math/MathML",SE:"http://svg-edit.googlecode.com",SVG:"http://www.w3.org/2000/svg",XLINK:"http://www.w3.org/1999/xlink",XML:"http://www.w3.org/XML/1998/namespace",XMLNS:"http://www.w3.org/2000/xmlns/"},g=function(){vare={};returnObject.entries(f).forEach(function(t){varn=d(t,2),r=n[0],a=n[1];e[a]=r.toLowerCase()}),e};!function(){if(!("SVGPathSeg"inwindow)){vare=function(){functione(t,n,a){r(this,e),this.pathSegType=t,this.pathSegTypeAsLetter=n,this._owningPathSegList=a}returni(e,[{key:"_segmentChanged",value:function(){this._owningPathSegList&&this._owningPathSegList.segmentChanged(this)}}]),e}();e.prototype.classname="SVGPathSeg",e.PATHSEG_UNKNOWN=0,e.PATHSEG_CLOSEPATH=1,e.PATHSEG_MOVETO_ABS=2,e.PATHSEG_MOVET