!function(){"use strict";varr=function(t){varn=t,e=function(){returnn};return{get:e,set:function(t){n=t},clone:function(){returnr(e())}}},t=tinymce.util.Tools.resolve("tinymce.PluginManager"),u=tinymce.util.Tools.resolve("tinymce.util.Tools");functione(t,n){returni(document.createElement("canvas"),t,n)}functiono(t){returnt.getContext("2d")}functioni(t,n,e){returnt.width=n,t.height=e,t}varn,a,c,f,l={create:e,clone:functionXt(t){varn;returno(n=e(t.width,t.height)).drawImage(t,0,0),n},resize:i,get2dContext:o,get3dContext:functionYt(t){varn=null;try{n=t.getContext("webgl")||t.getContext("experimental-webgl")}catch(e){}returnn||(n=null),n}},d={getWidth:functionQt(t){returnt.naturalWidth||t.width},getHeight:functionZt(t){returnt.naturalHeight||t.height}},h=window.Promise?window.Promise:function(){vart=function(t){if("object"!=typeofthis)thrownewTypeError("Promises must be constructed via new");if("function"!=typeoft)thrownewTypeError("not a function");this._state=null,this._value=null,this._deferreds=[],f(t,r(o,this),r(a,this))},n=t.immediateFn||"function"==typeofwindow.setImmediate&&window.setImmediate||function(t){setTimeout(t,1)};functionr(t,n){returnfunction(){t.apply(n,arguments)}}vare=Array.isArray||function(t){return"[object Array]"===Object.prototype.toString.call(t)};functioni(r){varo=this;null!==this._state?n(function(){vart=o._state?r.onFulfilled:r.onRejected;if(null!==t){varn;try{n=t(o._value)}catch(e){returnvoidr.reject(e)}r.resolve(n)}else(o._state?r.resolve:r.reject)(o._value)}):this._deferreds.push(r)}functiono(t){try{if(t===this)thrownewTypeError("A promise cannot be resolved with itself.");if(t&&("object"==typeoft||"function"==typeoft)){varn=t.then;if("function"==typeofn)returnvoidf(r(n,t),r(o,this),r(a,this))}this._state=!0,this._value=t,u.call(this)}catch(e){a.call(this,e)}}functiona(t){this._state=!1,this._value=t,u.call(this)}functionu(){for(vart=0,n=this._deferreds.length;t<n;t++)i.call(this,this._deferreds[t]);this._deferreds=null}functionc(t,n,e,r){this.onFulfilled="function"==typeoft?t:null,this.onRejected="function"==typeofn?n:null,this.resolve=e,this.reject=r}functionf(t,n,e){varr=!1;try{t(function(t){r||(r=!0,n(t))},function(t){r||(r=!0,e(t))})}catch(o){if(r)return;r=!0,e(o)}}returnt.prototype["catch"]=function(t){returnthis.then(null,t)},t.prototype.then=function(e,r){varo=this;returnnewt(function(t,n){i.call(o,newc(e,r,t,n))})},t.all=function(){varc=Array.prototype.slice.call(1===arguments.length&&e(arguments[0])?arguments[0]:arguments);returnnewt(function(o,i){if(0===c.length)returno([]);vara=c.length;functionu(n,t){try{if(t&&("object"==typeoft||"function"==typeoft)){vare=t.then;if("function"==typeofe)returnvoide.call(t,function(t){u(n,t)},i)}c[n]=t,0==--a&&o(c)}catch(r){i(r)}}for(vart=0;t<c.length;t++)u(t,c[t])})},t.resolve=function(n){returnn&&"object"==typeofn&&n.constructor===t?n:newt(function(t){t(n)})},t.reject=function(e){returnnewt(function(t,n){n(e)})},t.race=function(o){returnnewt(function(t,n){for(vare=0,r=o.length;e<r;e++)o[e].then(t,n)})},t}(),g=function(t){returnfunction(){returnt}},s=function(i){for(vart=[],n=1;n<arguments.length;n++)t[n-1]=arguments[n];for(vara=newArray(arguments.length-1),e=1;e<arguments.length;e++)a[e-1]=arguments[e];returnfunction(){for(vart=[],n=0;n<arguments.length;n++)t[n]=arguments[n];for(vare=newArray(arguments.length),r=0;r<e.length;r++)e[r]=arguments[r];varo=a.concat(e);returni.apply(null,o)}},m=g(!1),p=g(!0),v=m,y=p,b=function(){returnw},w=(f={fold:function(t,n){returnt()},is:v,isSome:v,isNone:y,getOr:c=function(t){returnt},getOrThunk:a=function(t){returnt()},getOrDie:function(t){thrownewError(t||"error: getOrDie called on none.")},getOrNull:function(){returnnull},getOrUndefined:function(){returnundefined},or:c,orThunk:a,map:b,ap:b,each:function(){},bind:b,flatten:b,exists:v,forall:y,filter:b,equals:n=function(t){returnt.isNone()},equals_:n,toArray:function(){return[]},toString:g("none()")},Object.freeze&&Object.freeze(f),f),I=function(e){vart=functi