/** * Copyright (c) Tiny Technologies, Inc. All rights reserved. * Licensed under the LGPL or a commercial license. * For LGPL see License.txt in the project root for license information. * For commercial licenses see https://www.tiny.cloud/ * * Version: 5.9.2 (2021-09-08) */ !function(){"use strict";function c(t){var e=t;return{get:function(){return e},set:function(t){e=t}}}function h(t){return null!=t}function r(){}function i(t){return function(){return t}}function t(t){return t}function e(){return d}function s(t){return n=typeof(e=t),"array"==(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);var e,n}var n,o=tinymce.util.Tools.resolve("tinymce.PluginManager"),l=tinymce.util.Tools.resolve("tinymce.util.Tools"),a=function(t){return typeof t===n},u=i(!(n="function")),f=i(!0),d={fold:function(t,e){return t()},isSome:u,isNone:f,getOr:t,getOrThunk:m,getOrDie:function(t){throw new Error(t||"error: getOrDie called on none.")},getOrNull:i(null),getOrUndefined:i(void 0),or:t,orThunk:m,map:e,each:r,bind:e,exists:u,forall:f,filter:function(){return d},toArray:function(){return[]},toString:i("none()")};function m(t){return t()}function g(t,e){return _(document.createElement("canvas"),t,e)}function p(t){var e=g(t.width,t.height);return A(e).drawImage(t,0,0),e}var v,y,w,b,E,I=function(n){function t(){return o}function e(t){return t(n)}var r=i(n),o={fold:function(t,e){return e(n)},isSome:f,isNone:u,getOr:r,getOrThunk:r,getOrDie:r,getOrNull:r,getOrUndefined:r,or:t,orThunk:t,map:function(t){return I(t(n))},each:function(t){t(n)},bind:e,exists:e,forall:e,filter:function(t){return t(n)?o:d},toArray:function(){return[n]},toString:function(){return"some("+n+")"}};return o},T={some:I,none:e,from:function(t){return null==t?d:I(t)}},A=function(t){return t.getContext("2d")},_=function(t,e,n){return t.width=e,t.height=n,t},R=window.Promise||(v=window,y=x.immediateFn||"function"==typeof v.setImmediate&&v.setImmediate||function(t){return setTimeout(t,1)},w=function(n,r){return function(){for(var t=[],e=0;e