jQuery;varWo=function(){vart=_asyncToGenerator(regeneratorRuntime.mark((function_callee2(t,e){varr;returnregeneratorRuntime.wrap((function_callee2$(n){for(;;)switch(n.prev=n.next){case0:returnn.prev=0,n.next=3,import("./extensions/ext-".concat(t,"/locale/").concat(e,".js"));case3:r=n.sent,n.next=12;break;case6:returnn.prev=6,n.t0=n.catch(0),console.error("Missing translation (".concat(e,") for extension ").concat(t," - using 'en'")),n.next=11,import("./extensions/ext-".concat(t,"/locale/en.js"));case11:r=n.sent;case12:returnn.abrupt("return",r.default);case13:case"end":returnn.stop()}}),_callee2,null,[[0,6]])})));returnfunctionloadExtensionTranslation(e,r){returnt.apply(this,arguments)}}(),Uo={name:"eyedropper",init:functioninit(t){vare=this;return_asyncToGenerator(regeneratorRuntime.mark((function_callee(){varr,n,o,i,a,c,u,s,f;returnregeneratorRuntime.wrap((function_callee$(l){for(;;)switch(l.prev=l.next){case0:returns=function_getStyle(t){if("eyedropper"!==a.getMode()){vare=o("#tool_eyedropper"),r=null;t.multiselected||!t.elems[0]||["svg","g","use"].includes(t.elems[0].nodeName)?e.addClass("disabled"):(r=t.elems[0],e.removeClass("disabled"),u.fillPaint=r.getAttribute("fill")||"black",u.fillOpacity=r.getAttribute("fill-opacity")||1,u.strokePaint=r.getAttribute("stroke"),u.strokeOpacity=r.getAttribute("stroke-opacity")||1,u.strokeWidth=r.getAttribute("stroke-width"),u.strokeDashArray=r.getAttribute("stroke-dasharray"),u.strokeLinecap=r.getAttribute("stroke-linecap"),u.strokeLinejoin=r.getAttribute("stroke-linejoin"),u.opacity=r.getAttribute("opacity")||1)}},r=e,l.next=4,Wo("eyedropper",r.curPrefs.lang);case4:returnn=l.sent,o=t.$,i=t.ChangeElementCommand,a=r.canvas,c=functionaddToHistory(t){a.undoMgr.addCommandToHistory(t)},u={fillPaint:"red",fillOpacity:1,strokePaint:"black",strokeOpacity:1,strokeWidth:5,strokeDashArray:null,opacity:1,strokeLinecap:"butt",strokeLinejoin:"miter"},f=[{id:"tool_eyedropper",icon:"eyedropper.png",type:"mode",events:{click:functionclick(){a.setMode("eyedropper")}}}],l.abrupt("return",{name:n.name,svgicons:"eyedropper-icon.xml",buttons:n.buttons.map((function(t,e){returnObject.assign(f[e],t)})),selectedChanged:s,elementChanged:s,mouseDown:functionmouseDown(t){if("eyedropper"===a.getMode()){vare=t.event.target;if(!["svg","g","use"].includes(e.nodeName)){varr={},n=functionchange(t,e,n){r[e]=t.getAttribute(e),t.setAttribute(e,n)};u.fillPaint&&n(e,"fill",u.fillPaint),u.fillOpacity&&n(e,"fill-opacity",u.fillOpacity),u.strokePaint&&n(e,"stroke",u.strokePaint),u.strokeOpacity&&n(e,"stroke-opacity",u.strokeOpacity),u.strokeWidth&&n(e,"stroke-width",u.strokeWidth),u.strokeDashArray&&n(e,"stroke-dasharray",u.strokeDashArray),u.opacity&&n(e,"opacity",u.opacity),u.strokeLinecap&&n(e,"stroke-linecap",u.strokeLinecap),u.strokeLinejoin&&n(e,"stroke-linejoin",u.strokeLinejoin),c(newi(e,r))}}}});case8:case"end":returnl.stop()}}),_callee)})))()}};exportdefaultUo;