/** * 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.1.3 (2019-12-04) */ !function(){"use strict";function t(){}function n(t){return function(){return t}}function r(t){return t}function e(){return U}var o,u=tinymce.util.Tools.resolve("tinymce.PluginManager"),i=n(!1),c=n(!0),a=function(){return(a=Object.assign||function(t){for(var n,e=1,r=arguments.length;eu.length-1&&0!==i||f===b&&s===b||(a=u[i+2],f===b&&(s===S||s===E||s===P)&&a===b||(c=u[i-1],(f===S||f===E||s===P)&&s===b&&c===b||!(f!==W&&f!==b||s!==W&&s!==b)||(f===x||f===E)&&s===W&&c===W||f===W&&(s===x||s===E)&&a===W||f===j||f===D||c===j||c===D||s===j||s===D||f===R&&s===O||f!==A&&f!==R&&f!==O&&s!==A&&s!==R&&s!==O&&(f===T&&s===T||s===k&&(f===b||f===W||f===T||f===k)||f===k&&(s===b||s===W||s===T)||f===P))))){var d=n[p];if((r.includeWhitespace||!ut.test(d))&&(r.includePunctuation||!it.test(d))){var h=p-g.length+1,y=p+1,C=n.slice(h,y).join("");if("http"===(o=C)||"https"===o){var v=I(n,p),w=t.slice(y,v);Array.prototype.push.apply(g,w),p=v}l.push(g)}g=[]}return l}(r,o,$(o),e)},at=tinymce.util.Tools.resolve("tinymce.dom.TreeWalker"),ft=tinymce.util.Tools.resolve("tinymce.util.Delay");!function st(e){void 0===e&&(e=300),u.add("wordcount",function(t){var n=function(t){return{body:{getWordCount:V(t),getCharacterCount:L(t,J),getCharacterCountWithoutSpaces:L(t,K)},selection:{getWordCount:Q(t,H),getCharacterCount:Q(t,J),getCharacterCountWithoutSpaces:Q(t,K)},getCount:V(t)}}(t);return function(t,n){t.ui.registry.addButton("wordcount",{tooltip:"Word count",icon:"character-count",onAction:function(){return Y(t,n)}}),t.ui.registry.addMenuItem("wordcount",{text:"Word count",icon:"character-count",onAction:function(){return Y(t,n)}})}(t,n),function(t,n,e){var r=ft.debounce(function(){return X(t,n)},e);t.on("init",function(){X(t,n),ft.setEditorTimeout(t,function(){t.on("SetContent BeforeAddUndo Undo Redo keyup",r)},0)})}(t,n,e),n})}()}();