virt2/api/soft/tinymce/4.9.0/plugins/lists/plugin.min.js

1 line
26 KiB
JavaScript
Raw Normal View History

!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.select("span[data-mce-type=bookmark]",t).length)&&r},k=function(e,t){return e.isChildOf(t,e.getRoot())},A=function(e,t){if(y(e))return{container:e,offset:t};var n=f.getNode(e,t);return y(n)?{container:n,offset:t>=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;t<arguments.length;t++)e[t]=arguments[t];return!n.apply(null,e)}},M=_(!1),U=_(!0),F=M,j=U,H=function(){return $},$=(r={fold:function(e,t){return e()},is:F,isSome:F,isNone:j,getOr:n=function(e){return e},getOrThunk:t=function(e){return e()},getOrDie:function(e){throw new Error(e||"error: getOrDie called on none.")},getOrNull:function(){return null},getOrUndefined:function(){return undefined},or:n,orThunk:t,map:H,ap:H,each:function(){},bind:H,flatten:H,exists:F,forall:j,filter:H,equals:e=function(e){return e.isNone()},equals_:e,toArray:function(){return[]},toString:_("none()")},Object.freeze&&Object.freeze(r),r),q=function(n){var e=function(){return n},t=function(){return o},r=function(e){return e(n)},o={fold:function(e,t){return t(n)},is:function(e){return n===e},isSome:j,isNone:F,getOr:e,getOrThunk:e,getOrDie:e,getOrNull:e,getOrUndefined:e,or:t,orThunk:t,map:function(e){return q(e(n))},ap:function(e){return e.fold(H,function(e){return q(e(n))})},each:function(e){e(n)},bind:r,flatten:e,exists:r,forall:r,filter:function(e){return e(n)?o:$},equals:function(e){return e.is(n)},equals_:function(e,t){return e.fold(F,function(e){return t(n,e)})},toArray:function(){return[n]},toString:function(){return"some("+n+")"}};return o},W={some:q,none:H,from:function(e){return nu