jQuery;varso=function(){vart=_asyncToGenerator(regeneratorRuntime.mark((function_callee2(t,n){varr;returnregeneratorRuntime.wrap((function_callee2$(i){for(;;)switch(i.prev=i.next){case0:returni.prev=0,i.next=3,e.import("./extensions/ext-".concat(t,"/locale/").concat(n,".js"));case3:r=i.sent,i.next=12;break;case6:returni.prev=6,i.t0=i.catch(0),console.error("Missing translation (".concat(n,") for extension ").concat(t," - using 'en'")),i.next=11,e.import("./extensions/ext-".concat(t,"/locale/en.js"));case11:r=i.sent;case12:returni.abrupt("return",r.default);case13:case"end":returni.stop()}}),_callee2,null,[[0,6]])})));returnfunctionloadExtensionTranslation(e,n){returnt.apply(this,arguments)}}(),uo=(t("default",{name:"mathjax",init:functioninit(t){vare=this;return_asyncToGenerator(regeneratorRuntime.mark((function_callee2(){varn,r,i,o,s,u,l,h,f,p,d;returnregeneratorRuntime.wrap((function_callee2$(m){for(;;)switch(m.prev=m.next){case0:returnp=function_saveMath(){vart=n("#mathjax_code_textarea").val();MathJax.Hub.queue.Push(["Text",u,"\\displaystyle{"+t+"}"]),MathJax.Hub.queue.Push((function(){vart=n(".MathJax_SVG"),e=n(t.html());e.find("use").each((function(){vart=n(this).attr("href")?n(this).attr("href").slice(1):n(this).attr("xlink:href").slice(1),e=n("#"+t).clone().removeAttr("id"),r=n(this).attr("x"),i=n(this).attr("y"),o=n(this).attr("transform");o&&(r||i)?e.attr("transform",o+" translate("+r+","+i+")"):o?e.attr("transform",o):(r||i)&&e.attr("transform","translate("+r+","+i+")"),n(this).replaceWith(e)})),e.removeAttr("style"),e.attr("xmlns","http://www.w3.org/2000/svg"),o.importSvgString(n("<div>").append(e.clone()).html(),!0),o.ungroupSelectedElement(),o.moveSelectedElements(l,h,!0)}))},n=t.$,r=e,m.next=5,so("mathjax",r.curPrefs.lang);case5:returni=m.sent,o=r.canvas,s=r.uiStrings,f=!1,n.extend(s,{mathjax:{embed_svg:"Save as mathematics",embed_mathml:"Save as figure",svg_save_warning:"The math will be transformed into a figure is manipulatable like everything else. You will not be able to manipulate the TeX-code anymore.",mathml_save_warning:"Advised. The math will be saved as a figure.",title:"Mathematics code editor"}}),d=[{id:"tool_mathjax",type:"mode",icon:"mathjax.png",events:{click:functionclick(){return_asyncToGenerator(regeneratorRuntime.mark((function_callee(){returnregeneratorRuntime.wrap((function_callee$(t){for(;;)switch(t.prev=t.next){case0:if(o.setMode("mathjax"),!1!==f){t.next=17;break}returnn('<div id="mathjax">\x3c!-- Here is where MathJax creates the math --\x3e<div id="mathjax_creator" class="tex2jax_process" style="display:none">$${}$$</div><div id="mathjax_overlay"></div><div id="mathjax_container"><div id="tool_mathjax_back" class="toolbar_button"><button id="tool_mathjax_save">OK</button><button id="tool_mathjax_cancel">Cancel</button></div><fieldset><legend id="mathjax_legend">Mathematics Editor</legend><label><span id="mathjax_explication">Please type your mathematics in <a href="https://en.wikipedia.org/wiki/Help:Displaying_a_formula" target="_blank">TeX</a> code.</span></label><textarea id="mathjax_code_textarea" spellcheck="false"></textarea></fieldset></div></div>').insertAfter("#svg_prefs").hide(),n("#mathjax_container").draggable({cancel:"button,fieldset",containment:"window"}),n("#tool_mathjax_cancel").prepend(n.getSvgIcon("cancel",!0)).on("click touched",(function(){n("#mathjax").hide()})),n("#tool_mathjax_save").prepend(n.getSvgIcon("ok",!0)).on("click touched",(function(){p(),n("#mathjax").hide()})),n("body").addClass("tex2jax_ignore"),t.prev=7,t.next=10,Promise.resolve().then((function(){returnXo}));case10:MathJax.Hub.queue.Push((function(){u=MathJax.Hub.getAllJax("#mathjax_creator")[0],console.log(u),f=!0,console.log("MathJax Loaded")})),t.next=17;break;case13:t.prev=13,t.t0=t.catch(7),console.log("Failed loading MathJax."),n.alert("Failed loading MathJax. You will not be able to change the mathematics.");case17:case"end":returnt.stop()}}),_callee,null,[[7,13]])})))()}}}],m.abrupt("return",{name:i.name,svgicons:"mathjax-icons.xml",butto