varSvgCanvas=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,r,n,i,a,s){try{varo=e[a](s),u=o.value}catch(e){returnvoidr(e)}o.done?t(u):Promise.resolve(u).then(n,i)}functionr(e){returnfunction(){varr=this,n=arguments;returnnewPromise((function(i,a){vars=e.apply(r,n);functiono(e){t(s,i,a,o,u,"next",e)}functionu(e){t(s,i,a,o,u,"throw",e)}o(void0)}))}}functionn(e,t){if(!(einstanceoft))thrownewTypeError("Cannot call a class as a function")}functioni(e,t){for(varr=0;r<t.length;r++){varn=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"inn&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}functiona(e,t,r){returnt&&i(e.prototype,t),r&&i(e,r),e}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&&u(e,t)}functiono(e){return(o=Object.setPrototypeOf?Object.getPrototypeOf:function(e){returne.__proto__||Object.getPrototypeOf(e)})(e)}functionu(e,t){return(u=Object.setPrototypeOf||function(e,t){returne.__proto__=t,e})(e,t)}functionl(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}functionh(e){vart=function(){if("undefined"==typeofReflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeofProxy)return!0;try{returnDate.prototype.toString.call(Reflect.construct(Date,[],(function(){}))),!0}catch(e){return!1}}();returnfunction(){varr,n=o(e);if(t){vari=o(this).constructor;r=Reflect.construct(n,arguments,i)}elser=n.apply(this,arguments);returnl(this,r)}}functionc(e,t){returnfunction(e){if(Array.isArray(e))returne}(e)||function(e,t){if("undefined"==typeofSymbol||!(Symbol.iteratorinObject(e)))return;varr=[],n=!0,i=!1,a=void0;try{for(vars,o=e[Symbol.iterator]();!(n=(s=o.next()).done)&&(r.push(s.value),!t||r.length!==t);n=!0);}catch(e){i=!0,a=e}finally{try{n||null==o.return||o.return()}finally{if(i)throwa}}returnr}(e,t)||m(e,t)||function(){thrownewTypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}functiond(e){returnfunction(e){if(Array.isArray(e))returnf(e)}(e)||function(e){if("undefined"!=typeofSymbol&&Symbol.iteratorinObject(e))returnArray.from(e)}(e)||m(e)||function(){thrownewTypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}functionm(e,t){if(e){if("string"==typeofe)returnf(e,t);varr=Object.prototype.toString.call(e).slice(8,-1);return"Object"===r&&e.constructor&&(r=e.constructor.name),"Map"===r||"Set"===r?Array.from(e):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?f(e,t):void0}}functionf(e,t){(null==t||t>e.length)&&(t=e.length);for(varr=0,n=newArray(t);r<t;r++)n[r]=e[r];returnn}functiong(e){if("undefined"==typeofSymbol||null==e[Symbol.iterator]){if(Array.isArray(e)||(e=m(e))){vart=0,r=function(){};return{s:r,n:function(){returnt>=e.length?{done:!0}:{done:!1,value:e[t++]}},e:function(e){throwe},f:r}}thrownewTypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}varn,i,a=!0,s=!1;return{s:function(){n=e[Symbol.iterator]()},n:function(){vare=n.next();returna=e.done,e},e:function(e){s=!0,i=e},f:function(){try{a||null==n.return||n.return()}finally{if(s)throwi}}}}
vary,v={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/"},x=function(){vare={};returnObject.entries(v).forEach((function(t){varr=c(t,2),n=r[0],i=r[1];e[i]=n.toLowerCase()})),e},S=jQuery,_=(Boolean(document.createElementNS&&document.createElementNS(v.SVG,"svg").createSVGRect),navigator.userAgent),b=document.createElementNS(v.SVG,"svg"),w=Boolean(window.opera),A=_.includes("AppleWebKit"),k=_.includes("Gecko/"),C=_.includes("MSIE"),E=_.includes("Chrome/"),P=(_.includes("Windows"),_.includes("Macintosh"),"ontouchstart"inwindow),N=Boolean(b.querySelector),G=Boolean(document.evaluate),I=function(){vare=document.createElementNS(v.SVG,"path");e.setAttribute("d","M0,0 10,10");vart=e.pathSegList,r=e.createSVGPathSegLinetoAbs(5,5);try{returnt.replaceItem(r,1),!0}catch(e){}return!1}(),T=function(){vare=document.createElementNS(v.SVG,"path");e.setAttribute("d","M0,0 10,10");vart=e.pathSegList,r=e.createSVGPathSegLinetoAbs(5,5);try{returnt.insertItemBefore(r,1),!0}catch(e){}return!1}(),L=function(){vare=document.createElementNS(v.SVG,"svg"),t=document.createElementNS(v.SVG,"svg");document.documentElement.append(e),t.setAttribute("x",5),e.append(t);varr=document.createElementNS(v.SVG,"text");r.textContent="a",t.append(r);try{return0===r.getStartPositionOfChar(0).x}catch(e){return!1}finally{e.remove()}}(),V=function(){vare=document.createElementNS(v.SVG,"svg");document.documentElement.append(e);vart=document.createElementNS(v.SVG,"path");t.setAttribute("d","M0,0 C0,0 10,10 10,0"),e.append(t);varr=t.getBBox();returne.remove(),r.height>4&&r.height<5}(),O=function(){vare=document.createElementNS(v.SVG,"svg");document.documentElement.append(e);vart=document.createElementNS(v.SVG,"path");t.setAttribute("d","M0,0 10,0");varr=document.createElementNS(v.SVG,"path");r.setAttribute("d","M5,0 15,0");varn=document.createElementNS(v.SVG,"g");n.append(t,r),e.append(n);vari=n.getBBox();returne.remove(),15===i.width}(),M=(function(){vare=document.createElementNS(v.SVG,"rect");e.setAttribute("x",.1);vart=!e.cloneNode(!1).getAttribute("x").includes(",");t||S.alert('NOTE: This version of Opera is known to contain bugs in SVG-edit.\nPlease upgrade to the <a href="http://opera.com">latest version</a> in which the problems have been fixed.')}(),(y=document.createElementNS(v.SVG,"rect")).setAttribute("style","vector-effect:non-scaling-stroke"),"non-scaling-stroke"===y.style.vectorEffect),R=function(){vart=document.createElementNS(v.SVG,"rect").transform.baseVal,r=b.createSVGTransform();t.appendItem(r);varn=t.getItem(0),i=function(t){returnt&&"object"===e(t)&&"function"==typeoft.setMatrix&&"angle"int};returni(n)&&i(r)&&n.type===r.type&&n.angle===r.angle&&n.matrix.a===r.matrix.a&&n.matrix.b===r.matrix.b&&n.matrix.c===r.matrix.c&&n.matrix.d===r.matrix.d&&n.matrix.e===r.matrix.e&&n.matrix.f===r.matrix.f}(),B=function(){returnA},U=function(){returnk},H=function(){returnC},j=function(){returnE},F=function(){returnM},D=document.createElementNS(v.SVG,"svg");functionz(e){vart=e.matrix,r="";switch(e.type){case1:r="matrix("+[t.a,t.b,t.c,t.d,t.e,t.f].join(",")+")";break;case2:r="translate("+t.e+","+t.f+")";break;case3:r=t.a===t.d?"scale("+t.a+")":"scale("+t.a+","+t.d+")";break;case4:varn=0,i=0;if(0!==e.angle){vara=1-t.a;i=(a*t.f+t.b*t.e)/(a*a+t.b*t.b),n=(t.e-t.b*i)/a}r="rotate("+e.angle+" "+n+","+i+")"}returnr}varq,Q={},W=function(){functione(t){n(this,e),this._elem=t||null,this._xforms=[],this._update=function(){for(vare="",t=0;t<this.numberOfItems;++t){e+=z(this._list.getItem(t))+" "}this._elem.setAttribute("transform",e)},this._list=this,this._init=function(){vare=this,t=this._elem.getAttribute("transform");if(t)for(varr=/\s*((scale|matrix|rotate|translate)\s*\(.*?\))\s*,?\s*/,n=!0;n;)n=t.match(r),t=t.replace(r,""),n&&n[1]&&function(){vart=n[1].split(/\s*\(/),r=t[0],i=t[1].match(/\s*(.*?)\s*\)/);i[1]=i[1