!function(){"use strict";functiona(e){varn=e;return{get:function(){returnn},set:function(e){n=e}}}functione(t){returnfunction(e){returnr=typeof(n=e),(null===n?"null":"object"==r&&(Array.prototype.isPrototypeOf(n)||n.constructor&&"Array"===n.constructor.name)?"array":"object"==r&&(String.prototype.isPrototypeOf(n)||n.constructor&&"String"===n.constructor.name)?"string":r)===t;varn,r}}functionn(n){returnfunction(e){returntypeofe===n}}functionc(e){return!(null==e)}functions(){}functiony(e){returnfunction(){returne}}functionr(e){returne}vart=tinymce.util.Tools.resolve("tinymce.PluginManager"),l=e("string"),d=e("array"),o=n("boolean"),h=n("function"),i=n("number");functionu(){returnm}varv=y(!1),f=y(!0),m={fold:function(e,n){returne()},isSome:v,isNone:f,getOr:r,getOrThunk:g,getOrDie:function(e){thrownewError(e||"error: getOrDie called on none.")},getOrNull:y(null),getOrUndefined:y(void0),or:r,orThunk:g,map:u,each:s,bind:u,exists:v,forall:f,filter:function(){returnm},toArray:function(){return[]},toString:y("none()")};functiong(e){returne()}functionp(e){functionn(){returnr.get().each(e)}varr=a(A.none());return{clear:function(){n(),r.set(A.none())},isSet:function(){returnr.get().isSome()},get:function(){returnr.get()},set:function(e){n(),r.set(A.some(e))}}}functionw(){returnp(function(e){returne.unbind()})}functionC(e,n){for(varr=e.length,t=newArray(r),o=0;o<r;o++){vari=e[o];t[o]=n(i,o)}returnt}functionD(e,n){for(varr=0,t=e.length;r<t;r++)n(e[r],r)}functionb(e,n){for(varr=[],t=0,o=e.length;t<o;t++){vari=e[t];n(i,t)&&r.push(i)}returnr}functionS(e,n){returnfunction(e,n,r){for(vart=0,o=e.length;t<o;t++){vari=e[t];if(n(i,t))returnA.some(i);if(r(i,t))break}returnA.none()}(e,n,v)}functionx(e,n){return-1!==e.indexOf(n)}functionE(e){returnvoid0!==e.style&&h(e.style.getPropertyValue)}functionO(e){if(null==e)thrownewError("Node cannot be null or undefined");return{dom:e}}varF=function(r){functione(){returno}functionn(e){returne(r)}vart=y(r),o={fold:function(e,n){returnn(r)},isSome:f,isNone:v,getOr:t,getOrThunk:t,getOrDie:t,getOrNull:t,getOrUndefined:t,or:e,orThunk:e,map:function(e){returnF(e(r))},each:function(e){e(r)},bind:n,exists:n,forall:n,filter:function(e){returne(r)?o:m},toArray:function(){return[r]},toString:function(){return"some("+r+")"}};returno},A={some:F,none:u,from:function(e){returnnull==e?m:F(e)}},T=function(){return(T=Object.assign||function(e){for(varn,r=1,t=arguments.length;r<t;r++)for(varoinn=arguments[r])Object.prototype.hasOwnProperty.call(n,o)&&(e[o]=n[o]);returne}).apply(this,arguments)},k=Array.prototype.push,R=Object.keys,L={fromHtml:function(e,n){varr=(n||document).createElement("div");if(r.innerHTML=e,!r.hasChildNodes()||1<r.childNodes.length)throwconsole.error("HTML does not have a single root node",e),newError("HTML must have a single root node");returnO(r.childNodes[0])},fromTag:function(e,n){varr=(n||document).createElement(e);returnO(r)},fromText:function(e,n){varr=(n||document).createTextNode(e);returnO(r)},fromDom:O,fromPoint:function(e,n,r){returnA.from(e.dom.elementFromPoint(n,r)).map(O)}};functionP(n){returnfunction(e){returne.dom.nodeType===n}}functionM(t,e){returnfunction(e){for(varn=0;n<e.length;n++){varr=function(n){varr=n.brand.toLowerCase();returnS(t,function(e){varn;returnr===(null===(n=e.brand)||void0===n?void0:n.toLowerCase())}).map(function(e){return{current:e.name,version:he.nu(parseInt(n.version,10),0)}})}(e[n]);if(r.isSome())returnr}returnA.none()}(e.brands)}functionN(e,n){varr=String(n).toLowerCase();returnS(e,function(e){returne.search(r)})}functionH(n){returnfunction(e){returnx(e,n)}}functionW(e){returnwindow.matchMedia(e).matches}functionq(e,n){varr=e.dom;if(1!==r.nodeType)return!1;vart=r;if(void0!==t.matches)returnt.matches(n);if(void0!==t.msMatchesSelector)returnt.msMatchesSelector(n);if(void0!==t.webkitMatchesSelector)returnt.webkitMatchesSelector(n);if(void0!==t.mozMatchesSelector)returnt.mozMatchesSelector(n);thrownewError("Browser lacks native selectors")}f