!function(){"use strict";functionn(a){a.ui.registry.addButton("quickimage",{icon:"image",tooltip:"Insert image",onAction:function(){vari=a;news(function(n){varr=document.createElement("input");r.type="file",r.accept="image/*",r.style.position="fixed",r.style.left="0",r.style.top="0",r.style.opacity="0.001",document.body.appendChild(r),r.addEventListener("change",function(t){n(Array.prototype.slice.call(t.target.files))});varo=function(t){functione(){n([]),r.parentNode.removeChild(r)}d.os.isAndroid()&&"remove"!==t.type?f.setEditorTimeout(i,e,0):e(),i.off("focusin remove",o)};i.on("focusin remove",o),r.click()}).then(function(t){varc,n;0<t.length&&(c=t[0],n=c,news(function(t){vare=newFileReader;e.onloadend=function(){t(e.result.split(",")[1])},e.readAsDataURL(n)}).then(function(t){vare,n,r,o,i,u;n=t,r=c,i=(e=a).editorUpload.blobCache,u=i.create((o=(newDate).getTime(),"mceu_"+Math.floor(1e9*Math.random())+++l+String(o)),r,n),i.add(u),e.insertContent(e.dom.createHTML("img",{src:u.blobUri()}))}))})}}),a.ui.registry.addButton("quicktable",{icon:"table",tooltip:"Insert table",onAction:function(){vart,n;(t=a).plugins.table?t.plugins.table.insertTable(2,2):(n=t).undoManager.transact(function(){n.insertContent(function(){vart='<table data-mce-id="mce" style="width: 100%">';t+="<tbody>";for(vare=0;e<2;e++){t+="<tr>";for(varn=0;n<2;n++)t+="<td><br></td>";t+="</tr>"}return(t+="</tbody>")+"</table>"}());vart=n.dom.select("*[data-mce-id]")[0];t.removeAttribute("data-mce-id");vare=n.dom.select("td,th",t);n.selection.setCursorLocation(e[0],0)})}})}functiont(r){returnfunction(t){returnn=typeof(e=t),(null===e?"null":"object"==n&&(Array.prototype.isPrototypeOf(e)||e.constructor&&"Array"===e.constructor.name)?"array":"object"==n&&(String.prototype.isPrototypeOf(e)||e.constructor&&"String"===e.constructor.name)?"string":n)===r;vare,n}}functione(e){returnfunction(t){returntypeoft===e}}functioni(t){returnfunction(){returnt}}functionr(t){returnt}functiono(){returny}varu,c=tinymce.util.Tools.resolve("tinymce.PluginManager"),l=0,s=tinymce.util.Tools.resolve("tinymce.util.Promise"),d=tinymce.util.Tools.resolve("tinymce.Env"),f=tinymce.util.Tools.resolve("tinymce.util.Delay"),a=t("string"),m=t("object"),g=t("array"),v=e("boolean"),h=e("function"),p=i(!1),b=i(!(u=void0)),y={fold:function(t,e){returnt()},isSome:p,isNone:b,getOr:r,getOrThunk:k,getOrDie:function(t){thrownewError(t||"error: getOrDie called on none.")},getOrNull:i(null),getOrUndefined:i(void0),or:r,orThunk:k,map:o,each:function(){},bind:o,exists:p,forall:b,filter:function(){returny},toArray:function(){return[]},toString:i("none()")};functionk(t){returnt()}varw=function(n){functiont(){returno}functione(t){returnt(n)}varr=i(n),o={fold:function(t,e){returne(n)},isSome:b,isNone:p,getOr:r,getOrThunk:r,getOrDie:r,getOrNull:r,getOrUndefined:r,or:t,orThunk:t,map:function(t){returnw(t(n))},each:function(t){t(n)},bind:e,exists:e,forall:e,filter:function(t){returnt(n)?o:y},toArray:function(){return[n]},toString:function(){return"some("+n+")"}};returno},T={some:w,none:o,from:function(t){returnnull==t?y:w(t)}};functionE(t,e,n,r,o){returnt(n,r)?T.some(n):h(o)&&o(n)?T.none():e(n,r,o)}functionN(t,e){varn=t.dom;if(1!==n.nodeType)return!1;varr=n;if(void0!==r.matches)returnr.matches(e);if(void0!==r.msMatchesSelector)returnr.msMatchesSelector(e);if(void0!==r.webkitMatchesSelector)returnr.webkitMatchesSelector(e);if(void0!==r.mozMatchesSelector)returnr.mozMatchesSelector(e);thrownewError("Browser lacks native selectors")}functionM(t){if(null==t)thrownewError("Node cannot be null or undefined");return{dom:t}}varS={fromHtml:function(t,e){varn=(e||document).createElement("div");if(n.innerHTML=t,!n.hasChildNodes()||1<n.childNodes.length)throwconsole.error("HTML does not have a single root node",t),newError("HTML must have a single root node");returnM(n.childNodes[0])},fromTag:function(t,e){varn=(e||document).createElement(t);returnM(n)},fromText:function(t,e){varn=(e||document).createTextNode(t);returnM(n)},fromDom:M,fromPoint:funct