!function(){"use strict";var r=function(t){var n=t,e=function(){return n};return{get:e,set:function(t){n=t},clone:function(){return r(e())}}},t=tinymce.util.Tools.resolve("tinymce.PluginManager"),u=tinymce.util.Tools.resolve("tinymce.util.Tools");function e(t,n){return i(document.createElement("canvas"),t,n)}function o(t){return t.getContext("2d")}function i(t,n,e){return t.width=n,t.height=e,t}var n,a,c,f,l={create:e,clone:function Xt(t){var n;return o(n=e(t.width,t.height)).drawImage(t,0,0),n},resize:i,get2dContext:o,get3dContext:function Yt(t){var n=null;try{n=t.getContext("webgl")||t.getContext("experimental-webgl")}catch(e){}return n||(n=null),n}},d={getWidth:function Qt(t){return t.naturalWidth||t.width},getHeight:function Zt(t){return t.naturalHeight||t.height}},h=window.Promise?window.Promise:function(){var t=function(t){if("object"!=typeof this)throw new TypeError("Promises must be constructed via new");if("function"!=typeof t)throw new TypeError("not a function");this._state=null,this._value=null,this._deferreds=[],f(t,r(o,this),r(a,this))},n=t.immediateFn||"function"==typeof window.setImmediate&&window.setImmediate||function(t){setTimeout(t,1)};function r(t,n){return function(){t.apply(n,arguments)}}var e=Array.isArray||function(t){return"[object Array]"===Object.prototype.toString.call(t)};function i(r){var o=this;null!==this._state?n(function(){var t=o._state?r.onFulfilled:r.onRejected;if(null!==t){var n;try{n=t(o._value)}catch(e){return void r.reject(e)}r.resolve(n)}else(o._state?r.resolve:r.reject)(o._value)}):this._deferreds.push(r)}function o(t){try{if(t===this)throw new TypeError("A promise cannot be resolved with itself.");if(t&&("object"==typeof t||"function"==typeof t)){var n=t.then;if("function"==typeof n)return void f(r(n,t),r(o,this),r(a,this))}this._state=!0,this._value=t,u.call(this)}catch(e){a.call(this,e)}}function a(t){this._state=!1,this._value=t,u.call(this)}function u(){for(var t=0,n=this._deferreds.length;tthis.length())return null;for(var e=this.littleEndian?0:-8*(n-1),r=0,o=0;r