!function(){"use strict";var e,t,n,r,o,i,u,a,l,s,c=tinymce.util.Tools.resolve("tinymce.PluginManager"),f=tinymce.util.Tools.resolve("tinymce.dom.RangeUtils"),d=tinymce.util.Tools.resolve("tinymce.dom.TreeWalker"),m=tinymce.util.Tools.resolve("tinymce.util.VK"),p=tinymce.util.Tools.resolve("tinymce.dom.BookmarkManager"),v=tinymce.util.Tools.resolve("tinymce.util.Tools"),g=tinymce.util.Tools.resolve("tinymce.dom.DOMUtils"),h=function(e){return e&&"BR"===e.nodeName},y=function(e){return e&&3===e.nodeType},N=function(e){return e&&/^(OL|UL|DL)$/.test(e.nodeName)},S=function(e){return e&&/^(OL|UL)$/.test(e.nodeName)},O=function(e){return e&&/^(DT|DD)$/.test(e.nodeName)},C=function(e){return e&&/^(LI|DT|DD)$/.test(e.nodeName)},b=function(e){return e&&/^(TH|TD)$/.test(e.nodeName)},L=h,T=function(e,t){return t&&!!e.schema.getTextBlockElements()[t.nodeName]},D=function(e,t){return e&&e.nodeName in t},E=function(e,t){return!!h(t)&&!(!e.isBlock(t.nextSibling)||h(t.previousSibling))},w=function(e,t,n){var r=e.isEmpty(t);return!(n&&0=e.childNodes.length?n.data.length:0}:n.previousSibling&&y(n.previousSibling)?{container:n.previousSibling,offset:n.previousSibling.data.length}:n.nextSibling&&y(n.nextSibling)?{container:n.nextSibling,offset:0}:{container:e,offset:t}},x=function(e){var t=e.cloneRange(),n=A(e.startContainer,e.startOffset);t.setStart(n.container,n.offset);var r=A(e.endContainer,e.endOffset);return t.setEnd(r.container,r.offset),t},R=g.DOM,I=function(o){var i={},e=function(e){var t,n,r;n=o[e?"startContainer":"endContainer"],r=o[e?"startOffset":"endOffset"],1===n.nodeType&&(t=R.create("span",{"data-mce-type":"bookmark"}),n.hasChildNodes()?(r=Math.min(r,n.childNodes.length-1),e?n.insertBefore(t,n.childNodes[r]):R.insertAfter(t,n.childNodes[r])):n.appendChild(t),n=t,r=0),i[e?"startContainer":"endContainer"]=n,i[e?"startOffset":"endOffset"]=r};return e(!0),o.collapsed||e(),i},B=function(o){function e(e){var t,n,r;t=r=o[e?"startContainer":"endContainer"],n=o[e?"startOffset":"endOffset"],t&&(1===t.nodeType&&(n=function(e){for(var t=e.parentNode.firstChild,n=0;t;){if(t===e)return n;1===t.nodeType&&"bookmark"===t.getAttribute("data-mce-type")||n++,t=t.nextSibling}return-1}(t),t=t.parentNode,R.remove(r),!t.hasChildNodes()&&R.isBlock(t)&&t.appendChild(R.create("br"))),o[e?"startContainer":"endContainer"]=t,o[e?"startOffset":"endOffset"]=n)}e(!0),e();var t=R.createRng();return t.setStart(o.startContainer,o.startOffset),o.endContainer&&t.setEnd(o.endContainer,o.endOffset),x(t)},_=function(e){return function(){return e}},P=function(n){return function(){for(var e=[],t=0;te.length?function(e,t){for(var n=e.slice(0),r=t.depth-e.length,o=1;oe.length?Nt(n,e,t):yt(n,e,t)},[]),oe(o).map(function(e){return e.list})).toArray();var n,r,o},_t=function(e){var t,n,r=Y(ve.getSelectedListItems(e),We.fromDom);return gt([ee(r,P(kt)),ee((t=r,n=re.call(t,0),n.reverse(),n),P(kt))],function(e,t){return{start:e,end:t}})},Pt=function(a,e,s){var t,n,r,o=(t=e,n=_t(a),r=Dt(!1),Y(t,function(e){return{entries:Rt(0,n,r,e),sourceList:e}}));G(o,function(e){var t,n,r,o,i,u;t=e.entries,n=s,G(J(t,Ot),function(e){return function(e,t){switch(e){case"Indent":t.depth++;break;case"Outdent":t.depth--;break;case"Flatten":t.depth=0}}(n,e)}),r=e.sourceList,i=a,u=e.entries,o=ne(function(e,t){if(0===e.length)return[];for(var n=t(e[0]),r=[],o=[],i=0,u=e.length;i