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){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(){varn,r=l(e);if(t){vara=l(this).constructor;n=Reflect.construct(r,arguments,a)}elsen=r.apply(this,arguments);returnu(this,n)}}functionh(e,t){returnfunction(e){if(Array.isArray(e))returne}(e)||function(e,t){if("undefined"==typeofSymbol||!(Symbol.iteratorinObject(e)))return;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)||p(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.")}()}functionf(e){returnfunction(e){if(Array.isArray(e))returng(e)}(e)||function(e){if("undefined"!=typeofSymbol&&Symbol.iteratorinObject(e))returnArray.from(e)}(e)||p(e)||function(){thrownewTypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}functionp(e,t){if(e){if("string"==typeofe)returng(e,t);varn=Object.prototype.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?g(e,t):void0}}functiong(e,t){(null==t||t>e.length)&&(t=e.length);for(varn=0,r=newArray(t);n<t;n++)r[n]=e[n];returnr}functionm(e){if("undefined"==typeofSymbol||null==e[Symbol.iterator]){if(Array.isArray(e)||(e=p(e))){vart=0,n=function(){};return{s:n,n:function(){returnt>=e.length?{done:!0}:{done:!1,value:e[t++]}},e:function(e){throwe},f:n}}thrownewTypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}varr,a,i=!0,o=!1;return{s:function(){r=e[Symbol.iterator]()},n:function(){vare=r.next();returni=e.done,e},e:function(e){o=!0,a=e},f:function(){try{i||null==r.return||r.return()}finally{if(o)throwa}}}}functionv(e){vart=e.changedTouches,n=t[0],r="";switch(e.type){case"touc
functionW(t){varn=t.fn.attr;returnt.fn.attr=function(t,r){vara=this.length;if(!a)returnn.call(this,t,r);for(vari=0;i<a;++i){varo=this[i];if("http://www.w3.org/2000/svg"!==o.namespaceURI)returnn.call(this,t,r);if(void0!==r)o.setAttribute(t,r);elseif(Array.isArray(t)){for(vars={},l=t.length;l--;){varc=t[l],u=o.getAttribute(c);(u||"0"===u)&&(u=isNaN(u)?u:u-0),s[c]=u}returns}if("object"!==e(t)){vard=o.getAttribute(t);return(d||"0"===d)&&(d=isNaN(d)?d:d-0),d}for(varf=0,p=Object.entries(t);f<p.length;f++){varg=h(p[f],2),m=g[0],v=g[1];o.setAttribute(m,v)}}returnthis},t}varX=document.createElementNS(y.SVG,"svg");functionQ(e){vart=e.matrix,n="";switch(e.type){case1:n="matrix("+[t.a,t.b,t.c,t.d,t.e,t.f].join(",")+")";break;case2:n="translate("+t.e+","+t.f+")";break;case3:n=t.a===t.d?"scale("+t.a+")":"scale("+t.a+","+t.d+")";break;case4:varr=0,a=0;if(0!==e.angle){vari=1-t.a;a=(i*t.f+t.b*t.e)/(i*i+t.b*t.b),r=(t.e-t.b*a)/i}n="rotate("+e.angle+" "+r+","+a+")"}returnn}varK,Z={},$=function(){functione(t){r(this,e),this._elem=t||null,this._xforms=[],this._update=function(){for(vare="",t=0;t<this.numberOfItems;++t){e+=Q(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(varn=/\s*((scale|matrix|rotate|translate)\s*\(.*?\))\s*,?\s*/,r=!0;r;)r=t.match(n),t=t.replace(n,""),r&&r[1]&&function(){vart=r[1].split(/\s*\(/),n=t[0],a=t[1].match(/\s*(.*?)\s*\)/);a[1]=a[1].replace(/(\d)-/g,"$1 -");vari=a[1].split(/[, ]+/),o="abcdef".split(""),s=X.createSVGMatrix();Object.values(i).forEach((function(e,t){i[t]=Number.parseFloat(e),"matrix"===n&&(s[o[t]]=i[t])}));varl=X.createSVGTransform(),c="set"+n.charAt(0).toUpperCase()+n.slice(1),u="matrix"===n?[s]:i;"scale"===n&&1===u.length?u.push(u[0]):"translate"===n&&1===u.length?u.push(0):"rotate"===n&&1===u.length&&u.push(0,0),l[c].apply(l,f(u)),e._list.appendItem(l)}()},this._removeFromOtherLists=function(e){e&&Object.values(Z).some((function(t){for(varn=0,r=t._xforms.length;n<r;++n)if(t._xforms[n]===e)returnt.removeItem(n),!0;return!1}))},this.numberOfItems=0}returni(e,[{key:"clear",value:function(){this.numberOfItems=0,this._xforms=[]}},{key:"initialize",value:function(e){this.numberOfItems=1,this._removeFromOtherLists(e),this._xforms=[e]}},{key:"getItem",value:function(e){if(e<this.numberOfItems&&e>=0)returnthis._xforms[e];vart=newError("DOMException with code=INDEX_SIZE_ERR");throwt.code=1,t}},{key:"insertItemBefore",value:function(e,t){varn=null;if(t>=0)if(t<this.numberOfItems){this._removeFromOtherLists(e);varr,a=newArray(this.numberOfItems+1);for(r=0;r<t;++r)a[r]=this._xforms[r];a[r]=e;for(vari=r+1;r<this.numberOfItems;++i,++r)a[i]=this._xforms[r];this.numberOfItems++,this._xforms=a,n=e,this._list._update()}elsen=this._list.appendItem(e);returnn}},{key:"replaceItem",value:function(e,t){varn=null;returnt<this.numberOfItems&&t>=0&&(this._removeFromOtherLists(e),this._xforms[t]=e,n=e,this._list._update()),n}},{key:"removeItem",value:function(e){if(e<this.numberOfItems&&e>=0){vart,n=this._xforms[e],r=newArray(this.numberOfItems-1);for(t=0;t<e;++t)r[t]=this._xforms[t];for(vara=t;a<this.numberOfItems-1;++a,++t)r[a]=this._xforms[t+1];returnthis.numberOfItems--,this._xforms=r,this._list._update(),n}vari=newError("DOMException with code=INDEX_SIZE_ERR");throwi.code=1,i}},{key:"appendItem",value:function(e){returnthis._removeFromOtherLists(e),this._xforms.push(e),this.numberOfItems++,this._list._update(),e}}]),e}(),J=function(e){e.id&&Z[e.id]&&deleteZ[e.id]},ee=function(e){if(!B){vart=e.id||"temp",n=Z[t];returnn&&"temp"!==t||(Z[t]=new$(e),Z[t]._init(),n=Z[t]),n}returne.transform?e.transform.baseVal:e.gradientTransform?e.gradientTransform.baseVal:e.patternTransform?e.patternTransform.baseVal:null},te=["x","x1","cx","rx","width"],ne=["y","y1","cy","ry","height"],re=["r","radius"].concat(te,ne),ae={},ie=function(){returnae},oe=functione(t){varn=K.getRoundDigits();returnisNaN(t)?Array.isArray(t)?e(t[0])+","+e(t[1]):Number.parseFloat(t).toF
functionEr(e,t){returnvoid0===t&&(t=0),Math.round(e*Math.pow(10,t))/Math.pow(10,t)}window.console||(window.console={log:function(e){},dir:function(e){}});varGr,Pr,Nr=function(e){returnnull==e},Ir=jQuery,Tr=function(e,t,n){varr=Ir("#svg_editor").parent();Object.entries(t).forEach((function(t){vara=h(t,2),i=a[0],o=a[1];if(o){n&&(i="#"+i);vars=r.find(i);if(s.length){varl=s[0];switch(e){case"aria-label":l.setAttribute("aria-label",o);break;case"content":f(l.childNodes).some((function(e){return!(3!==e.nodeType||!e.textContent.trim())&&(e.textContent=o,!0)}));break;case"title":l.title=o}}elseconsole.log("Missing element for localization: "+i)}elseconsole.log(i)}))},Lr=function(){vare=n(regeneratorRuntime.mark((functione(t){varn,r,a,i,o,s,l,c,u,d;returnregeneratorRuntime.wrap((function(e){for(;;)switch(e.prev=e.next){case0:returne.next=2,Pr.addLangData(Gr);case2:if(n=e.sent,Ir.each(n,(function(e,n){n.data&&(t=Ir.merge(t,n.data))})),t.tools){e.next=6;break}returne.abrupt("return",void0);case6:returna=(r=t).tools,i=r.properties,o=r.config,s=r.layers,l=r.common,c=r.ui,Tr("content",{curve_segments:i.curve_segments,fitToContent:a.fitToContent,fit_to_all:a.fit_to_all,fit_to_canvas:a.fit_to_canvas,fit_to_layer_content:a.fit_to_layer_content,fit_to_sel:a.fit_to_sel,icon_large:o.icon_large,icon_medium:o.icon_medium,icon_small:o.icon_small,icon_xlarge:o.icon_xlarge,image_opt_embed:o.image_opt_embed,image_opt_ref:o.image_opt_ref,includedImages:o.included_images,largest_object:a.largest_object,layersLabel:s.layers,page:a.page,relativeToLabel:a.relativeTo,selLayerLabel:s.move_elems_to,selectedPredefined:o.select_predefined,selected_objects:a.selected_objects,smallest_object:a.smallest_object,straight_segments:i.straight_segments,svginfo_bg_url:o.editor_img_url+":",svginfo_bg_note:o.editor_bg_note,svginfo_change_background:o.background,svginfo_dim:o.doc_dims,svginfo_editor_prefs:o.editor_prefs,svginfo_height:l.height,svginfo_icons:o.icon_size,svginfo_image_props:o.image_props,svginfo_lang:o.language,svginfo_title:o.doc_title,svginfo_width:l.width,tool_docprops_cancel:l.cancel,tool_docprops_save:l.ok,tool_source_cancel:l.cancel,tool_source_save:l.ok,tool_prefs_cancel:l.cancel,tool_prefs_save:l.ok,sidepanel_handle:s.layers.split("").join(" "),tool_clear:a.new_doc,tool_docprops:a.docprops,tool_export:a.export_img,tool_import:a.import_doc,tool_open:a.open_doc,tool_save:a.save_doc,tool_editor_prefs:o.editor_prefs,tool_editor_homepage:a.editor_homepage,svginfo_units_rulers:o.units_and_rulers,svginfo_rulers_onoff:o.show_rulers,svginfo_unit:o.base_unit,svginfo_grid_settings:o.grid,svginfo_snap_onoff:o.snapping_onoff,svginfo_snap_step:o.snapping_stepsize,svginfo_grid_color:o.grid_color},!0),u={},["cut","copy","paste","paste_in_place","delete","group","ungroup","move_front","move_up","move_down","move_back"].forEach((function(e){u['#cmenu_canvas a[href="#'+e+'"]']=a[e]})),["dupe","merge_down","merge_all"].forEach((function(e){u['#cmenu_layers a[href="#'+e+'"]']=s[e]})),u['#cmenu_layers a[href="#delete"]']=s.del,Tr("content",u),d={},Object.entries({tool_blur:i.blur,tool_position:a.align_to_page,tool_font_family:i.font_family,zoom_panel:c.zoom_level,stroke_linejoin:i.linejoin_miter,stroke_linecap:i.linecap_butt,tool_opacity:i.opacity}).forEach((function(e){vart=h(e,2),n=t[0],r=t[1];d["#"+n+" button"]=r})),Object.entries({group_opacity:i.opacity,zoom:c.zoom_level}).forEach((function(e){vart=h(e,2),n=t[0],r=t[1];d["#"+n]=r})),Tr("aria-label",d),Tr("title",{align_relative_to:a.align_relative_to,circle_cx:i.circle_cx,circle_cy:i.circle_cy,circle_r:i.circle_r,cornerRadiusLabel:i.corner_radius,ellipse_cx:i.ellipse_cx,ellipse_cy:i.ellipse_cy,ellipse_rx:i.ellipse_rx,ellipse_ry:i.ellipse_ry,fill_color:i.fill_color,font_family:i.font_family,idLabel:i.id,image_height:i.image_height,image_url:i.image_url,image_width:i.image_width,layer_delete:s.del,layer_down:s.move_down,layer_new:s.new,layer_rename:s.rename,layer_moreopts:l.more_opts,layer_up:s.move_up,line_x1:i.line_x1,line_x2:i.line_x2,line_y1:i.line_y1,line_y2:i.line_y2,linecap_butt:i.l