!function(v){"use strict";functione(){}functionn(){returnc}vart,r=function(e){functionn(){returnt}vart=e;return{get:n,set:function(e){t=e},clone:function(){returnr(n())}}},o=tinymce.util.Tools.resolve("tinymce.PluginManager"),i=tinymce.util.Tools.resolve("tinymce.util.Tools"),d=function(e){returnfunction(){returne}},u=d(!1),a=d(!0),c=(t={fold:function(e,n){returne()},is:u,isSome:u,isNone:a,getOr:l,getOrThunk:f,getOrDie:function(e){thrownewError(e||"error: getOrDie called on none.")},getOrNull:d(null),getOrUndefined:d(undefined),or:l,orThunk:f,map:n,each:e,bind:n,exists:u,forall:a,filter:n,equals:s,equals_:s,toArray:function(){return[]},toString:d("none()")},Object.freeze&&Object.freeze(t),t);functions(e){returne.isNone()}functionf(e){returne()}functionl(e){returne}varm=function(t){functione(){returno}functionn(e){returne(t)}varr=d(t),o={fold:function(e,n){returnn(t)},is:function(e){returnt===e},isSome:a,isNone:u,getOr:r,getOrThunk:r,getOrDie:r,getOrNull:r,getOrUndefined:r,or:e,orThunk:e,map:function(e){returnm(e(t))},each:function(e){e(t)},bind:n,exists:n,forall:n,filter:function(e){returne(t)?o:c},toArray:function(){return[t]},toString:function(){return"some("+t+")"},equals:function(e){returne.is(t)},equals_:function(e,n){returne.fold(u,function(e){returnn(t,e)})}};returno},p={some:m,none:n,from:function(e){returnnull===e||e===undefined?c:m(e)}};functionh(e,n){returny(v.document.createElement("canvas"),e,n)}functiong(e){varn=h(e.width,e.height);returnw(n).drawImage(e,0,0),n}functionw(e){returne.getContext("2d")}functiony(e,n,t){returne.width=n,e.height=t,e}varb,O,E=window.Promise?window.Promise:(b=T.immediateFn||"function"==typeofwindow.setImmediate&&window.setImmediate||function(e){v.setTimeout(e,1)},O=Array.isArray||function(e){return"[object Array]"===Object.prototype.toString.call(e)},T.prototype["catch"]=function(e){returnthis.then(null,e)},T.prototype.then=function(t,r){varo=this;returnnewT(function(e,n){N.call(o,newR(t,r,e,n))})},T.all=function(){for(vare=[],n=0;n<arguments.length;n++)e[n]=arguments[n];varc=Array.prototype.slice.call(1===e.length&&O(e[0])?e[0]:e);returnnewT(function(o,i){if(0===c.length)returno([]);varu=c.length;functiona(n,e){try{if(e&&("object"==typeofe||"function"==typeofe)){vart=e.then;if("function"==typeoft)returnvoidt.call(e,function(e){a(n,e)},i)}c[n]=e,0==--u&&o(c)}catch(r){i(r)}}for(vare=0;e<c.length;e++)a(e,c[e])})},T.resolve=function(n){returnn&&"object"==typeofn&&n.constructor===T?n:newT(function(e){e(n)})},T.reject=function(t){returnnewT(function(e,n){n(t)})},T.race=function(o){returnnewT(function(e,n){for(vart=0,r=o;t<r.length;t++)r[t].then(e,n)})},T);functionT(e){if("object"!=typeofthis)thrownewTypeError("Promises must be constructed via new");if("function"!=typeofe)thrownewTypeError("not a function");this._state=null,this._value=null,this._deferreds=[],A(e,I(S,this),I(_,this))}functionI(e,n){returnfunction(){returne.apply(n,arguments)}}functionN(r){varo=this;null!==this._state?b(function(){vare=o._state?r.onFulfilled:r.onRejected;if(null!==e){varn;try{n=e(o._value)}catch(t){returnvoidr.reject(t)}r.resolve(n)}else(o._state?r.resolve:r.reject)(o._value)}):this._deferreds.push(r)}functionS(e){try{if(e===this)thrownewTypeError("A promise cannot be resolved with itself.");if(e&&("object"==typeofe||"function"==typeofe)){varn=e.then;if("function"==typeofn)returnvoidA(I(n,e),I(S,this),I(_,this))}this._state=!0,this._value=e,x.call(this)}catch(t){_.call(this,t)}}function_(e){this._state=!1,this._value=e,x.call(this)}functionx(){for(vare=0,n=this._deferreds;e<n.length;e++){vart=n[e];N.call(this,t)}this._deferreds=[]}functionR(e,n,t,r){this.onFulfilled="function"==typeofe?e:null,this.onRejected="function"==typeofn?n:null,this.resolve=t,this.reject=r}functionA(e,n,t){varr=!1;try{e(function(e){r||(r=!0,n(e))},function(e){r||(r=!0,t(e))})}catch(o){if(r)return;r=!0,t(o)}}functionC(e){varn=e.src;return0===n.indexOf("data:")?U(n):functiont(r){returnnewE(function(e,t){varn=newv.XMLHttp