/** * 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.4.2 (2020-08-17) */ !function(i){"use strict";var n,t,e,r,o=tinymce.util.Tools.resolve("tinymce.PluginManager"),u=tinymce.util.Tools.resolve("tinymce.util.VK"),a=function(r){return function(t){return e=typeof(n=t),(null===n?"null":"object"==e&&(Array.prototype.isPrototypeOf(n)||n.constructor&&"Array"===n.constructor.name)?"array":"object"==e&&(String.prototype.isPrototypeOf(n)||n.constructor&&"String"===n.constructor.name)?"string":e)===r;var n,e}},l=function(n){return function(t){return typeof t===n}},c=a("string"),f=a("array"),s=function(t){return n===t},m=l("boolean"),g=l("function"),d=function(t){var n=t.getParam("link_assume_external_targets",!1);return m(n)&&n?1:!c(n)||"http"!==n&&"https"!==n?0:n},v=function(t){return t.getParam("default_link_target")},h=function(t){return t.getParam("target_list",!0)},p=function(t){return t.getParam("rel_list",[],"array")},y=function(t){return t.getParam("allow_unsafe_link_target",!1,"boolean")},k=function(){},x=function(t){return function(){return t}},b=x(!1),O=x(!(n=null)),w=function(){return C},C=(t=function(t){return t.isNone()},{fold:function(t,n){return t()},is:b,isSome:b,isNone:O,getOr:r=function(t){return t},getOrThunk:e=function(t){return t()},getOrDie:function(t){throw new Error(t||"error: getOrDie called on none.")},getOrNull:x(null),getOrUndefined:x(undefined),or:r,orThunk:e,map:w,each:k,bind:w,exists:b,forall:O,filter:w,equals:t,equals_:t,toArray:function(){return[]},toString:x("none()")}),A=function(e){var t=x(e),n=function(){return o},r=function(t){return t(e)},o={fold:function(t,n){return n(e)},is:function(t){return e===t},isSome:O,isNone:b,getOr:t,getOrThunk:t,getOrDie:t,getOrNull:t,getOrUndefined:t,or:n,orThunk:n,map:function(t){return A(t(e))},each:function(t){t(e)},bind:r,exists:r,forall:r,filter:function(t){return t(e)?o:C},toArray:function(){return[e]},toString:function(){return"some("+e+")"},equals:function(t){return t.is(e)},equals_:function(t,n){return t.fold(b,function(t){return n(e,t)})}};return o},N={some:A,none:w,from:function(t){return null===t||t===undefined?C:A(t)}},P=Array.prototype.indexOf,_=Array.prototype.push,S=function(t,n){return e=t,r=n,-1]+>[^<]+<\/a>$/.test(t)||-1===t.indexOf("href=")))},Q=function(t){return t&&"FIGURE"===t.nodeName&&/\bimage\b/i.test(t.className)},Y=function(t){return n=["title","rel","class","target"],e=function(n,e){return t[e].each(function(t){n[e]=0