Updating minified JavaScript files
authorwoltlab.com <woltlab@woltlab.com>
Wed, 18 Jan 2017 10:16:50 +0000 (11:16 +0100)
committerwoltlab.com <woltlab@woltlab.com>
Wed, 18 Jan 2017 10:16:50 +0000 (11:16 +0100)
wcfsetup/install/files/js/3rdParty/redactor2/plugins/combined.min.js

index 617d321133ea45eaef31e9610f9c651c095a092b..b1037b3057abfaa0a3cf32ea92bd28606def3d0a 100644 (file)
@@ -17,7 +17,7 @@ $.Redactor.prototype.WoltLabButton=function(){"use strict";var t;return{init:fun
 // WoltLabCaret.js
 $.Redactor.prototype.WoltLabCaret=function(){"use strict";return{init:function(){var e=this.caret.after;this.caret.after=function(t){t=this.caret.prepare(t),this.utils.isBlockTag(t.tagName)&&this.WoltLabCaret._addParagraphAfterBlock(t),e.call(this,t)}.bind(this);var t=this.caret.end;this.caret.end=function(e){if(e=this.caret.prepare(e),e.nodeType===Node.ELEMENT_NODE&&e.lastChild&&"P"===e.lastChild.nodeName){var n=window.getSelection(),i=document.createRange();return i.selectNodeContents(e.lastChild),i.collapse(!1),n.removeAllRanges(),void n.addRange(i)}return t.call(this,e)}.bind(this),this.$editor[0].addEventListener(WCF_CLICK_EVENT,this.WoltLabCaret._handleEditorClick.bind(this)),this.WoltLabCaret._initInternalRange()},paragraphAfterBlock:function(e){var t=e.nextElementSibling;t&&"P"!==t.nodeName&&(t=elCreate("p"),t.textContent="​",e.parentNode.insertBefore(t,e.nextSibling)),this.caret.after(e)},endOfEditor:function(){var e=this.core.editor()[0];document.activeElement!==e&&e.focus();var t=e.lastElementChild;"P"===t.nodeName?this.caret.end(t):this.caret.after(t)},_initInternalRange:function(){var e=this.core.editor()[0],t=null,n=window.getSelection(),i=function(){t=n.rangeCount?n.getRangeAt(0).cloneRange():null},r=function(){if(null!==t){if(document.activeElement===e){var i=n.getRangeAt(0);if(0!==i.startOffset)return;for(var r=i.startContainer;r;){if(r.parentNode===e){if(r.previousSibling)return;break}if(r.previousSibling)return;r=r.parentNode}if(!r)return}e.focus(),n.removeAllRanges(),n.addRange(t),t=null}};e.addEventListener("keyup",i),e.addEventListener("mouseup",function(){n.rangeCount&&i()});var a=this.selection.save;this.selection.save=function(){t=null,a.call(this)}.bind(this);var o=this.selection.restore;this.selection.restore=function(){t&&null===elBySel(".redactor-selection-marker",this.$editor[0])&&(r(),n.rangeCount&&this.utils.isRedactorParent(n.getRangeAt(0).commonAncestorContainer))||o.call(this)}.bind(this);var s=this.buffer.set;this.buffer.set=function(t){document.activeElement!==e&&r(),s.call(this,t),i()}.bind(this);var l=this.insert.html;this.insert.html=function(e,t){var n=elBySel(".redactor-selection-marker",this.$editor[0]);l.call(this,e,t),(n||null===elBySel(".redactor-selection-marker",this.$editor[0]))&&i()}.bind(this),require(["Environment"],function(t){"ios"===t.platform()&&(e.addEventListener("focus",function(){document.addEventListener("selectionchange",i)}),e.addEventListener("blur",function(){document.removeEventListener("selectionchange",i)}))}.bind(this))},_handleEditorClick:function(e){if(this.selection.get().isCollapsed){var t=this.selection.block();if(t===!1){if(this.selection.current()===this.$editor[0]){var n=this.$editor[0].childNodes[this.selection.get().anchorOffset];n.nodeType===Node.ELEMENT_NODE&&"TABLE"===n.nodeName&&(t=n)}if(t===!1)return}for(var i=e.target;i&&!this.utils.isBlockTag(i.nodeName);)i=i.parentNode;if(i&&i!==t&&("P"!==t.nodeName||(t=t.parentNode,t!==this.$editor[0]&&this.utils.isBlockTag(t.nodeName)))){if("TD"===t.nodeName)for(;"TABLE"!==t.nodeName;)t=t.parentNode;if(!t.nodeName.match(/^H\d$/)&&!$(t).closest("ol, ul",this.$editor[0]).length){for(var r,a,o=t;o;){if(a=o.getBoundingClientRect(),e.clientY<a.top)r=!0,t=o;else{if(!(e.clientY>a.bottom))break;r=!1,t=o}if(!o.parentNode||o.parentNode===this.$editor[0])break;o=o.parentNode}var s=t[(r?"previous":"next")+"ElementSibling"];if(s&&"P"===s.nodeName)return void this.caret.end(s);this.buffer.set();var l=elCreate("p");l.textContent="​",t.parentNode.insertBefore(l,r?t:t.nextSibling),this.caret.end(l)}}}},_addParagraphAfterBlock:function(e){var t=e.nextElementSibling;(!t||"P"!==t.nodeName&&!this.utils.isBlockTag(t.nodeName))&&(t=elCreate("p"),t.textContent="​",e.parentNode.insertBefore(t,e.nextSibling))}}};
 // WoltLabClean.js
-$.Redactor.prototype.WoltLabClean=function(){"use strict";return{init:function(){var e=this.clean.onSet;this.clean.onSet=function(t){t=t.replace(/\u200B/g,""),t=t.replace(/&amp;/g,"@@@WCF_AMPERSAND@@@"),t=e.call(this,t),t=t.replace(/@@@WCF_AMPERSAND@@@/g,"&amp;");var n=elCreate("div");return n.innerHTML=t,elBySelAll("iframe",n,elRemove),elBySelAll("pre",n,function(e){e.classList.contains("redactor-script-tag")&&elRemove(e)}),elBySelAll("td",n,function(e){0===e.childNodes.length&&(e.innerHTML="​")}),t=n.innerHTML}.bind(this);var t=this.clean.onSync;this.clean.onSync=function(e){var n=elCreate("div");n.innerHTML=e;var l={};return elBySelAll("pre",n,function(e){var t=WCF.getUUID();l[t]=e.textContent,e.textContent=t}),elBySelAll("p",n,function(e){var t=e.lastElementChild;if(t&&"BR"===t.nodeName&&t.nextSibling&&t.nextSibling.textContent.replace(/[\r\n\t]/g,"").match(/^\u200B+$/)){var n=elCreate("p");n.innerHTML="<br>",e.parentNode.insertBefore(n,e.nextSibling),e.removeChild(t.nextSibling),e.removeChild(t)}}),e=n.innerHTML,e=e.replace(/<p>\u200B<\/p>/g,"<p><br></p>"),e=e.replace(/&amp;/g,"@@@WCF_AMPERSAND@@@"),e=t.call(this,e),e=e.replace(/@@@WCF_AMPERSAND@@@/g,"&amp;"),n.innerHTML=e,elBySelAll("pre",n,function(e){l.hasOwnProperty(e.textContent)&&(e.textContent=l[e.textContent])}),e=n.innerHTML}.bind(this);var n=this.clean.savePreFormatting;this.clean.savePreFormatting=function(e){var t=this.clean.encodeEntities;return this.clean.encodeEntities=function(e){return WCF.String.escapeHTML(e)},e=n.call(this,e),this.clean.encodeEntities=t,e}.bind(this);var l=this.clean.onPaste;this.clean.onPaste=function(e,t,n){if(t.pre||this.utils.isCurrentOrParent("kbd")){var r=this.clean.removeEmptyInlineTags;return this.clean.removeEmptyInlineTags=function(e){return e},e=l.call(this,e,t,n),this.clean.removeEmptyInlineTags=r,e}var i=elCreate("div");i.innerHTML=e.replace(/@@@WOLTLAB-P-ALIGN-(?:left|right|center|justify)@@@/g,"");for(var a,o,s,c=elBySelAll("[style]",i),h=0,u=c.length;u>h;h++){a=c[h],s=[];for(var d=0,f=a.style.length;f>d;d++)o=a.style[d],-1===this.opts.woltlab.allowedInlineStyles.indexOf(o)&&s.push(o);s.forEach(function(e){a.style.removeProperty(e)})}return elBySelAll("span",i,function(e){if(!e.hasAttribute("style")||!e.style.length){for(;e.childNodes.length;)e.parentNode.insertBefore(e.childNodes[0],e);elRemove(e)}}),elBySelAll("p",i,function(e){e.classList.contains("MsoNormal")?1===e.childElementCount&&"O:P"===e.children[0].nodeName&&" "===e.textContent&&(e.innerHTML="<br>"):e.className.match(/\btext-(left|right|center|justify)\b/)&&e.insertBefore(document.createTextNode("@@@WOLTLAB-P-ALIGN-"+RegExp.$1+"@@@"),e.firstChild),e.removeAttribute("class"),e.removeAttribute("style")}),elBySelAll("img",i,function(e){e.removeAttribute("style")}),elBySelAll("br",i,function(e){e.parentNode.insertBefore(document.createTextNode("@@@WOLTLAB-BR-MARKER@@@"),e.nextSibling)}),e=l.call(this,i.innerHTML,t,n),e=e.replace(/@@@WOLTLAB-BR-MARKER@@@/g,"<woltlab-br-marker></woltlab-br-marker>"),e=e.replace(/(<p>)?\s*@@@WOLTLAB-P-ALIGN-(left|right|center|justify)@@@/g,function(e,t,n){return t?'<p class="text-'+n+'">':""}),i.innerHTML=e.replace(/&amp;quot;/g,"&quot;"),elBySelAll("woltlab-br-marker",i,function(e){var t=e.parentNode;if("P"===t.nodeName){var n=elCreate("p");for(n.innerHTML="<br>";e.nextSibling;)n.appendChild(e.nextSibling);var l=e.previousSibling;l&&"BR"===l.nodeName&&elRemove(l),t.parentNode.insertBefore(n,t.nextSibling)}else t.insertBefore(elCreate("br"),e);elRemove(e)}),elBySelAll("p",i,function(e){var t=!1;0===e.childNodes.length?t=!0:""===e.textContent&&(t=!0,elBySelAll("*",e,function(e){"SPAN"!==e.nodeName&&(t=!1)})),t&&elRemove(e)}),i.innerHTML}.bind(this);var r=[],i=function(e,t){for(var n,l,i={},a=0,o=t.length;o>a;a++)n=t[a],l=elAttr(e,n),"style"===n&&0===e.style.length&&0===l.indexOf("font-family")&&(l=l.replace(/&quot;/g,"")),i[n]=l;r.push({element:e,attributes:i})},a=this.clean.convertTags;this.clean.convertTags=function(e,t){var n=elCreate("div");n.innerHTML=e,r=[],WCF.System.Event.fireEvent("com.woltlab.wcf.redactor2","convertTags_"+this.$element[0].id,{addToStorage:i,div:n}),elBySelAll("span",n,function(e){i(e,["style"])}),r.forEach(function(e,t){var n=e.element,l=n.parentNode;for(l.insertBefore(document.createTextNode("###custom"+t+"###"),n),l.insertBefore(document.createTextNode("###/custom"+t+"###"),n.nextSibling);n.childNodes.length;)l.insertBefore(n.childNodes[0],n);l.removeChild(n)});var l=!1;t.links&&this.opts.pasteLinks&&(elBySelAll("a",n,function(e){e.href&&(e.outerHTML='##%a href="'+e.href+'"%##'+e.innerHTML+"##%/a%##")}),l=!0,t.links=!1);var o=!1;return t.images&&this.opts.pasteImages&&(elBySelAll("img",n,function(e){if(e.src){for(var t,n='##%img src="'+e.src+'"',l=0,r=e.attributes.length;r>l;l++)t=e.attributes.item(l),"src"!==t.name&&(n+=" "+t.name+'="'+t.value+'"');e.outerHTML=n+"%##"}}),o=!0,t.images=!1),e=a.call(this,n.innerHTML,t),o&&(t.images=!0),l&&(t.links=!0),e}.bind(this);var o=this.clean.reconvertTags;this.clean.reconvertTags=function(e,t){if(r.length){e=e.replace(/###(\/?)custom(\d+)###/g,'<$1woltlab-custom-tag data-index="$2">');var n=elCreate("div");n.innerHTML=e,elBySelAll("woltlab-custom-tag",n,function(e){var t=~~elData(e,"index");if(r[t]){var n=r[t],l=elCreate(n.element.nodeName);for(var i in n.attributes)n.attributes.hasOwnProperty(i)&&elAttr(l,i,n.attributes[i]);for(e.parentNode.insertBefore(l,e);e.childNodes.length;)l.appendChild(e.childNodes[0])}elRemove(e)}),e=n.innerHTML}return o.call(this,e,t)}.bind(this),this.clean.removeSpans=function(e){return e}}}};
+$.Redactor.prototype.WoltLabClean=function(){"use strict";return{init:function(){var e=this.clean.onSet;this.clean.onSet=function(t){t=t.replace(/\u200B/g,""),t=t.replace(/&amp;/g,"@@@WCF_AMPERSAND@@@"),t=e.call(this,t),t=t.replace(/@@@WCF_AMPERSAND@@@/g,"&amp;");var n=elCreate("div");return n.innerHTML=t,elBySelAll("iframe",n,elRemove),elBySelAll("pre",n,function(e){e.classList.contains("redactor-script-tag")&&elRemove(e)}),elBySelAll("td",n,function(e){0===e.childNodes.length&&(e.innerHTML="​")}),t=n.innerHTML}.bind(this);var t=this.clean.onSync;this.clean.onSync=function(e){var n=elCreate("div");n.innerHTML=e;var r={};return elBySelAll("pre",n,function(e){var t=WCF.getUUID();r[t]=e.textContent,e.textContent=t}),elBySelAll("p",n,function(e){var t=e.lastElementChild;if(t&&"BR"===t.nodeName&&t.nextSibling&&t.nextSibling.textContent.replace(/[\r\n\t]/g,"").match(/^\u200B+$/)){var n=elCreate("p");n.innerHTML="<br>",e.parentNode.insertBefore(n,e.nextSibling),e.removeChild(t.nextSibling),e.removeChild(t)}}),e=n.innerHTML,e=e.replace(/<p>\u200B<\/p>/g,"<p><br></p>"),e=e.replace(/&amp;/g,"@@@WCF_AMPERSAND@@@"),e=t.call(this,e),e=e.replace(/@@@WCF_AMPERSAND@@@/g,"&amp;"),n.innerHTML=e,elBySelAll("pre",n,function(e){r.hasOwnProperty(e.textContent)&&(e.textContent=r[e.textContent])}),e=n.innerHTML}.bind(this);var n=this.clean.savePreFormatting;this.clean.savePreFormatting=function(e){var t=this.clean.encodeEntities;return this.clean.encodeEntities=function(e){return WCF.String.escapeHTML(e)},e=n.call(this,e),this.clean.encodeEntities=t,e}.bind(this);var r=this.clean.onPaste;this.clean.onPaste=function(e,t,n){if(t.pre||this.utils.isCurrentOrParent("kbd")){var l=this.clean.removeEmptyInlineTags;return this.clean.removeEmptyInlineTags=function(e){return e},e=r.call(this,e,t,n),this.clean.removeEmptyInlineTags=l,e}var i=elCreate("div");i.innerHTML=e.replace(/@@@WOLTLAB-P-ALIGN-(?:left|right|center|justify)@@@/g,"");for(var a,o,s,c=elBySelAll("[style]",i),h=0,u=c.length;u>h;h++){a=c[h],s=[];for(var d=0,f=a.style.length;f>d;d++)o=a.style[d],-1===this.opts.woltlab.allowedInlineStyles.indexOf(o)&&s.push(o);s.forEach(function(e){a.style.removeProperty(e)})}return elBySelAll("span",i,function(e){if(!e.hasAttribute("style")||!e.style.length){for(;e.childNodes.length;)e.parentNode.insertBefore(e.childNodes[0],e);elRemove(e)}}),elBySelAll("p",i,function(e){e.classList.contains("MsoNormal")?1===e.childElementCount&&"O:P"===e.children[0].nodeName&&" "===e.textContent&&(e.innerHTML="<br>"):e.className.match(/\btext-(left|right|center|justify)\b/)&&e.insertBefore(document.createTextNode("@@@WOLTLAB-P-ALIGN-"+RegExp.$1+"@@@"),e.firstChild),e.removeAttribute("class"),e.removeAttribute("style")}),elBySelAll("img",i,function(e){e.removeAttribute("style")}),elBySelAll("br",i,function(e){e.parentNode.insertBefore(document.createTextNode("@@@WOLTLAB-BR-MARKER@@@"),e.nextSibling)}),e=r.call(this,i.innerHTML,t,n),e=e.replace(/@@@WOLTLAB-BR-MARKER@@@/g,"<woltlab-br-marker></woltlab-br-marker>"),e=e.replace(/(<p>)?\s*@@@WOLTLAB-P-ALIGN-(left|right|center|justify)@@@/g,function(e,t,n){return t?'<p class="text-'+n+'">':""}),i.innerHTML=e.replace(/&amp;quot;/g,"&quot;"),elBySelAll("woltlab-br-marker",i,function(e){var t=e.parentNode;if("P"===t.nodeName){var n=elCreate("p");for(n.innerHTML="<br>";e.nextSibling;)n.appendChild(e.nextSibling);var r=e.previousSibling;r&&"BR"===r.nodeName&&elRemove(r),t.parentNode.insertBefore(n,t.nextSibling)}else t.insertBefore(elCreate("br"),e);elRemove(e)}),elBySelAll("p",i,function(e){var t=!1;0===e.childNodes.length?t=!0:""===e.textContent&&(t=!0,elBySelAll("*",e,function(e){"SPAN"!==e.nodeName&&(t=!1)})),t&&elRemove(e)}),i.innerHTML}.bind(this);var l=[],i=function(e,t){for(var n,r,i={},a=0,o=t.length;o>a;a++)n=t[a],r=elAttr(e,n),"style"===n&&0===e.style.length&&0===r.indexOf("font-family")&&(r=r.replace(/&quot;/g,"")),i[n]=r;l.push({element:e,attributes:i})},a=this.clean.convertTags;this.clean.convertTags=function(e,t){var n=elCreate("div");n.innerHTML=e,l=[],WCF.System.Event.fireEvent("com.woltlab.wcf.redactor2","convertTags_"+this.$element[0].id,{addToStorage:i,div:n}),elBySelAll("span",n,function(e){i(e,["style"])}),l.forEach(function(e,t){var n=e.element,r=n.parentNode;for(r.insertBefore(document.createTextNode("###custom"+t+"###"),n),r.insertBefore(document.createTextNode("###/custom"+t+"###"),n.nextSibling);n.childNodes.length;)r.insertBefore(n.childNodes[0],n);r.removeChild(n)});var r=!1;t.links&&this.opts.pasteLinks&&(elBySelAll("a",n,function(e){e.href&&(e.outerHTML='##%a href="'+e.href+'"%##'+e.innerHTML+"##%/a%##")}),r=!0,t.links=!1);var o=!1;return t.images&&this.opts.pasteImages&&(elBySelAll("img",n,function(e){if(e.src){for(var t,n='##%img src="'+e.src+'"',r=0,l=e.attributes.length;l>r;r++)t=e.attributes.item(r),"src"!==t.name&&(n+=" "+t.name+'="'+t.value+'"');e.outerHTML=n+"%##"}}),o=!0,t.images=!1),e=a.call(this,n.innerHTML,t),o&&(t.images=!0),r&&(t.links=!0),e}.bind(this);var o=this.clean.reconvertTags;this.clean.reconvertTags=function(e,t){if(l.length){e=e.replace(/###(\/?)custom(\d+)###/g,'<$1woltlab-custom-tag data-index="$2">');var n=elCreate("div");n.innerHTML=e,elBySelAll("woltlab-custom-tag",n,function(e){var t=~~elData(e,"index");if(l[t]){var n=l[t],r=elCreate(n.element.nodeName);for(var i in n.attributes)n.attributes.hasOwnProperty(i)&&elAttr(r,i,n.attributes[i]);for(e.parentNode.insertBefore(r,e);e.childNodes.length;)r.appendChild(e.childNodes[0])}elRemove(e)}),e=n.innerHTML}return o.call(this,e,t)}.bind(this),this.clean.removeSpans=function(e){return e};var s=this.clean.getCurrentType;this.clean.getCurrentType=function(e,t){var n=s.call(this,e,t);return this.utils.isCurrentOrParent(["kbd"])&&(n.inline=!1,n.block=!1,n.encode=!0,n.pre=!0,n.paragraphize=!1,n.images=!1,n.links=!1),n}.bind(this)}}};
 // WoltLabCode.js
 $.Redactor.prototype.WoltLabCode=function(){"use strict";return{init:function(){require(["WoltLabSuite/Core/Ui/Redactor/Code"],function(t){new t(this)}.bind(this));var t=this.code.start;this.code.start=function(e){t.call(this,e),WCF.System.Event.fireEvent("com.woltlab.wcf.redactor2","codeStart_"+this.$element[0].id)}.bind(this)}}};
 // WoltLabColor.js
@@ -55,7 +55,7 @@ $.Redactor.prototype.WoltLabObserve=function(){"use strict";return{init:function
 // WoltLabPage.js
 $.Redactor.prototype.WoltLabPage=function(){"use strict";return{init:function(){var t=this.button.add("woltlabPage","");require(["WoltLabSuite/Core/Ui/Redactor/Page"],function(e){new e(this,t[0])}.bind(this))}}};
 // WoltLabPaste.js
-$.Redactor.prototype.WoltLabPaste=function(){"use strict";return{init:function(){var e=null,t=!1,i=document.documentMode&&"object"==typeof window.clipboardData,r=this.paste.init;this.paste.init=function(a){var n="pre"===this.opts.type||this.utils.isCurrentOrParent("pre");if(t=!n&&this.utils.isCurrentOrParent("kbd"),n||t){e=i?window.clipboardData.getData("Text"):a.originalEvent.clipboardData.getData("text/plain");var s=this.clean.encodeEntities;this.clean.encodeEntities=function(e){return this.clean.encodeEntities=s,WCF.String.escapeHTML(e)}.bind(this)}r.call(this,a)}.bind(this);var a=this.paste.getPasteBoxCode;this.paste.getPasteBoxCode=function(r){var n=a.call(this,r);return t?e:!r||n&&!i?n:e}.bind(this),this.core.editor().off("paste.redactor").on("paste.redactor",this.paste.init.bind(this)),this.paste.detectClipboardUpload=function(e){e=e.originalEvent||e;var t;if(i){if(!window.clipboardData.files.length)return!1;t=window.clipboardData.files.item(0)}else{if(this.detect.isFirefox())return!1;var r=e.clipboardData,a=r.types;if(Array.isArray(a)&&-1!==a.indexOf("public.tiff"))return e.preventDefault(),!1;if(!r.items||!r.items.length)return;var n=!1;if(t=r.items[0].getAsFile(),null===t&&(this.detect.isWebkit()&&r.items.length>1&&(t=r.items[1].getAsFile(),n=!0,e.preventDefault()),null===t))return!1}var s=new FileReader;return s.readAsDataURL(t),s.onload=this.paste.insertFromClipboard.bind(this),n===!1}.bind(this),this.paste.insertFromClipboard=function(e){window.FormData&&(this.buffer.set(),WCF.System.Event.fireEvent("com.woltlab.wcf.redactor2","pasteFromClipboard_"+this.$element[0].id,{blob:this.utils.dataURItoBlob(e.target.result)}),this.rtePaste=!1)}.bind(this);var n="data:image/gif;base64,R0lGODlhAQABAIAAAAAAAP///yH5BAEAAAAALAAAAAABAAEAAAIBRAA7",s=this.paste.insert;this.paste.insert=function(e,t){if(t.pre)return s.call(this,e,t);if(this.utils.isCurrentOrParent("kbd")){s.call(this,e,t);var i=this.selection.current();i.nodeType===Node.TEXT_NODE&&(i=i.parentNode);for(var r=i.closest("kbd"),a=elByTag("p",r);a.length;)a[0].outerHTML=a[0].innerHTML;var l=r.innerHTML.split(/<br\s*\/?>/);if(l.length>1){for(var o=this.selection.block(),d=1,c=l.length;c>d;d++){var h=elCreate(o.nodeName);h.innerHTML="<kbd>"+l[d]+(d===c-1?this.marker.html():"")+"</kbd>",o.parentNode.insertBefore(h,o.nextSibling),o=h}r.innerHTML=l[0],this.selection.restore()}}else{var p=elCreate("div");p.innerHTML=e;var u=[];t.pre||t.text||elBySelAll("img",p,function(e){var t=e.src;if(0===t.indexOf("data:image")&&t!==n){e.src=n;var i=WCF.getUUID();elData(e,"uuid",i),u.push({src:t,uuid:i}),elHide(e)}}.bind(this)),elBySelAll(".redactor-selection-marker",p,elRemove),p.appendChild(elCreate("woltlab-selection-marker")),s.call(this,p.innerHTML,t);var f=elBySel("woltlab-selection-marker",this.$editor[0]);if(f){var b=document.createRange();b.setStartBefore(f),b.setEndBefore(f);var A=window.getSelection();A.removeAllRanges(),A.addRange(b),elRemove(f)}u.length&&window.setTimeout(function(){for(var e,t,i=0,r=u.length;r>i;i++)e=u[i],t=elBySel('img[data-uuid="'+e.uuid+'"]',this.$editor[0]),t&&WCF.System.Event.fireEvent("com.woltlab.wcf.redactor2","pasteFromClipboard_"+this.$element[0].id,{blob:this.utils.dataURItoBlob(e.src),replace:t})}.bind(this),50),this.rtePaste=!1}}.bind(this),this.paste.clipboardUpload=function(){}}}};
+$.Redactor.prototype.WoltLabPaste=function(){"use strict";return{init:function(){var e=null,t=!1,i=document.documentMode&&"object"==typeof window.clipboardData,r=this.paste.init;this.paste.init=function(a){var n="pre"===this.opts.type||this.utils.isCurrentOrParent("pre");if(t=!n&&this.utils.isCurrentOrParent("kbd"),n||t){e=i?window.clipboardData.getData("Text"):a.originalEvent.clipboardData.getData("text/plain");var s=this.clean.encodeEntities;this.clean.encodeEntities=function(e){return this.clean.encodeEntities=s,WCF.String.escapeHTML(e)}.bind(this)}r.call(this,a)}.bind(this);var a=this.paste.getPasteBoxCode;this.paste.getPasteBoxCode=function(r){var n=a.call(this,r);return t?e:!r||n&&!i?n:e}.bind(this),this.core.editor().off("paste.redactor").on("paste.redactor",this.paste.init.bind(this)),this.paste.detectClipboardUpload=function(e){e=e.originalEvent||e;var t;if(i){if(!window.clipboardData.files.length)return!1;t=window.clipboardData.files.item(0)}else{if(this.detect.isFirefox())return!1;var r=e.clipboardData,a=r.types;if(Array.isArray(a)&&-1!==a.indexOf("public.tiff"))return e.preventDefault(),!1;if(!r.items||!r.items.length)return;var n=!1;if(t=r.items[0].getAsFile(),null===t&&(this.detect.isWebkit()&&r.items.length>1&&(t=r.items[1].getAsFile(),n=!0,null!==t&&e.preventDefault()),null===t))return!1}var s=new FileReader;return s.readAsDataURL(t),s.onload=this.paste.insertFromClipboard.bind(this),n===!1}.bind(this),this.paste.insertFromClipboard=function(e){window.FormData&&(this.buffer.set(),WCF.System.Event.fireEvent("com.woltlab.wcf.redactor2","pasteFromClipboard_"+this.$element[0].id,{blob:this.utils.dataURItoBlob(e.target.result)}),this.rtePaste=!1)}.bind(this);var n="data:image/gif;base64,R0lGODlhAQABAIAAAAAAAP///yH5BAEAAAAALAAAAAABAAEAAAIBRAA7",s=this.paste.insert;this.paste.insert=function(e,i){if(t&&(i.pre=!0),i.pre)return s.call(this,e,i);if(this.utils.isCurrentOrParent("kbd")){s.call(this,e,i);var r=this.selection.current();r.nodeType===Node.TEXT_NODE&&(r=r.parentNode);for(var a=r.closest("kbd"),l=elByTag("p",a);l.length;)l[0].outerHTML=l[0].innerHTML;var o=a.innerHTML.split(/<br\s*\/?>/);if(o.length>1){for(var d=this.selection.block(),c=1,h=o.length;h>c;c++){var p=elCreate(d.nodeName);p.innerHTML="<kbd>"+o[c]+(c===h-1?this.marker.html():"")+"</kbd>",d.parentNode.insertBefore(p,d.nextSibling),d=p}a.innerHTML=o[0],this.selection.restore()}}else{var u=elCreate("div");u.innerHTML=e;var f=[];i.pre||i.text||elBySelAll("img",u,function(e){var t=e.src;if(0===t.indexOf("data:image")&&t!==n){e.src=n;var i=WCF.getUUID();elData(e,"uuid",i),f.push({src:t,uuid:i}),elHide(e)}}.bind(this)),elBySelAll(".redactor-selection-marker",u,elRemove),u.appendChild(elCreate("woltlab-selection-marker")),s.call(this,u.innerHTML,i);var b=elBySel("woltlab-selection-marker",this.$editor[0]);if(b){var A=document.createRange();A.setStartBefore(b),A.setEndBefore(b);var v=window.getSelection();v.removeAllRanges(),v.addRange(A),elRemove(b)}f.length&&window.setTimeout(function(){for(var e,t,i=0,r=f.length;r>i;i++)e=f[i],t=elBySel('img[data-uuid="'+e.uuid+'"]',this.$editor[0]),t&&WCF.System.Event.fireEvent("com.woltlab.wcf.redactor2","pasteFromClipboard_"+this.$element[0].id,{blob:this.utils.dataURItoBlob(e.src),replace:t})}.bind(this),50),this.rtePaste=!1}}.bind(this),this.paste.clipboardUpload=function(){}}}};
 // WoltLabQuote.js
 $.Redactor.prototype.WoltLabQuote=function(){"use strict";return{init:function(){var t=this.button.add("woltlabQuote","");this.WoltLabBlock.register("woltlab-quote",!0),this.opts.replaceTags.blockquote="woltlab-quote",this.opts.activeButtonsStates["woltlab-quote"]="woltlabQuote",require(["WoltLabSuite/Core/Ui/Redactor/Quote"],function(o){new o(this,t)}.bind(this))}}};
 // WoltLabReply.js