!function(){"use strict";varn,e,t,r,o,u,i=function(n){vare=n,t=function(){returne};return{get:t,set:function(n){e=n},clone:function(){returni(t())}}},c=tinymce.util.Tools.resolve("tinymce.PluginManager"),a=function(n){return{isEnabled:function(){returnn.get()}}},f=function(n,e){returnn.fire("VisualChars",{state:e})},l={"\xa0":"nbsp","\xad":"shy"},d=function(n,e){vart,r="";for(tinn)r+=t;returnnewRegExp("["+r+"]",e?"g":"")},s=function(n){vare,t="";for(einn)t&&(t+=","),t+="span.mce-"+n[e];returnt},m={charMap:l,regExp:d(l),regExpGlobal:d(l,!0),selector:s(l),charMapToRegExp:d,charMapToSelector:s},N=function(n){returnfunction(){returnn}},E=N(!1),g=N(!0),h=E,v=g,T=function(){returnp},p=(r={fold:function(n,e){returnn()},is:h,isSome:h,isNone:v,getOr:t=function(n){returnn},getOrThunk:e=function(n){returnn()},getOrDie:function(n){thrownewError(n||"error: getOrDie called on none.")},getOrNull:function(){returnnull},getOrUndefined:function(){returnundefined},or:t,orThunk:e,map:T,ap:T,each:function(){},bind:T,flatten:T,exists:h,forall:v,filter:T,equals:n=function(n){returnn.isNone()},equals_:n,toArray:function(){return[]},toString:N("none()")},Object.freeze&&Object.freeze(r),r),O=function(t){varn=function(){returnt},e=function(){returno},r=function(n){returnn(t)},o={fold:function(n,e){returne(t)},is:function(n){returnt===n},isSome:v,isNone:h,getOr:n,getOrThunk:n,getOrDie:n,getOrNull:n,getOrUndefined:n,or:e,orThunk:e,map:function(n){returnO(n(t))},ap:function(n){returnn.fold(T,function(n){returnO(n(t))})},each:function(n){n(t)},bind:r,flatten:n,exists:r,forall:r,filter:function(n){returnn(t)?o:p},equals:function(n){returnn.is(t)},equals_:function(n,e){returnn.fold(h,function(n){returne(t,n)})},toArray:function(){return[t]},toString:function(){return"some("+t+")"}};returno},y=function(n){returnnull===n||n===undefined?p:O(n)},D=(o="function",function(n){returnfunction(n){if(null===n)return"null";vare=typeofn;return"object"===e&&Array.prototype.isPrototypeOf(n)?"array":"object"===e&&String.prototype.isPrototypeOf(n)?"string":e}(n)===o}),_=function(n,e){for(vart=0,r=n.length;t<r;t++)e(n[t],t,n)},C=(Array.prototype.slice,D(Array.from)&&Array.from,function(n){if(null===n||n===undefined)thrownewError("Node cannot be null or undefined");return{dom:N(n)}}),M={fromHtml:function(n,e){vart=(e||document).createElement("div");if(t.innerHTML=n,!t.hasChildNodes()||1<t.childNodes.length)throwconsole.error("HTML does not have a single root node",n),"HTML must have a single root node";returnC(t.childNodes[0])},fromTag:function(n,e){vart=(e||document).createElement(n);returnC(t)},fromText:function(n,e){vart=(e||document).createTextNode(n);returnC(t)},fromDom:C,fromPoint:function(n,e,t){varr=n.dom();returny(r.elementFromPoint(e,t)).map(C)}},b=(Node.ATTRIBUTE_NODE,Node.CDATA_SECTION_NODE,Node.COMMENT_NODE,Node.DOCUMENT_NODE,Node.DOCUMENT_TYPE_NODE,Node.DOCUMENT_FRAGMENT_NODE,Node.ELEMENT_NODE,Node.TEXT_NODE),k=(Node.PROCESSING_INSTRUCTION_NODE,Node.ENTITY_REFERENCE_NODE,Node.ENTITY_NODE,Node.NOTATION_NODE,function(n){returnn.dom().nodeValue}),S=(u=b,function(n){returnn.dom().nodeType===u}),x=function(n){return'<span data-mce-bogus="1" class="mce-'+m.charMap[n]+'">'+n+"</span>"},A=function(n,e){vart=[],r=function(n,e){for(vart=n.length,r=newArray(t),o=0;o<t;o++){varu=n[o];r[o]=e(u,o,n)}returnr}(n.dom().childNodes,M.fromDom);return_(r,function(n){e(n)&&(t=t.concat([n])),t=t.concat(A(n,e))}),t},w={isMatch:function(n){returnS(n)&&k(n)!==undefined&&m.regExp.test(k(n))},filterDescendants:A,findParentElm:function(n,e){for(;n.parentNode;){if(n.parentNode===e)returnn;n=n.parentNode}},replaceWithSpans:function(n){returnn.replace(m.regExpGlobal,x)}},P=function(t,n){varr,o,e=w.filterDescendants(M.fromDom(n),w.isMatch);_(e,function(n){vare=w.replaceWithSpans(k(n));for(o=t.dom.create("div",null,e);r=o.lastChild;)t.dom.insertAfter(r,n.dom());t.dom.remove(n.dom())})},R=function(e,n){vart=e.dom.select(m.selector,n);_(t,function(n){e.dom.remove(n,1)})},I=P,B=R,U=function(n){vare=n.getBody(),t=n.selection