From 95a5686d7d4ab7eec3e701014d4cb021d1885b46 Mon Sep 17 00:00:00 2001 From: "woltlab.com" Date: Wed, 16 Nov 2016 16:16:46 +0100 Subject: [PATCH] Updating minified JavaScript files --- .../files/js/3rdParty/redactor2/plugins/combined.min.js | 6 +++--- wcfsetup/install/files/js/WoltLabSuite.Core.min.js | 2 +- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/wcfsetup/install/files/js/3rdParty/redactor2/plugins/combined.min.js b/wcfsetup/install/files/js/3rdParty/redactor2/plugins/combined.min.js index 4633812435..41a0728f1a 100644 --- a/wcfsetup/install/files/js/3rdParty/redactor2/plugins/combined.min.js +++ b/wcfsetup/install/files/js/3rdParty/redactor2/plugins/combined.min.js @@ -11,13 +11,13 @@ $.Redactor.prototype.WoltLabAttachment=function(){"use strict";return{init:funct // WoltLabAutosave.js $.Redactor.prototype.WoltLabAutosave=function(){"use strict";return{init:function(){this.opts.woltlab.autosave&&(this.opts.woltlab.autosave.watch(this),this.opts.woltlab.autosave.createOverlay(),WCF.System.Event.addListener("com.woltlab.wcf.redactor2","autosaveDestroy_"+this.$element[0].id,this.WoltLabAutosave.destroy.bind(this)),WCF.System.Event.addListener("com.woltlab.wcf.redactor2","autosaveReset_"+this.$element[0].id,this.WoltLabAutosave.reset.bind(this)))},destroy:function(){this.opts.woltlab.autosave&&this.opts.woltlab.autosave.destroy()},reset:function(){this.opts.woltlab.autosave&&this.opts.woltlab.autosave.clear()}}}; // WoltLabBlock.js -$.Redactor.prototype.WoltLabBlock=function(){"use strict";return{init:function(){this.block.tags=["p","blockquote","pre","h1","h2","h3","h4","h5","h6","div","figure"],this.block.format=function(t,o,e,i){return t="quote"===t?"blockquote":t,-1!==$.inArray(t,this.block.tags)?("p"===t&&"undefined"==typeof o&&(o="class"),this.placeholder.hide(),this.buffer.set(),this.utils.isCollapsed()?this.block.formatCollapsed(t,o,e,i):this.block.formatUncollapsed(t,o,e,i)):void 0}.bind(this);var t=this.block.formatCollapsed;this.block.formatCollapsed=function(o,e,i,s){for(var l=t.call(this,o,e,i,s),h=0,a=l.length;a>h;h++)this.WoltLabBlock._paragraphize(l[h]);return this.caret.end(l),l}.bind(this);var o=this.block.formatUncollapsed;this.block.formatUncollapsed=function(t,e,i,s){for(var l,h=o.call(this,t,e,i,s),a=null,r=0,n=h.length;n>r;r++)if(l=h[r][0],this.WoltLabBlock._paragraphize(l),0===r)a=l;else{for(;l.childNodes.length;)a.appendChild(l.childNodes[0]);elRemove(l)}return $(a)}.bind(this)},register:function(t,o){-1===this.block.tags.indexOf(t)&&(this.block.tags.push(t),this.opts.paragraphizeBlocks.push(t),-1===this.opts.blockTags.indexOf(t)&&(this.opts.blockTags.push(t),this.reIsBlock=new RegExp("^("+this.opts.blockTags.join("|").toUpperCase()+")$","i")),o&&this.WoltLabKeydown.register(t))},_paragraphize:function(t){if(-1===["p","pre","h1","h2","h3","h4","h5","h6","div","figure"].indexOf(t.nodeName.toLowerCase())){for(var o=elCreate("p");t.childNodes.length;)o.appendChild(t.childNodes[0]);t.appendChild(o)}}}}; +$.Redactor.prototype.WoltLabBlock=function(){"use strict";return{init:function(){this.block.tags=["p","blockquote","pre","h1","h2","h3","h4","h5","h6","div","figure"],this.block.format=function(t,e,o,i){return t="quote"===t?"blockquote":t,-1!==$.inArray(t,this.block.tags)?("p"===t&&"undefined"==typeof e&&(e="class"),this.placeholder.hide(),this.buffer.set(),this.utils.isCollapsed()?this.block.formatCollapsed(t,e,o,i):this.block.formatUncollapsed(t,e,o,i)):void 0}.bind(this);var t=this.block.formatCollapsed;this.block.formatCollapsed=function(e,o,i,s){if(this.detect.isFirefox()){var l=this.core.editor()[0];document.activeElement!==l&&(this.selection.restore(),document.activeElement!==l&&l.focus()),this.selection.block()===!1&&this.focus.end()}for(var h=t.call(this,e,o,i,s),a=0,r=h.length;r>a;a++)this.WoltLabBlock._paragraphize(h[a]);return this.caret.end(h),h}.bind(this);var e=this.block.formatUncollapsed;this.block.formatUncollapsed=function(t,o,i,s){for(var l,h=e.call(this,t,o,i,s),a=null,r=0,c=h.length;c>r;r++)if(l=h[r][0],this.WoltLabBlock._paragraphize(l),0===r)a=l;else{for(;l.childNodes.length;)a.appendChild(l.childNodes[0]);elRemove(l)}return $(a)}.bind(this)},register:function(t,e){-1===this.block.tags.indexOf(t)&&(this.block.tags.push(t),this.opts.paragraphizeBlocks.push(t),-1===this.opts.blockTags.indexOf(t)&&(this.opts.blockTags.push(t),this.reIsBlock=new RegExp("^("+this.opts.blockTags.join("|").toUpperCase()+")$","i")),e&&this.WoltLabKeydown.register(t))},_paragraphize:function(t){if(-1===["p","pre","h1","h2","h3","h4","h5","h6","div","figure"].indexOf(t.nodeName.toLowerCase())){for(var e=elCreate("p");t.childNodes.length;)e.appendChild(t.childNodes[0]);t.appendChild(e)}}}}; // WoltLabButton.js $.Redactor.prototype.WoltLabButton=function(){"use strict";var t;return{init:function(){var t,e,o,n;for(o=0,n=this.opts.woltlab.customButtons.length;n>o;o++)e=this.opts.woltlab.customButtons[o],t=this.button.add(e,""),this.button.addCallback(t,this.WoltLabButton._handleCustomButton);var s;for(o=0,n=this.opts.buttons.length;n>o;o++)if(e=this.opts.buttons[o],"wcfSeparator"!==e){if(!this.opts.woltlab.buttons.hasOwnProperty(e))throw new Error("Missing button definition for '"+e+"'.");switch(s=this.opts.woltlab.buttons[e],"underline"===e&&(this.opts.activeButtonsStates.u="underline"),e){case"subscript":case"superscript":t=this.button.addAfter(this.opts.buttons[o-1],e,""),this.button.setEvent(t,e,{func:"inline.format"}),this.opts.activeButtonsStates["subscript"===e?"sub":"sup"]=e;break;case"redo":case"undo":t=this.button.addAfter(this.opts.buttons[o-1],e,""),this.button.addCallback(t,this.buffer[e]);break;default:t=this.button.get(e)}if(this.button.setIcon(t,''),!t[0])throw new Error("Missing button element for '"+e+"'.");elAttr(t[0],"title",s.title),t[0].classList.add("jsTooltip")}for(var i,a={},l=[],r=this.core.toolbar()[0];r.childElementCount;)i=r.removeChild(r.children[0]),e=elAttr(i.children[0],"rel"),a[e]=i,l.push(e);var c=!1;for(o=0,n=this.opts.buttons.length;n>o;o++)e=this.opts.buttons[o],"wcfSeparator"!==e?(i=a[e],r.appendChild(i),l.splice(l.indexOf(e),1),c&&(i.classList.add("redactor-toolbar-separator"),c=!1)):c=!0;for(o=0,n=r.childElementCount;n>o;o++)i=r.children[o],t=i.children[0],elData(i,"show-on-mobile",-1!==this.opts.woltlab.buttonMobile.indexOf(t.rel));l.forEach(function(t){r.appendChild(a[t])}),WCF.DOMNodeInsertedHandler.execute(),require(["Ui/Screen"],function(t){t.on("screen-xs",{match:this.WoltLabButton._enableToggleButton.bind(this),unmatch:this.WoltLabButton._disableToggleButton.bind(this),setup:this.WoltLabButton._setupToggleButton.bind(this)})}.bind(this))},_handleCustomButton:function(t){var e={cancel:!1};if(WCF.System.Event.fireEvent("com.woltlab.wcf.redactor2","bbcode_"+t+"_"+this.$element[0].id,e),e.cancel!==!0){this.buffer.set();var o="["+t+"]"+this.selection.html()+(this.selection.is()?"":this.marker.html())+"[/"+t+"]";this.insert.html(o),this.selection.restore()}window.setTimeout(function(){document.activeElement!==this.$editor[0]&&this.$editor[0].focus()}.bind(this),10)},_enableToggleButton:function(){null===t.parentNode&&this.$toolbar[0].appendChild(t)},_disableToggleButton:function(){null!==t.parentNode&&this.$toolbar[0].removeChild(t)},_setupToggleButton:function(){t=elCreate("li"),t.className="redactorToolbarToggle",t.innerHTML='',elData(t,"show-on-mobile",!0);var e=t.children[0].children[0],o=function(t){t instanceof Event&&t.preventDefault(),this.$toolbar[0].classList.toggle("redactorToolbarOverride")&&document.activeElement&&document.activeElement!==this.$editor[0]&&document.activeElement.blur(),e.classList.toggle("fa-caret-down"),e.classList.toggle("fa-caret-up")}.bind(this);t.children[0].addEventListener("mousedown",o),this.$toolbar[0].appendChild(t),WCF.System.Event.addListener("com.woltlab.wcf.redactor2","reset_"+this.$element[0].id,function(){this.$toolbar[0].classList.contains("redactorToolbarOverride")&&o()}.bind(this))}}}; // 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(),require(["Environment"],function(e){"chrome"===e.browser()&&"android"===e.platform()&&elAttr(this.$editor[0],"autocomplete","off")}.bind(this))},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 o=this.selection.save;this.selection.save=function(){t=null,o.call(this)}.bind(this);var a=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))||a.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,o,a=t;a;){if(o=a.getBoundingClientRect(),e.clientYo.bottom))break;r=!1,t=a}if(!a.parentNode||a.parentNode===this.$editor[0])break;a=a.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(/&/g,"@@@WCF_AMPERSAND@@@"),t=e.call(this,t),t=t.replace(/@@@WCF_AMPERSAND@@@/g,"&");var n=elCreate("div");return n.innerHTML=t,elBySelAll("iframe",n,elRemove),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.match(/^[\s\u200B]+$/)){var n=elCreate("p");n.innerHTML="
",e.parentNode.insertBefore(n,e.nextSibling),e.removeChild(t.nextSibling),e.removeChild(t)}}),e=n.innerHTML,e=e.replace(/

\u200B<\/p>/g,"


"),e=e.replace(/&/g,"@@@WCF_AMPERSAND@@@"),e=t.call(this,e),e=e.replace(/@@@WCF_AMPERSAND@@@/g,"&"),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)return r.call(this,e,t,n);var l=elCreate("div");l.innerHTML=e;for(var i,a,o,s=elBySelAll("[style]",l),c=0,h=s.length;h>c;c++){i=s[c],o=[];for(var u=0,d=i.style.length;d>u;u++)a=i.style[u],-1===this.opts.woltlab.allowedInlineStyles.indexOf(a)&&o.push(a);o.forEach(function(e){i.style.removeProperty(e)})}return elBySelAll("span",l,function(e){if(!e.style.length||!e.hasAttribute("style")){for(;e.childNodes.length;)e.parentNode.insertBefore(e.childNodes[0],e);elRemove(e)}}),elBySelAll("p.MsoNormal",l,function(e){1===e.childElementCount&&"O:P"===e.children[0].nodeName&&" "===e.textContent&&(e.innerHTML="
")}),elBySelAll("br",l,function(e){e.parentNode.insertBefore(document.createTextNode("@@@WOLTLAB-BR-MARKER@@@"),e)}),e=r.call(this,l.innerHTML,t,n),e=e.replace(/@@@WOLTLAB-BR-MARKER@@@/g,""),l.innerHTML=e,elBySelAll("woltlab-br-marker",l,function(e){var t=e.parentNode;if("P"===t.nodeName){for(var n=elCreate("p");e.nextSibling;)n.appendChild(e.nextSibling);n.appendChild(elCreate("br")),t.parentNode.insertBefore(n,t.nextSibling);var r=e.previousElementSibling;r&&"BR"===r.nodeName&&elRemove(r)}else t.insertBefore(elCreate("br"),e);elRemove(e)}),l.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(/"/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){e.element.outerHTML="###custom"+t+"###"+e.element.innerHTML+"###/custom"+t+"###"});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}}}}; +$.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(/&/g,"@@@WCF_AMPERSAND@@@"),t=e.call(this,t),t=t.replace(/@@@WCF_AMPERSAND@@@/g,"&");var n=elCreate("div");return n.innerHTML=t,elBySelAll("iframe",n,elRemove),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="
",e.parentNode.insertBefore(n,e.nextSibling),e.removeChild(t.nextSibling),e.removeChild(t)}}),e=n.innerHTML,e=e.replace(/

\u200B<\/p>/g,"


"),e=e.replace(/&/g,"@@@WCF_AMPERSAND@@@"),e=t.call(this,e),e=e.replace(/@@@WCF_AMPERSAND@@@/g,"&"),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)return r.call(this,e,t,n);var l=elCreate("div");l.innerHTML=e;for(var i,a,o,s=elBySelAll("[style]",l),c=0,h=s.length;h>c;c++){i=s[c],o=[];for(var u=0,d=i.style.length;d>u;u++)a=i.style[u],-1===this.opts.woltlab.allowedInlineStyles.indexOf(a)&&o.push(a);o.forEach(function(e){i.style.removeProperty(e)})}return elBySelAll("span",l,function(e){if(!e.style.length||!e.hasAttribute("style")){for(;e.childNodes.length;)e.parentNode.insertBefore(e.childNodes[0],e);elRemove(e)}}),elBySelAll("p.MsoNormal",l,function(e){1===e.childElementCount&&"O:P"===e.children[0].nodeName&&" "===e.textContent&&(e.innerHTML="
")}),elBySelAll("br",l,function(e){e.parentNode.insertBefore(document.createTextNode("@@@WOLTLAB-BR-MARKER@@@"),e)}),e=r.call(this,l.innerHTML,t,n),e=e.replace(/@@@WOLTLAB-BR-MARKER@@@/g,""),l.innerHTML=e,elBySelAll("woltlab-br-marker",l,function(e){var t=e.parentNode;if("P"===t.nodeName){for(var n=elCreate("p");e.nextSibling;)n.appendChild(e.nextSibling);n.appendChild(elCreate("br")),t.parentNode.insertBefore(n,t.nextSibling);var r=e.previousElementSibling;r&&"BR"===r.nodeName&&elRemove(r)}else t.insertBefore(elCreate("br"),e);elRemove(e)}),l.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(/"/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){e.element.outerHTML="###custom"+t+"###"+e.element.innerHTML+"###/custom"+t+"###"});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}}}}; // 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 @@ -61,7 +61,7 @@ $.Redactor.prototype.WoltLabSize=function(){"use strict";return{init:function(){ // WoltLabSmiley.js $.Redactor.prototype.WoltLabSmiley=function(){"use strict";var t=0;return{init:function(){require(["EventHandler"],function(t){t.add("com.woltlab.wcf.redactor2","insertSmiley_"+this.$element[0].id,this.WoltLabSmiley._insert.bind(this))}.bind(this))},_insert:function(i){if(!this.WoltLabSource.isActive()){this.buffer.set();var e="wscSmiley_"+this.uuid+"_"+t++,r=i.img.cloneNode();r.id=e,this.insert.html(r.outerHTML),r=elById(e),r.removeAttribute("id"),r.outerHTML=r.outerHTML}}}}; // WoltLabSource.js -$.Redactor.prototype.WoltLabSource=function(){"use strict";return{init:function(){this.source.setCaretOnShow=function(){},this.source.setCaretOnHide=function(e){return e};var e=this.source.hide;this.source.hide=function(){e.call(this),setTimeout(this.focus.end.bind(this),100),this.placeholder.enable()}.bind(this);var t=this.source.$textarea[0];this.$element[0].parentNode.insertBefore(t,this.$element[0]);var r=this.source.show;this.source.show=function(){var e=this.$editor[0].offsetHeight;r.call(this),t.style.setProperty("height",Math.ceil(e)+"px",""),t.style.setProperty("display","block",""),t.value=this.WoltLabSource.format(t.value),t.selectionStart=t.selectionEnd=t.value.length}.bind(this),WCF.System.Event.addListener("com.woltlab.wcf.redactor2","validate_"+this.$element[0].id,function(e){t.clientHeight&&(e.api.throwError(this.$element[0],WCF.Language.get("wcf.editor.source.error.active")),e.valid=!1)}.bind(this))},isActive:function(){return"none"===this.$editor[0].style.getPropertyValue("display")},format:function(e){var t=this.block.tags.join("|").toLowerCase();t+="|ul|ol|li";var r="[^'\">]*(?:(?:\"[^\"]*\"|'[^']*')[^'\">]*)*",i=[];e=e.replace(new RegExp("[sS]*?","g"),function(e){return i.push(e),"@@@WCF_PRE_BACKUP_"+(i.length-1)+"@@@"}),e=e.replace(new RegExp("\\s*\\s*","g"),"\n"),e=e.replace(new RegExp("\\s*<("+t+")("+r+")>\\s*","g"),"\n<$1$2>\n"),e=e.replace(new RegExp("<(ol|ul)("+r+")>\\s*","g"),"<$1$2>\n");var n,s,o,a=e.split(/\n/),l=0,c=new RegExp("^<(?:"+t+")"),h=new RegExp("^$"),u=!1;for(n=0,s=a.length;s>n;n++){if(o=a[n],u=!1,o.match(c)?u=!0:o.match(h)&&l--,l>0){var p=l;for(a[n]="";p--;)a[n]+=" ";a[n]+=o}u&&l++}for(e=a.join("\n"),n=0,s=i.length;s>n;n++)e=e.replace("@@@WCF_PRE_BACKUP_"+n+"@@@",i[n]);return e.trim()}}}; +$.Redactor.prototype.WoltLabSource=function(){"use strict";return{init:function(){var e=function(e){elBySelAll("woltlab-quote",e,function(e){if(2===e.childElementCount&&"P"===e.children[0].nodeName&&"P"===e.children[1].nodeName){var t=e.children[0];if(""===t.innerHTML.trim()){var n=e.children[1];"
"===n.innerHTML.trim()&&e.removeChild(t)}}})};this.source.setCaretOnShow=function(){},this.source.setCaretOnHide=function(e){return e};var t=this.source.hide;this.source.hide=function(){t.call(this),setTimeout(function(){this.focus.end(),e(this.core.editor()[0])}.bind(this),100),this.placeholder.enable()}.bind(this);var n=this.source.$textarea[0];this.$element[0].parentNode.insertBefore(n,this.$element[0]);var r=this.source.show;this.source.show=function(){var t=this.$editor[0].offsetHeight;r.call(this),n.style.setProperty("height",Math.ceil(t)+"px",""),n.style.setProperty("display","block","");var i=elCreate("div");i.innerHTML=n.value,e(i),n.value=this.WoltLabSource.format(i.innerHTML),n.selectionStart=n.selectionEnd=n.value.length}.bind(this),WCF.System.Event.addListener("com.woltlab.wcf.redactor2","validate_"+this.$element[0].id,function(e){n.clientHeight&&(e.api.throwError(this.$element[0],WCF.Language.get("wcf.editor.source.error.active")),e.valid=!1)}.bind(this))},isActive:function(){return"none"===this.$editor[0].style.getPropertyValue("display")},format:function(e){var t=this.block.tags.join("|").toLowerCase();t+="|ul|ol|li";var n="[^'\">]*(?:(?:\"[^\"]*\"|'[^']*')[^'\">]*)*",r=[];e=e.replace(new RegExp("[sS]*?","g"),function(e){return r.push(e),"@@@WCF_PRE_BACKUP_"+(r.length-1)+"@@@"}),e=e.replace(new RegExp("\\s*\\s*","g"),"\n"),e=e.replace(new RegExp("\\s*<("+t+")("+n+")>\\s*","g"),"\n<$1$2>\n"),e=e.replace(/]*)>\n\t*\n(\t*)

\n$2\\s*","g"),"<$1$2>\n");var i,o,l,s=e.split(/\n/),a=0,c=new RegExp("^<(?:"+t+")"),h=new RegExp("^$"),u=!1;for(i=0,o=s.length;o>i;i++){if(l=s[i],u=!1,l.match(c)?u=!0:l.match(h)&&a--,a>0){var d=a;for(s[i]="";d--;)s[i]+=" ";s[i]+=l}u&&a++}for(e=s.join("\n"),i=0,o=r.length;o>i;i++)e=e.replace("@@@WCF_PRE_BACKUP_"+i+"@@@",r[i]);return e.trim()}}}; // WoltLabSpoiler.js $.Redactor.prototype.WoltLabSpoiler=function(){"use strict";return{init:function(){this.WoltLabBlock.register("woltlab-spoiler",!0),this.opts.activeButtonsStates["woltlab-spoiler"]="woltlabSpoiler",require(["WoltLabSuite/Core/Ui/Redactor/Spoiler"],function(t){new t(this)}.bind(this))}}}; // WoltLabUtils.js diff --git a/wcfsetup/install/files/js/WoltLabSuite.Core.min.js b/wcfsetup/install/files/js/WoltLabSuite.Core.min.js index ed6b453cad..1fd97ccf67 100644 --- a/wcfsetup/install/files/js/WoltLabSuite.Core.min.js +++ b/wcfsetup/install/files/js/WoltLabSuite.Core.min.js @@ -3,7 +3,7 @@ yy:{}};for(var m in this.yy)Object.prototype.hasOwnProperty.call(this.yy,m)&&(f. })},setAlignmentById:function(e){var t=u.get(e);if(void 0===t)throw new Error("Unknown dropdown identifier '"+e+"'.");var i=h.get(e);this.setAlignment(t,i)},isOpen:function(e){var t=h.get(e);return void 0!==t&&t.classList.contains("dropdownOpen")},open:function(e){var t=h.get(e);void 0===t||t.classList.contains("dropdownOpen")||this.toggleDropdown(e)},close:function(e){var t=u.get(e);void 0!==t&&(t.classList.remove("dropdownOpen"),h.get(e).classList.remove("dropdownOpen"))},closeAll:function(){u.forEach(function(e,t){e.classList.contains("dropdownOpen")&&(e.classList.remove("dropdownOpen"),h.get(t).classList.remove("dropdownOpen"),this._notifyCallbacks(t,"close"))}.bind(this))},destroy:function(e){if(!u.has(e))return!1;try{this.close(e);var t=h.get(e);h.parentNode.removeChild(t)}catch(i){}return h["delete"](e),u["delete"](e),!0},_onDialogScroll:function(e){for(var t=e.currentTarget,i=elBySelAll(".dropdown.dropdownOpen",t),n=0,a=i.length;a>n;n++){var r=i[n],s=o.identify(r),l=o.offset(r),c=o.offset(t);l.top+r.clientHeight<=c.top?this.toggleDropdown(s):l.top>=c.top+t.offsetHeight?this.toggleDropdown(s):l.left<=c.left?this.toggleDropdown(s):l.left>=c.left+t.offsetWidth?this.toggleDropdown(s):this.setAlignment(s,h.get(s))}},_onScroll:function(){u.forEach(function(e,t){e.classList.contains("dropdownOpen")&&(elDataBool(e,"is-overlay-dropdown-button")?this.setAlignment(e,h.get(t)):this.close(t))}.bind(this))},_notifyCallbacks:function(e,t){c.forEach(e,function(i){i(e,t)})},_toggle:function(e,t,i){null!==e&&(e.preventDefault(),e.stopPropagation(),t=elData(e.currentTarget,"target"));var n=u.get(t),a=!1;if(void 0!==n){if(e){var o=e.currentTarget,s=o.parentNode;s!==n&&(s.classList.add("dropdown"),s.id=n.id,n.classList.remove("dropdown"),n.id="",n=s,u.set(t,s))}if(elDataBool(n,"dropdown-prevent-toggle")&&n.classList.contains("dropdownOpen")&&(a=!0),null===elData(n,"is-overlay-dropdown-button")){var l=r.parentByClass(n,"dialogContent");elData(n,"is-overlay-dropdown-button",null!==l),null!==l&&l.addEventListener("scroll",this._onDialogScroll.bind(this))}}return u.forEach(function(e,n){var r=h.get(n);if(e.classList.contains("dropdownOpen"))a===!1&&(e.classList.remove("dropdownOpen"),r.classList.remove("dropdownOpen"),this._notifyCallbacks(n,"close"));else if(n===t&&r.childElementCount>0){if(e.classList.add("dropdownOpen"),r.classList.add("dropdownOpen"),r.childElementCount&&elDataBool(r.children[0],"scroll-to-active")){var o=r.children[0];o.removeAttribute("data-scroll-to-active");for(var s=null,l=0,c=o.childElementCount;c>l;l++)if(o.children[l].classList.contains("active")){s=o.children[l];break}s&&(o.scrollTop=Math.max(s.offsetTop+s.clientHeight-r.clientHeight,0))}var d=elBySel(".scrollableDropdownMenu",r);null!==d&&d.classList[d.scrollHeight>d.clientHeight?"add":"remove"]("forceScrollbar"),this._notifyCallbacks(n,"open"),this.setAlignment(e,r,i)}}.bind(this)),window.WCF.Dropdown.Interactive.Handler.closeAll(),null===e}}}),define("WoltLabSuite/Core/Ui/Dialog",["enquire","Ajax","Core","Dictionary","Environment","Language","ObjectMap","Dom/ChangeListener","Dom/Traverse","Dom/Util","Ui/Confirmation","Ui/Screen","Ui/SimpleDropdown"],function(e,t,i,n,a,r,o,s,l,c,d,u,h){"use strict";var p=null,f=null,m=new n,g=new o,v=!1,b=null,_=elByClass("jsStaticDialog");return{setup:function(){void 0===t&&(t=require("Ajax")),f=elCreate("div"),f.classList.add("dialogOverlay"),elAttr(f,"aria-hidden","true"),f.addEventListener(WCF_CLICK_EVENT,this._closeOnBackdrop.bind(this)),f.addEventListener("wheel",function(e){e.target===f&&e.preventDefault()}),elById("content").appendChild(f),b=function(e){return 27===e.keyCode&&"INPUT"!==e.target.nodeName&&"TEXTAREA"!==e.target.nodeName?(this.close(p),!1):!0}.bind(this),e.register("(max-width: 767px)",{match:function(){v=!0},unmatch:function(){v=!1},setup:function(){v=!0},deferSetup:!0}),this._initStaticDialogs(),s.add("Ui/Dialog",this._initStaticDialogs.bind(this)),u.setDialogContainer(f)},_initStaticDialogs:function(){for(var e,t,i;_.length;)e=_[0],e.classList.remove("jsStaticDialog"),i=elData(e,"dialog-id"),i&&(t=elById(i))&&function(e,t){t.classList.remove("jsStaticDialogContent"),elHide(t),e.addEventListener(WCF_CLICK_EVENT,this.openStatic.bind(this,t.id,null,{title:elData(t,"title")}))}.bind(this)(e,t)},open:function(e,n){var a=g.get(e);if(i.isPlainObject(a))return this.openStatic(a.id,n);if("function"!=typeof e._dialogSetup)throw new Error("Callback object does not implement the method '_dialogSetup()'.");var r=e._dialogSetup();if(!i.isPlainObject(r))throw new Error("Expected an object literal as return value of '_dialogSetup()'.");a={id:r.id};var o=!0;if(void 0===r.source){var s=elById(r.id);if(null===s)throw new Error("Element id '"+r.id+"' is invalid and no source attribute was given.");r.source=document.createDocumentFragment(),r.source.appendChild(s),s.removeAttribute("id"),elShow(s)}else if(null===r.source)r.source=n;else if("function"==typeof r.source)r.source();else if(i.isPlainObject(r.source)){if("string"!=typeof n||""===n.trim())return t.api(this,r.source.data,function(t){t.returnValues&&"string"==typeof t.returnValues.template&&(this.open(e,t.returnValues.template),"function"==typeof r.source.after&&r.source.after(m.get(r.id).content,t))}.bind(this)),{};r.source=n}else{if("string"==typeof r.source){var s=elCreate("div");elAttr(s,"id",r.id),c.setInnerHtml(s,r.source),r.source=document.createDocumentFragment(),r.source.appendChild(s)}if(!r.source.nodeType||r.source.nodeType!==Node.DOCUMENT_FRAGMENT_NODE)throw new Error("Expected at least a document fragment as 'source' attribute.");o=!1}return g.set(e,a),this.openStatic(r.id,r.source,r.options,o)},openStatic:function(e,t,n,o){document.documentElement.classList.add("pageOverlayActive"),m.has(e)?this._updateDialog(e,t):(n=i.extend({backdropCloseOnClick:!0,closable:!0,closeButtonLabel:r.get("wcf.global.button.close"),closeConfirmMessage:"",disableContentPadding:!1,title:"",onBeforeClose:null,onClose:null,onShow:null},n),n.closable||(n.backdropCloseOnClick=!1),n.closeConfirmMessage&&(n.onBeforeClose=function(e){d.show({confirm:this.close.bind(this,e),message:n.closeConfirmMessage})}.bind(this)),this._createDialog(e,t,n));var s=m.get(e);return"ios"===a.platform()?(u.scrollDisable(),window.setTimeout(function(){var e=elBySel("input, textarea",s.content);null!==e&&e.focus()}.bind(this),200)):"desktop"!==a.platform()&&u.scrollDisable(),s},setTitle:function(e,t){if("object"==typeof e){var i=g.get(e);void 0!==i&&(e=i.id)}var n=m.get(e);if(void 0===n)throw new Error("Expected a valid dialog id, '"+e+"' does not match any active dialog.");var a=elByClass("dialogTitle",n.dialog);a.length&&(a[0].textContent=t)},_createDialog:function(e,t,i,n){var a=null;if(null===t&&(a=elById(e),null===a))throw new Error("Expected either a HTML string or an existing element id.");var r=elCreate("div");r.classList.add("dialogContainer"),elAttr(r,"aria-hidden","true"),elAttr(r,"role","dialog"),elData(r,"id",e);var o=elCreate("header");r.appendChild(o);var s=c.getUniqueId();elAttr(r,"aria-labelledby",s);var l=elCreate("span");if(l.classList.add("dialogTitle"),l.textContent=i.title,elAttr(l,"id",s),o.appendChild(l),i.closable){var d=elCreate("a");d.className="dialogCloseButton jsTooltip",elAttr(d,"title",i.closeButtonLabel),elAttr(d,"aria-label",i.closeButtonLabel),d.addEventListener(WCF_CLICK_EVENT,this._close.bind(this)),o.appendChild(d);var u=elCreate("span");u.className="icon icon24 fa-times",d.appendChild(u)}var h=elCreate("div");h.classList.add("dialogContent"),i.disableContentPadding&&h.classList.add("dialogContentNoPadding"),r.appendChild(h),h.addEventListener("wheel",function(e){e.wheelDelta>0&&0===h.scrollTop?e.preventDefault():e.wheelDelta<0&&h.scrollTop+h.clientHeight===h.scrollHeight&&e.preventDefault()});var p;if(null===a){if("string"==typeof t)p=elCreate("div"),p.id=e,c.setInnerHtml(p,t);else if(t instanceof DocumentFragment){for(var g,v=[],b=0,_=t.childNodes.length;_>b;b++)g=t.childNodes[b],g.nodeType===Node.ELEMENT_NODE&&v.push(g);"div"!==v[0].nodeName||v.length>1?(p=elCreate("div"),p.id=e,p.appendChild(t)):p=t}}else p=a;h.appendChild(p),"none"===p.style.getPropertyValue("display")&&elShow(p),m.set(e,{backdropCloseOnClick:i.backdropCloseOnClick,content:p,dialog:r,header:o,onBeforeClose:i.onBeforeClose,onClose:i.onClose,onShow:i.onShow}),c.prepend(r,f),"function"==typeof i.onSetup&&i.onSetup(p),n!==!0&&this._updateDialog(e,null)},_updateDialog:function(e,t){var i=m.get(e);if(void 0===i)throw new Error("Expected a valid dialog id, '"+e+"' does not match any active dialog.");if("string"==typeof t){i.content.innerHTML="";var n=elCreate("div");c.setInnerHtml(n,t),i.content.appendChild(n)}if("true"===elAttr(i.dialog,"aria-hidden")){"true"===elAttr(f,"aria-hidden")&&window.addEventListener("keyup",b),elAttr(i.dialog,"aria-hidden","false"),elAttr(f,"aria-hidden","false"),elData(f,"close-on-click",i.backdropCloseOnClick?"true":"false"),p=e;var a=elBySel(".jsDialogAutoFocus",i.dialog);null!==a&&null!==a.offsetParent&&a.focus(),"function"==typeof i.onShow&&i.onShow(i.content),h.closeAll(),window.WCF.Dropdown.Interactive.Handler.closeAll()}this.rebuild(e),s.trigger()},rebuild:function(e){var t=m.get(e);if(void 0===t)throw new Error("Expected a valid dialog id, '"+e+"' does not match any active dialog.");if("true"!==elAttr(t.dialog,"aria-hidden")){var i=t.content.parentNode,n=elBySel(".formSubmit",t.content),r=0;null!==n?(i.classList.add("dialogForm"),n.classList.add("dialogFormSubmit"),r+=c.outerHeight(n),r-=1,i.style.setProperty("margin-bottom",r+"px","")):(i.classList.remove("dialogForm"),i.style.removeProperty("margin-bottom")),r+=c.outerHeight(t.header);var o=window.innerHeight*(v?1:.8)-r;i.style.setProperty("max-height",~~o+"px",""),"chrome"===a.browser()&&(t.content.scrollHeight>o?t.content.style.setProperty("margin-right","-1px",""):t.content.style.removeProperty("margin-right"))}},_close:function(e){e.preventDefault();var t=m.get(p);return"function"==typeof t.onBeforeClose?(t.onBeforeClose(p),!1):void this.close(p)},_closeOnBackdrop:function(e){return e.target!==f?!0:void("true"===elData(f,"close-on-click")?this._close(e):e.preventDefault())},close:function(e){if("object"==typeof e){var t=g.get(e);void 0!==t&&(e=t.id)}var i=m.get(e);if(void 0===i)throw new Error("Expected a valid dialog id, '"+e+"' does not match any active dialog.");"function"==typeof i.onClose&&i.onClose(e),elAttr(i.dialog,"aria-hidden","true"),p=null;for(var n=0;n=200&&this.status<300||304===this.status?n.responseType&&0!==this.getResponseHeader("Content-Type").indexOf(n.responseType)?i._failure(this,n):i._success(this,n):i._failure(this,n))},this._xhr.onerror=function(){i._failure(this,n)},this._options.progress&&(this._xhr.onprogress=this._options.progress),this._options.uploadProgress&&(this._xhr.upload.onprogress=this._options.uploadProgress),"POST"===this._options.type){var a=this._options.data;"object"==typeof a&&"FormData"!==e.getType(a)&&(a=e.serialize(a)),this._xhr.send(a)}else this._xhr.send()},abortPrevious:function(){null!==this._previousXhr&&(this._previousXhr.abort(),this._previousXhr=null,this._options.silent||r.hide())},setOption:function(e,t){this._options[e]=t},getOption:function(e){return objOwns(this._options,e)?this._options[e]:null},setData:function(t){null!==this._data&&"FormData"!==e.getType(t)&&(t=e.extend(this._data,t)),this._options.data=t},_success:function(e,t){if(t.silent||r.hide(),"function"==typeof t.success){var i=null;if("application/json"===e.getResponseHeader("Content-Type")){try{i=JSON.parse(e.responseText)}catch(n){return void this._failure(e,t)}i&&i.returnValues&&void 0!==i.returnValues.template&&(i.returnValues.template=i.returnValues.template.trim())}t.success(i,e.responseText,e,t.data)}this._finalize(t)},_failure:function(e,i){if(!l){i.silent||r.hide();var o=null;try{o=JSON.parse(e.responseText)}catch(s){}var c=!0;if(null!==o&&"function"==typeof i.failure&&(c=i.failure(o,e.responseText,e,i.data)),i.ignoreError!==!0&&c!==!1){var d="",u="";if(null!==o?(o.stacktrace?d="

Stacktrace:

"+o.stacktrace+"

":o.exceptionID&&(d="

Exception ID: "+o.exceptionID+"

"),u=o.message):u=e.responseText,!u||"undefined"===u)return;var h='

'+u+"

"+d+"
";void 0===a&&(a=require("Ui/Dialog")),a.openStatic(n.getUniqueId(),h,{title:t.get("wcf.global.error.title")})}this._finalize(i)}},_finalize:function(e){"function"==typeof e.finalize&&e.finalize(this._xhr),this._previousXhr=null,i.trigger();for(var t=elBySelAll('a[href*="#"]'),n=0,a=t.length;a>n;n++){var r=t[n],o=elAttr(r,"href");(-1!==o.indexOf("AJAXProxy")||-1!==o.indexOf("ajax-proxy"))&&(o=o.substr(o.indexOf("#")),elAttr(r,"href",document.location.toString().replace(/#.*/,"")+o))}}},o}),define("WoltLabSuite/Core/Ajax",["AjaxRequest","Core","ObjectMap"],function(e,t,i){"use strict";var n=new i,a={api:function(t,i,a,r){"object"!=typeof i&&(i={});var o=n.get(t);if(void 0===o){if("function"!=typeof t._ajaxSetup)throw new TypeError("Callback object must implement at least _ajaxSetup().");var s=t._ajaxSetup();s.pinData=!0,s.callbackObject=t,s.url||(s.url="index.php?ajax-proxy/&t="+SECURITY_TOKEN),o=new e(s),n.set(t,o)}var l=null,c=null;return"function"==typeof a&&(l=o.getOption("success"),o.setOption("success",a)),"function"==typeof r&&(c=o.getOption("failure"),o.setOption("failure",r)),o.setData(i),o.sendRequest(),null!==l&&o.setOption("success",l),null!==c&&o.setOption("failure",c),o},apiOnce:function(t){void 0===e&&(e=require("AjaxRequest")),t.pinData=!1,t.callbackObject=null,t.url||(t.url="index.php?ajax-proxy/&t="+SECURITY_TOKEN);var i=new e(t);i.sendRequest()}};return a}),function(){var e=function(e){"use strict";function t(e){if(e.paused||e.ended||g)return!1;try{d.clearRect(0,0,l,s),d.drawImage(e,0,0,l,s)}catch(i){}_=setTimeout(t,N.duration,e),k.setIcon(c)}function i(e){var t=/^#?([a-f\d])([a-f\d])([a-f\d])$/i;e=e.replace(t,function(e,t,i,n){return t+t+i+i+n+n});var i=/^#?([a-f\d]{2})([a-f\d]{2})([a-f\d]{2})$/i.exec(e);return i?{r:parseInt(i[1],16),g:parseInt(i[2],16),b:parseInt(i[3],16)}:!1}function n(e,t){var i,n={};for(i in e)n[i]=e[i];for(i in t)n[i]=t[i];return n}function a(){return document.hidden||document.msHidden||document.webkitHidden||document.mozHidden}e=e?e:{};var r,o,s,l,c,d,u,h,p,f,m,g,v,b,_,w={bgColor:"#d00",textColor:"#fff",fontFamily:"sans-serif",fontStyle:"bold",type:"circle",position:"down",animation:"slide",elementId:!1,dataUrl:!1};v={},v.ff="undefined"!=typeof InstallTrigger,v.chrome=!!window.chrome,v.opera=!!window.opera||navigator.userAgent.indexOf("Opera")>=0,v.ie=!1,v.safari=Object.prototype.toString.call(window.HTMLElement).indexOf("Constructor")>0,v.supported=v.chrome||v.ff||v.opera;var y=[];m=function(){},h=g=!1;var C=function(){r=n(w,e),r.bgColor=i(r.bgColor),r.textColor=i(r.textColor),r.position=r.position.toLowerCase(),r.animation=N.types[""+r.animation]?r.animation:w.animation;var t=r.position.indexOf("up")>-1,a=r.position.indexOf("left")>-1;if(t||a)for(var h=0;h0?u.height:32,l=u.width>0?u.width:32,c.height=s,c.width=l,d=c.getContext("2d"),L.ready()}):(u.setAttribute("src",""),s=32,l=32,u.height=s,u.width=l,c.height=s,c.width=l,d=c.getContext("2d"),L.ready())},L={};L.ready=function(){h=!0,L.reset(),m()},L.reset=function(){h&&(y=[],p=!1,f=!1,d.clearRect(0,0,l,s),d.drawImage(u,0,0,l,s),k.setIcon(c),window.clearTimeout(b),window.clearTimeout(_))},L.start=function(){if(h&&!f){var e=function(){p=y[0],f=!1,y.length>0&&(y.shift(),L.start())};if(y.length>0){f=!0;var t=function(){["type","animation","bgColor","textColor","fontFamily","fontStyle"].forEach(function(e){e in y[0].options&&(r[e]=y[0].options[e])}),N.run(y[0].options,function(){e()},!1)};p?N.run(p.options,function(){t()},!0):t()}}};var E={},S=function(e){return e.n="number"==typeof e.n?Math.abs(0|e.n):e.n,e.x=l*e.x,e.y=s*e.y,e.w=l*e.w,e.h=s*e.h,e.len=(""+e.n).length,e};E.circle=function(e){e=S(e);var t=!1;2===e.len?(e.x=e.x-.4*e.w,e.w=1.4*e.w,t=!0):e.len>=3&&(e.x=e.x-.65*e.w,e.w=1.65*e.w,t=!0),d.clearRect(0,0,l,s),d.drawImage(u,0,0,l,s),d.beginPath(),d.font=r.fontStyle+" "+Math.floor(e.h*(e.n>99?.85:1))+"px "+r.fontFamily,d.textAlign="center",t?(d.moveTo(e.x+e.w/2,e.y),d.lineTo(e.x+e.w-e.h/2,e.y),d.quadraticCurveTo(e.x+e.w,e.y,e.x+e.w,e.y+e.h/2),d.lineTo(e.x+e.w,e.y+e.h-e.h/2),d.quadraticCurveTo(e.x+e.w,e.y+e.h,e.x+e.w-e.h/2,e.y+e.h),d.lineTo(e.x+e.h/2,e.y+e.h),d.quadraticCurveTo(e.x,e.y+e.h,e.x,e.y+e.h-e.h/2),d.lineTo(e.x,e.y+e.h/2),d.quadraticCurveTo(e.x,e.y,e.x+e.h/2,e.y)):d.arc(e.x+e.w/2,e.y+e.h/2,e.h/2,0,2*Math.PI),d.fillStyle="rgba("+r.bgColor.r+","+r.bgColor.g+","+r.bgColor.b+","+e.o+")",d.fill(),d.closePath(),d.beginPath(),d.stroke(),d.fillStyle="rgba("+r.textColor.r+","+r.textColor.g+","+r.textColor.b+","+e.o+")","number"==typeof e.n&&e.n>999?d.fillText((e.n>9999?9:Math.floor(e.n/1e3))+"k+",Math.floor(e.x+e.w/2),Math.floor(e.y+e.h-.2*e.h)):d.fillText(e.n,Math.floor(e.x+e.w/2),Math.floor(e.y+e.h-.15*e.h)),d.closePath()},E.rectangle=function(e){e=S(e);var t=!1;2===e.len?(e.x=e.x-.4*e.w,e.w=1.4*e.w,t=!0):e.len>=3&&(e.x=e.x-.65*e.w,e.w=1.65*e.w,t=!0),d.clearRect(0,0,l,s),d.drawImage(u,0,0,l,s),d.beginPath(),d.font=r.fontStyle+" "+Math.floor(e.h*(e.n>99?.9:1))+"px "+r.fontFamily,d.textAlign="center",d.fillStyle="rgba("+r.bgColor.r+","+r.bgColor.g+","+r.bgColor.b+","+e.o+")",d.fillRect(e.x,e.y,e.w,e.h),d.fillStyle="rgba("+r.textColor.r+","+r.textColor.g+","+r.textColor.b+","+e.o+")","number"==typeof e.n&&e.n>999?d.fillText((e.n>9999?9:Math.floor(e.n/1e3))+"k+",Math.floor(e.x+e.w/2),Math.floor(e.y+e.h-.2*e.h)):d.fillText(e.n,Math.floor(e.x+e.w/2),Math.floor(e.y+e.h-.15*e.h)),d.closePath()};var x=function(e,t){t=("string"==typeof t?{animation:t}:t)||{},m=function(){try{if("number"==typeof e?e>0:""!==e){var n={type:"badge",options:{n:e}};if("animation"in t&&N.types[""+t.animation]&&(n.options.animation=""+t.animation),"type"in t&&E[""+t.type]&&(n.options.type=""+t.type),["bgColor","textColor"].forEach(function(e){e in t&&(n.options[e]=i(t[e]))}),["fontStyle","fontFamily"].forEach(function(e){e in t&&(n.options[e]=t[e])}),y.push(n),y.length>100)throw"Too many badges requests in queue.";L.start()}else L.reset()}catch(a){throw"Error setting badge. Message: "+a.message}},h&&m()},D=function(e){m=function(){try{var t=e.width,i=e.height,n=document.createElement("img"),a=i/s>t/l?t/l:i/s;n.setAttribute("src",e.getAttribute("src")),n.height=i/a,n.width=t/a,d.clearRect(0,0,l,s),d.drawImage(n,0,0,l,s),k.setIcon(c)}catch(r){throw"Error setting image. Message: "+r.message}},h&&m()},T=function(e){m=function(){try{if("stop"===e)return g=!0,L.reset(),void(g=!1);e.addEventListener("play",function(){t(this)},!1)}catch(i){throw"Error setting video. Message: "+i.message}},h&&m()},I=function(e){if(window.URL&&window.URL.createObjectURL||(window.URL=window.URL||{},window.URL.createObjectURL=function(e){return e}),v.supported){var i=!1;navigator.getUserMedia=navigator.getUserMedia||navigator.oGetUserMedia||navigator.msGetUserMedia||navigator.mozGetUserMedia||navigator.webkitGetUserMedia,m=function(){try{if("stop"===e)return g=!0,L.reset(),void(g=!1);i=document.createElement("video"),i.width=l,i.height=s,navigator.getUserMedia({video:!0,audio:!1},function(e){i.src=URL.createObjectURL(e),i.play(),t(i)},function(){})}catch(n){throw"Error setting webcam. Message: "+n.message}},h&&m()}},k={};k.getIcon=function(){var e=!1,t=function(){for(var e=document.getElementsByTagName("head")[0].getElementsByTagName("link"),t=e.length,i=t-1;i>=0;i--)if(/(^|\s)icon(\s|$)/i.test(e[i].getAttribute("rel")))return e[i];return!1};return r.element?e=r.element:r.elementId?(e=document.getElementById(r.elementId),e.setAttribute("href",e.getAttribute("src"))):(e=t(),e===!1&&(e=document.createElement("link"),e.setAttribute("rel","icon"),document.getElementsByTagName("head")[0].appendChild(e))),e.setAttribute("type","image/png"),e},k.setIcon=function(e){var t=e.toDataURL("image/png");if(r.dataUrl&&r.dataUrl(t),r.element)r.element.setAttribute("src",t);else if(r.elementId)document.getElementById(r.elementId).setAttribute("src",t);else if(v.ff||v.opera){var i=o;o=document.createElement("link"),v.opera&&o.setAttribute("rel","icon"),o.setAttribute("rel","icon"),o.setAttribute("type","image/png"),document.getElementsByTagName("head")[0].appendChild(o),o.setAttribute("href",t),i.parentNode&&i.parentNode.removeChild(i)}else o.setAttribute("href",t)};var N={};return N.duration=40,N.types={},N.types.fade=[{x:.4,y:.4,w:.6,h:.6,o:0},{x:.4,y:.4,w:.6,h:.6,o:.1},{x:.4,y:.4,w:.6,h:.6,o:.2},{x:.4,y:.4,w:.6,h:.6,o:.3},{x:.4,y:.4,w:.6,h:.6,o:.4},{x:.4,y:.4,w:.6,h:.6,o:.5},{x:.4,y:.4,w:.6,h:.6,o:.6},{x:.4,y:.4,w:.6,h:.6,o:.7},{x:.4,y:.4,w:.6,h:.6,o:.8},{x:.4,y:.4,w:.6,h:.6,o:.9},{x:.4,y:.4,w:.6,h:.6,o:1}],N.types.none=[{x:.4,y:.4,w:.6,h:.6,o:1}],N.types.pop=[{x:1,y:1,w:0,h:0,o:1},{x:.9,y:.9,w:.1,h:.1,o:1},{x:.8,y:.8,w:.2,h:.2,o:1},{x:.7,y:.7,w:.3,h:.3,o:1},{x:.6,y:.6,w:.4,h:.4,o:1},{x:.5,y:.5,w:.5,h:.5,o:1},{x:.4,y:.4,w:.6,h:.6,o:1}],N.types.popFade=[{x:.75,y:.75,w:0,h:0,o:0},{x:.65,y:.65,w:.1,h:.1,o:.2},{x:.6,y:.6,w:.2,h:.2,o:.4},{x:.55,y:.55,w:.3,h:.3,o:.6},{x:.5,y:.5,w:.4,h:.4,o:.8},{x:.45,y:.45,w:.5,h:.5,o:.9},{x:.4,y:.4,w:.6,h:.6,o:1}],N.types.slide=[{x:.4,y:1,w:.6,h:.6,o:1},{x:.4,y:.9,w:.6,h:.6,o:1},{x:.4,y:.9,w:.6,h:.6,o:1},{x:.4,y:.8,w:.6,h:.6,o:1},{x:.4,y:.7,w:.6,h:.6,o:1},{x:.4,y:.6,w:.6,h:.6,o:1},{x:.4,y:.5,w:.6,h:.6,o:1},{x:.4,y:.4,w:.6,h:.6,o:1}],N.run=function(e,t,i,o){var s=N.types[a()?"none":r.animation];return o=i===!0?"undefined"!=typeof o?o:s.length-1:"undefined"!=typeof o?o:0,t=t?t:function(){},o=0?(E[r.type](n(e,s[o])),b=setTimeout(function(){i?o-=1:o+=1,N.run(e,t,i,o)},N.duration),k.setIcon(c),void 0):void t()},C(),{badge:x,video:T,image:D,webcam:I,reset:L.reset,browser:{supported:v.supported}}};"undefined"!=typeof define&&define.amd?define("favico",[],function(){return e}):"undefined"!=typeof module&&module.exports?module.exports=e:this.Favico=e}(),function e(t,i,n){function a(o,s){if(!i[o]){if(!t[o]){var l="function"==typeof require&&require;if(!s&&l)return l(o,!0);if(r)return r(o,!0);var c=new Error("Cannot find module '"+o+"'");throw c.code="MODULE_NOT_FOUND",c}var d=i[o]={exports:{}};t[o][0].call(d.exports,function(e){var i=t[o][1][e];return a(i?i:e)},d,d.exports,e,t,i,n)}return i[o].exports}for(var r="function"==typeof require&&require,o=0;o=0&&i.splice(n,1),e.className=i.join(" ")}i.add=function(e,t){e.classList?e.classList.add(t):n(e,t)},i.remove=function(e,t){e.classList?e.classList.remove(t):a(e,t)},i.list=function(e){return e.classList?e.classList:e.className.split(" ")}},{}],3:[function(e,t,i){"use strict";function n(e,t){return window.getComputedStyle(e)[t]}function a(e,t,i){return"number"==typeof i&&(i=i.toString()+"px"),e.style[t]=i,e}function r(e,t){for(var i in t){var n=t[i];"number"==typeof n&&(n=n.toString()+"px"),e.style[i]=n}return e}i.e=function(e,t){var i=document.createElement(e);return i.className=t,i},i.appendTo=function(e,t){return t.appendChild(e),e},i.css=function(e,t,i){return"object"==typeof t?r(e,t):"undefined"==typeof i?n(e,t):a(e,t,i)},i.matches=function(e,t){return"undefined"!=typeof e.matches?e.matches(t):"undefined"!=typeof e.matchesSelector?e.matchesSelector(t):"undefined"!=typeof e.webkitMatchesSelector?e.webkitMatchesSelector(t):"undefined"!=typeof e.mozMatchesSelector?e.mozMatchesSelector(t):"undefined"!=typeof e.msMatchesSelector?e.msMatchesSelector(t):void 0},i.remove=function(e){"undefined"!=typeof e.remove?e.remove():e.parentNode&&e.parentNode.removeChild(e)}},{}],4:[function(e,t,i){"use strict";var n=function(e){this.element=e,this.events={}};n.prototype.bind=function(e,t){"undefined"==typeof this.events[e]&&(this.events[e]=[]),this.events[e].push(t),this.element.addEventListener(e,t,!1)},n.prototype.unbind=function(e,t){var i="undefined"!=typeof t;this.events[e]=this.events[e].filter(function(n){return i&&n!==t?!0:(this.element.removeEventListener(e,n,!1),!1)},this)},n.prototype.unbindAll=function(){for(var e in this.events)this.unbind(e)};var a=function(){this.eventElements=[]};a.prototype.eventElement=function(e){var t=this.eventElements.filter(function(t){return t.element===e})[0];return"undefined"==typeof t&&(t=new n(e),this.eventElements.push(t)),t},a.prototype.bind=function(e,t,i){this.eventElement(e).bind(t,i)},a.prototype.unbind=function(e,t,i){this.eventElement(e).unbind(t,i)},a.prototype.unbindAll=function(){for(var e=0;ec?c=0:c>1&&(c=1),e.scrollTop=(t.contentHeight-t.containerHeight)*c,o(e)}),t.event.bind(t.scrollbarX,"click",n),t.event.bind(t.scrollbarXRail,"click",function(n){var r=a.toInt(t.scrollbarXWidth/2),s=n.pageX-i(t.scrollbarXRail).left-r; console.log(n.pageX,t.scrollbarXRail.offsetLeft);var l=t.containerWidth-t.scrollbarXWidth,c=s/l;0>c?c=0:c>1&&(c=1),e.scrollLeft=(t.contentWidth-t.containerWidth)*c,o(e)})}var a=e("../../lib/helper"),r=e("../instances"),o=e("../update-geometry");t.exports=function(e){var t=r.get(e);n(e,t)}},{"../../lib/helper":6,"../instances":18,"../update-geometry":19}],11:[function(e,t,i){"use strict";function n(e,t){function i(i){var a=n+i,r=t.containerWidth-t.scrollbarXWidth;0>a?t.scrollbarXLeft=0:a>r?t.scrollbarXLeft=r:t.scrollbarXLeft=a;var s=o.toInt(t.scrollbarXLeft*(t.contentWidth-t.containerWidth)/(t.containerWidth-t.scrollbarXWidth));e.scrollLeft=s}var n=null,a=null,s=function(t){i(t.pageX-a),l(e),t.stopPropagation(),t.preventDefault()},c=function(){o.stopScrolling(e,"x"),t.event.unbind(t.ownerDocument,"mousemove",s)};t.event.bind(t.scrollbarX,"mousedown",function(i){a=i.pageX,n=o.toInt(r.css(t.scrollbarX,"left")),o.startScrolling(e,"x"),t.event.bind(t.ownerDocument,"mousemove",s),t.event.once(t.ownerDocument,"mouseup",c),i.stopPropagation(),i.preventDefault()})}function a(e,t){function i(i){var a=n+i,r=t.containerHeight-t.scrollbarYHeight;0>a?t.scrollbarYTop=0:a>r?t.scrollbarYTop=r:t.scrollbarYTop=a;var s=o.toInt(t.scrollbarYTop*(t.contentHeight-t.containerHeight)/(t.containerHeight-t.scrollbarYHeight));e.scrollTop=s}var n=null,a=null,s=function(t){i(t.pageY-a),l(e),t.stopPropagation(),t.preventDefault()},c=function(){o.stopScrolling(e,"y"),t.event.unbind(t.ownerDocument,"mousemove",s)};t.event.bind(t.scrollbarY,"mousedown",function(i){a=i.pageY,n=o.toInt(r.css(t.scrollbarY,"top")),o.startScrolling(e,"y"),t.event.bind(t.ownerDocument,"mousemove",s),t.event.once(t.ownerDocument,"mouseup",c),i.stopPropagation(),i.preventDefault()})}var r=e("../../lib/dom"),o=e("../../lib/helper"),s=e("../instances"),l=e("../update-geometry");t.exports=function(e){var t=s.get(e);n(e,t),a(e,t)}},{"../../lib/dom":3,"../../lib/helper":6,"../instances":18,"../update-geometry":19}],12:[function(e,t,i){"use strict";function n(e,t){function i(i,n){var a=e.scrollTop;if(0===i){if(!t.scrollbarYActive)return!1;if(0===a&&n>0||a>=t.contentHeight-t.containerHeight&&0>n)return!t.settings.wheelPropagation}var r=e.scrollLeft;if(0===n){if(!t.scrollbarXActive)return!1;if(0===r&&0>i||r>=t.contentWidth-t.containerWidth&&i>0)return!t.settings.wheelPropagation}return!0}var n=!1;t.event.bind(e,"mouseenter",function(){n=!0}),t.event.bind(e,"mouseleave",function(){n=!1});var r=!1;t.event.bind(t.ownerDocument,"keydown",function(s){if((!s.isDefaultPrevented||!s.isDefaultPrevented())&&n){var l=document.activeElement?document.activeElement:t.ownerDocument.activeElement;if(l){for(;l.shadowRoot;)l=l.shadowRoot.activeElement;if(a.isEditable(l))return}var c=0,d=0;switch(s.which){case 37:c=-30;break;case 38:d=30;break;case 39:c=30;break;case 40:d=-30;break;case 33:d=90;break;case 32:case 34:d=-90;break;case 35:d=s.ctrlKey?-t.contentHeight:-t.containerHeight;break;case 36:d=s.ctrlKey?e.scrollTop:t.containerHeight;break;default:return}e.scrollTop=e.scrollTop-d,e.scrollLeft=e.scrollLeft+c,o(e),r=i(c,d),r&&s.preventDefault()}})}var a=e("../../lib/helper"),r=e("../instances"),o=e("../update-geometry");t.exports=function(e){var t=r.get(e);n(e,t)}},{"../../lib/helper":6,"../instances":18,"../update-geometry":19}],13:[function(e,t,i){"use strict";function n(e,t){function i(i,n){var a=e.scrollTop;if(0===i){if(!t.scrollbarYActive)return!1;if(0===a&&n>0||a>=t.contentHeight-t.containerHeight&&0>n)return!t.settings.wheelPropagation}var r=e.scrollLeft;if(0===n){if(!t.scrollbarXActive)return!1;if(0===r&&0>i||r>=t.contentWidth-t.containerWidth&&i>0)return!t.settings.wheelPropagation}return!0}function n(e){var t=e.deltaX,i=-1*e.deltaY;return("undefined"==typeof t||"undefined"==typeof i)&&(t=-1*e.wheelDeltaX/6,i=e.wheelDeltaY/6),e.deltaMode&&1===e.deltaMode&&(t*=10,i*=10),t!==t&&i!==i&&(t=0,i=e.wheelDelta),[t,i]}function r(t,i){var n=e.querySelector("textarea:hover");if(n){var a=n.scrollHeight-n.clientHeight;if(a>0&&!(0===n.scrollTop&&i>0||n.scrollTop===a&&0>i))return!0;var r=n.scrollLeft-n.clientWidth;if(r>0&&!(0===n.scrollLeft&&0>t||n.scrollLeft===r&&t>0))return!0}return!1}function s(s){if(a.env.isWebKit||!e.querySelector("select:focus")){var c=n(s),d=c[0],u=c[1];r(d,u)||(l=!1,t.settings.useBothWheelAxes?t.scrollbarYActive&&!t.scrollbarXActive?(u?e.scrollTop=e.scrollTop-u*t.settings.wheelSpeed:e.scrollTop=e.scrollTop+d*t.settings.wheelSpeed,l=!0):t.scrollbarXActive&&!t.scrollbarYActive&&(d?e.scrollLeft=e.scrollLeft+d*t.settings.wheelSpeed:e.scrollLeft=e.scrollLeft-u*t.settings.wheelSpeed,l=!0):(e.scrollTop=e.scrollTop-u*t.settings.wheelSpeed,e.scrollLeft=e.scrollLeft+d*t.settings.wheelSpeed),o(e),l=l||i(d,u),l&&(s.stopPropagation(),s.preventDefault()))}}var l=!1;"undefined"!=typeof window.onwheel?t.event.bind(e,"wheel",s):"undefined"!=typeof window.onmousewheel&&t.event.bind(e,"mousewheel",s)}var a=e("../../lib/helper"),r=e("../instances"),o=e("../update-geometry");t.exports=function(e){var t=r.get(e);n(e,t)}},{"../../lib/helper":6,"../instances":18,"../update-geometry":19}],14:[function(e,t,i){"use strict";function n(e,t){t.event.bind(e,"scroll",function(){r(e)})}var a=e("../instances"),r=e("../update-geometry");t.exports=function(e){var t=a.get(e);n(e,t)}},{"../instances":18,"../update-geometry":19}],15:[function(e,t,i){"use strict";function n(e,t){function i(){var e=window.getSelection?window.getSelection():document.getSelection?document.getSelection():"";return 0===e.toString().length?null:e.getRangeAt(0).commonAncestorContainer}function n(){l||(l=setInterval(function(){return r.get(e)?(e.scrollTop=e.scrollTop+c.top,e.scrollLeft=e.scrollLeft+c.left,void o(e)):void clearInterval(l)},50))}function s(){l&&(clearInterval(l),l=null),a.stopScrolling(e)}var l=null,c={top:0,left:0},d=!1;t.event.bind(t.ownerDocument,"selectionchange",function(){e.contains(i())?d=!0:(d=!1,s())}),t.event.bind(window,"mouseup",function(){d&&(d=!1,s())}),t.event.bind(window,"mousemove",function(t){if(d){var i={x:t.pageX,y:t.pageY},r={left:e.offsetLeft,right:e.offsetLeft+e.offsetWidth,top:e.offsetTop,bottom:e.offsetTop+e.offsetHeight};i.xr.right-3?(c.left=5,a.startScrolling(e,"x")):c.left=0,i.yr.bottom-3?(i.y-r.bottom+3<5?c.top=5:c.top=20,a.startScrolling(e,"y")):c.top=0,0===c.top&&0===c.left?s():n()}})}var a=e("../../lib/helper"),r=e("../instances"),o=e("../update-geometry");t.exports=function(e){var t=r.get(e);n(e,t)}},{"../../lib/helper":6,"../instances":18,"../update-geometry":19}],16:[function(e,t,i){"use strict";function n(e,t,i,n){function o(i,n){var a=e.scrollTop,r=e.scrollLeft,o=Math.abs(i),s=Math.abs(n);if(s>o){if(0>n&&a===t.contentHeight-t.containerHeight||n>0&&0===a)return!t.settings.swipePropagation}else if(o>s&&(0>i&&r===t.contentWidth-t.containerWidth||i>0&&0===r))return!t.settings.swipePropagation;return!0}function s(t,i){e.scrollTop=e.scrollTop-i,e.scrollLeft=e.scrollLeft-t,r(e)}function l(){_=!0}function c(){_=!1}function d(e){return e.targetTouches?e.targetTouches[0]:e}function u(e){return e.targetTouches&&1===e.targetTouches.length?!0:e.pointerType&&"mouse"!==e.pointerType&&e.pointerType!==e.MSPOINTER_TYPE_MOUSE?!0:!1}function h(e){if(u(e)){w=!0;var t=d(e);m.pageX=t.pageX,m.pageY=t.pageY,g=(new Date).getTime(),null!==b&&clearInterval(b),e.stopPropagation()}}function p(e){if(!_&&w&&u(e)){var t=d(e),i={pageX:t.pageX,pageY:t.pageY},n=i.pageX-m.pageX,a=i.pageY-m.pageY;s(n,a),m=i;var r=(new Date).getTime(),l=r-g;l>0&&(v.x=n/l,v.y=a/l,g=r),o(n,a)&&(e.stopPropagation(),e.preventDefault())}}function f(){!_&&w&&(w=!1,clearInterval(b),b=setInterval(function(){return a.get(e)?Math.abs(v.x)<.01&&Math.abs(v.y)<.01?void clearInterval(b):(s(30*v.x,30*v.y),v.x*=.8,void(v.y*=.8)):void clearInterval(b)},10))}var m={},g=0,v={},b=null,_=!1,w=!1;i&&(t.event.bind(window,"touchstart",l),t.event.bind(window,"touchend",c),t.event.bind(e,"touchstart",h),t.event.bind(e,"touchmove",p),t.event.bind(e,"touchend",f)),n&&(window.PointerEvent?(t.event.bind(window,"pointerdown",l),t.event.bind(window,"pointerup",c),t.event.bind(e,"pointerdown",h),t.event.bind(e,"pointermove",p),t.event.bind(e,"pointerup",f)):window.MSPointerEvent&&(t.event.bind(window,"MSPointerDown",l),t.event.bind(window,"MSPointerUp",c),t.event.bind(e,"MSPointerDown",h),t.event.bind(e,"MSPointerMove",p),t.event.bind(e,"MSPointerUp",f)))}var a=e("../instances"),r=e("../update-geometry");t.exports=function(e,t,i){var r=a.get(e);n(e,r,t,i)}},{"../instances":18,"../update-geometry":19}],17:[function(e,t,i){"use strict";var n=e("../lib/class"),a=e("../lib/helper"),r=e("./instances"),o=e("./update-geometry"),s=e("./handler/click-rail"),l=e("./handler/drag-scrollbar"),c=e("./handler/keyboard"),d=e("./handler/mouse-wheel"),u=e("./handler/native-scroll"),h=e("./handler/selection"),p=e("./handler/touch");t.exports=function(e,t){t="object"==typeof t?t:{},n.add(e,"ps-container");var i=r.add(e);i.settings=a.extend(i.settings,t),s(e),l(e),d(e),u(e),h(e),(a.env.supportsTouch||a.env.supportsIePointer)&&p(e,a.env.supportsTouch,a.env.supportsIePointer),i.settings.useKeyboard&&c(e),o(e)}},{"../lib/class":2,"../lib/helper":6,"./handler/click-rail":10,"./handler/drag-scrollbar":11,"./handler/keyboard":12,"./handler/mouse-wheel":13,"./handler/native-scroll":14,"./handler/selection":15,"./handler/touch":16,"./instances":18,"./update-geometry":19}],18:[function(e,t,i){"use strict";function n(e){var t=this;t.settings=u.clone(l),t.containerWidth=null,t.containerHeight=null,t.contentWidth=null,t.contentHeight=null,t.isRtl="rtl"===s.css(e,"direction"),t.event=new c,t.ownerDocument=e.ownerDocument||document,t.scrollbarXRail=s.appendTo(s.e("div","ps-scrollbar-x-rail"),e),t.scrollbarX=s.appendTo(s.e("div","ps-scrollbar-x"),t.scrollbarXRail),t.scrollbarXActive=null,t.scrollbarXWidth=null,t.scrollbarXLeft=null,t.scrollbarXBottom=u.toInt(s.css(t.scrollbarXRail,"bottom")),t.isScrollbarXUsingBottom=t.scrollbarXBottom===t.scrollbarXBottom,t.scrollbarXTop=t.isScrollbarXUsingBottom?null:u.toInt(s.css(t.scrollbarXRail,"top")),t.railBorderXWidth=u.toInt(s.css(t.scrollbarXRail,"borderLeftWidth"))+u.toInt(s.css(t.scrollbarXRail,"borderRightWidth")),t.railXMarginWidth=u.toInt(s.css(t.scrollbarXRail,"marginLeft"))+u.toInt(s.css(t.scrollbarXRail,"marginRight")),t.railXWidth=null,t.scrollbarYRail=s.appendTo(s.e("div","ps-scrollbar-y-rail"),e),t.scrollbarY=s.appendTo(s.e("div","ps-scrollbar-y"),t.scrollbarYRail),t.scrollbarYActive=null,t.scrollbarYHeight=null,t.scrollbarYTop=null,t.scrollbarYRight=u.toInt(s.css(t.scrollbarYRail,"right")),t.isScrollbarYUsingRight=t.scrollbarYRight===t.scrollbarYRight,t.scrollbarYLeft=t.isScrollbarYUsingRight?null:u.toInt(s.css(t.scrollbarYRail,"left")),t.scrollbarYOuterWidth=t.isRtl?u.outerWidth(t.scrollbarY):null,t.railBorderYWidth=u.toInt(s.css(t.scrollbarYRail,"borderTopWidth"))+u.toInt(s.css(t.scrollbarYRail,"borderBottomWidth")),t.railYMarginHeight=u.toInt(s.css(t.scrollbarYRail,"marginTop"))+u.toInt(s.css(t.scrollbarYRail,"marginBottom")),t.railYHeight=null}function a(e){return"undefined"==typeof e.dataset?e.getAttribute("data-ps-id"):e.dataset.psId}function r(e,t){"undefined"==typeof e.dataset?e.setAttribute("data-ps-id",t):e.dataset.psId=t}function o(e){"undefined"==typeof e.dataset?e.removeAttribute("data-ps-id"):delete e.dataset.psId}var s=e("../lib/dom"),l=e("./default-setting"),c=e("../lib/event-manager"),d=e("../lib/guid"),u=e("../lib/helper"),h={};i.add=function(e){var t=d();return r(e,t),h[t]=new n(e),h[t]},i.remove=function(e){delete h[a(e)],o(e)},i.get=function(e){return h[a(e)]}},{"../lib/dom":3,"../lib/event-manager":4,"../lib/guid":5,"../lib/helper":6,"./default-setting":8}],19:[function(e,t,i){"use strict";function n(e,t){return e.settings.minScrollbarLength&&(t=Math.max(t,e.settings.minScrollbarLength)),e.settings.maxScrollbarLength&&(t=Math.min(t,e.settings.maxScrollbarLength)),t}function a(e,t){var i={width:t.railXWidth};t.isRtl?i.left=e.scrollLeft+t.containerWidth-t.contentWidth:i.left=e.scrollLeft,t.isScrollbarXUsingBottom?i.bottom=t.scrollbarXBottom-e.scrollTop:i.top=t.scrollbarXTop+e.scrollTop,o.css(t.scrollbarXRail,i);var n={top:e.scrollTop,height:t.railYHeight};t.isScrollbarYUsingRight?t.isRtl?n.right=t.contentWidth-e.scrollLeft-t.scrollbarYRight-t.scrollbarYOuterWidth:n.right=t.scrollbarYRight-e.scrollLeft:t.isRtl?n.left=e.scrollLeft+2*t.containerWidth-t.contentWidth-t.scrollbarYLeft-t.scrollbarYOuterWidth:n.left=t.scrollbarYLeft+e.scrollLeft,o.css(t.scrollbarYRail,n),o.css(t.scrollbarX,{left:t.scrollbarXLeft,width:t.scrollbarXWidth-t.railBorderXWidth}),o.css(t.scrollbarY,{top:t.scrollbarYTop,height:t.scrollbarYHeight-t.railBorderYWidth})}var r=e("../lib/class"),o=e("../lib/dom"),s=e("../lib/helper"),l=e("./instances");t.exports=function(e){var t=l.get(e);t.containerWidth=e.clientWidth,t.containerHeight=e.clientHeight,t.contentWidth=e.scrollWidth,t.contentHeight=e.scrollHeight,e.contains(t.scrollbarXRail)||o.appendTo(t.scrollbarXRail,e),e.contains(t.scrollbarYRail)||o.appendTo(t.scrollbarYRail,e),!t.settings.suppressScrollX&&t.containerWidth+t.settings.scrollXMarginOffset=t.railXWidth-t.scrollbarXWidth&&(t.scrollbarXLeft=t.railXWidth-t.scrollbarXWidth),t.scrollbarYTop>=t.railYHeight-t.scrollbarYHeight&&(t.scrollbarYTop=t.railYHeight-t.scrollbarYHeight),a(e,t),r[t.scrollbarXActive?"add":"remove"](e,"ps-active-x"),r[t.scrollbarYActive?"add":"remove"](e,"ps-active-y")}},{"../lib/class":2,"../lib/dom":3,"../lib/helper":6,"./instances":18}],20:[function(e,t,i){"use strict";var n=e("../lib/dom"),a=e("./instances"),r=e("./update-geometry");t.exports=function(e){var t=a.get(e);n.css(t.scrollbarXRail,"display","none"),n.css(t.scrollbarYRail,"display","none"),r(e),n.css(t.scrollbarXRail,"display","block"),n.css(t.scrollbarYRail,"display","block")}},{"../lib/dom":3,"./instances":18,"./update-geometry":19}]},{},[1]),define("WoltLabSuite/Core/Date/Util",["Language"],function(e){"use strict";var t={formatDate:function(t){return this.format(t,e.get("wcf.date.dateFormat"))},formatTime:function(t){return this.format(t,e.get("wcf.date.timeFormat"))},formatDateTime:function(t){return this.format(t,e.get("wcf.date.dateTimeFormat").replace(/%date%/,e.get("wcf.date.dateFormat")).replace(/%time%/,e.get("wcf.date.timeFormat")))},format:function(t,i){var n,a="";"c"===i&&(i="Y-m-dTH:i:sP");for(var r=0,o=i.length;o>r;r++){switch(i[r]){case"s":n=("0"+t.getSeconds().toString()).slice(-2);break;case"i":n=t.getMinutes(),10>n&&(n="0"+n);break;case"a":n=t.getHours()>11?"pm":"am";break;case"g":n=t.getHours(),0===n?n=12:n>12&&(n-=12);break;case"h":n=t.getHours(),0===n?n=12:n>12&&(n-=12),n=("0"+n.toString()).slice(-2);break;case"A":n=t.getHours()>11?"PM":"AM";break;case"G":n=t.getHours();break;case"H":n=t.getHours(),n=("0"+n.toString()).slice(-2);break;case"d":n=t.getDate(),n=("0"+n.toString()).slice(-2);break;case"j":n=t.getDate();break;case"l":n=e.get("__days")[t.getDay()];break;case"D":n=e.get("__daysShort")[t.getDay()];break;case"S":n="";break;case"m":n=t.getMonth()+1,n=("0"+n.toString()).slice(-2);break;case"n":n=t.getMonth()+1;break;case"F":n=e.get("__months")[t.getMonth()];break;case"M":n=e.get("__monthsShort")[t.getMonth()];break;case"y":n=t.getYear().toString().replace(/^\d{2}/,"");break;case"Y":n=t.getFullYear();break;case"P":var s=t.getTimezoneOffset();n=s>0?"-":"+",s=Math.abs(s),n+=("0"+(~~(s/60)).toString()).slice(-2),n+=":",n+=("0"+(s%60).toString()).slice(-2);break;case"r":n=t.toString();break;case"U":n=Math.round(t.getTime()/1e3);break;default:n=i[r]}a+=n}return a},gmdate:function(e){return e instanceof Date||(e=new Date),Math.round(Date.UTC(e.getUTCFullYear(),e.getUTCMonth(),e.getUTCDay(),e.getUTCHours(),e.getUTCMinutes(),e.getUTCSeconds())/1e3)},getTimezoneDate:function(e,t){var i=new Date(e),n=6e4*i.getTimezoneOffset();return new Date(e+n+t)}};return t}),define("WoltLabSuite/Core/Timer/Repeating",[],function(){"use strict";function e(e,t){if("function"!=typeof e)throw new TypeError("Expected a valid callback as first argument.");if(0>t||t>864e5)throw new RangeError("Invalid delta "+t+". Delta must be in the interval [0, 86400000].");this._callback=e.bind(void 0,this),this._delta=t,this._timer=void 0,this.restart()}return e.prototype={restart:function(){this.stop(),this._timer=setInterval(this._callback,this._delta)},stop:function(){void 0!==this._timer&&(clearInterval(this._timer),this._timer=void 0)},setDelta:function(e){this._delta=e,this.restart()}},e}),define("WoltLabSuite/Core/Date/Time/Relative",["Dom/ChangeListener","Language","WoltLabSuite/Core/Date/Util","WoltLabSuite/Core/Timer/Repeating"],function(e,t,i,n){"use strict";var a=elByTag("time"),r=null;return{setup:function(){this._refresh(),new n(this._refresh.bind(this),6e4),e.add("WoltLabSuite/Core/Date/Time/Relative",this._refresh.bind(this))},_refresh:function(){var e=new Date,n=(e.getTime()-e.getMilliseconds())/1e3;null===r&&(r=n-TIME_NOW);for(var o=0,s=a.length;s>o;o++){var l=a[o];if(l.classList.contains("datetime")&&!elData(l,"is-future-date")){var c=~~elData(l,"timestamp")+r,d=elData(l,"date"),u=elData(l,"time"),h=elData(l,"offset");if(elAttr(l,"title")||elAttr(l,"title",t.get("wcf.date.dateTimeFormat").replace(/%date%/,d).replace(/%time%/,u)),c>=n||c+60>n)l.textContent=t.get("wcf.date.relative.now");else if(c+3540>n){var p=Math.max(Math.round((n-c)/60),1);l.textContent=t.get("wcf.date.relative.minutes",{minutes:p})}else if(c+86400>n){var f=Math.round((n-c)/3600);l.textContent=t.get("wcf.date.relative.hours",{hours:f})}else if(c+518400>n){var m=new Date(e.getFullYear(),e.getMonth(),e.getDate()),g=Math.ceil((m/1e3-c)/86400),v=i.getTimezoneDate(1e3*c,1e3*h),b=v.getDay(),_=t.get("__days")[b];l.textContent=t.get("wcf.date.relative.pastDays",{days:g,day:_,time:u})}else l.textContent=t.get("wcf.date.shortDateTimeFormat").replace(/%date%/,d).replace(/%time%/,u)}}}}}),define("WoltLabSuite/Core/Event/Handler",["Core","Dictionary"],function(e,t){"use strict";var i=new t;return{add:function(n,a,r){if("function"!=typeof r)throw new TypeError("[WoltLabSuite/Core/Event/Handler] Expected a valid callback for '"+a+"@"+n+"'.");var o=i.get(n);void 0===o&&(o=new t,i.set(n,o));var s=o.get(a);void 0===s&&(s=new t,o.set(a,s));var l=e.getUuid();return s.set(l,r),l},fire:function(e,t,n){n=n||{};var a=i.get(e);if(void 0!==a){var r=a.get(t);void 0!==r&&r.forEach(function(e){e(n)})}},remove:function(e,t,n){var a=i.get(e);if(void 0!==a){var r=a.get(t);void 0!==r&&r["delete"](n)}},removeAll:function(e,t){"string"!=typeof t&&(t=void 0);var n=i.get(e);void 0!==n&&("undefined"==typeof t?i["delete"](e):n["delete"](t))},removeAllBySuffix:function(e,t){var n=i.get(e);if(void 0!==n){t="_"+t;var a=-1*t.length;n.forEach(function(i,n){n.substr(a)===t&&this.removeAll(e,n)}.bind(this))}}}}),define("WoltLabSuite/Core/List",[],function(){"use strict";function e(){this._set=t?new Set:[]}var t=objOwns(window,"Set")&&"function"==typeof window.Set;return e.prototype={add:function(e){t?this._set.add(e):this.has(e)||this._set.push(e)},clear:function(){t?this._set.clear():this._set=[]},"delete":function(e){if(t)return this._set["delete"](e);var i=this._set.indexOf(e);return-1===i?!1:(this._set.splice(i,1),!0)},forEach:function(e){if(t)this._set.forEach(e);else for(var i=0,n=this._set.length;n>i;i++)e(this._set[i])},has:function(e){return t?this._set.has(e):-1!==this._set.indexOf(e)}},Object.defineProperty(e.prototype,"size",{enumerable:!1,configurable:!0,get:function(){return t?this._set.size:this._set.length}}),e}),define("WoltLabSuite/Core/Ui/Page/Menu/Abstract",["Core","Environment","EventHandler","Language","ObjectMap","Dom/Traverse","Dom/Util","Ui/Screen"],function(e,t,i,n,a,r,o,s){"use strict";function l(e,t,i){this.init(e,t,i)}var c=elById("pageContainer"),d="";return l.prototype={init:function(e,n,r){if("packageInstallationSetup"!==elData(document.body,"template")){this._activeList=[],this._depth=0,this._enabled=!0,this._eventIdentifier=e,this._items=new a,this._menu=elById(n),this._removeActiveList=!1;var s=this.open.bind(this);this._button=elBySel(r),this._button.addEventListener(WCF_CLICK_EVENT,s),this._initItems(),this._initHeader(),i.add(this._eventIdentifier,"open",s),i.add(this._eventIdentifier,"close",this.close.bind(this));var l,c=elByClass("menuOverlayItemList",this._menu);this._menu.addEventListener("animationend",function(){if(!this._menu.classList.contains("open"))for(var e=0,t=c.length;t>e;e++)l=c[e],l.classList.remove("active"),l.classList.remove("hidden")}.bind(this)),this._menu.children[0].addEventListener("transitionend",function(){if(this._menu.classList.add("allowScroll"),this._removeActiveList){this._removeActiveList=!1;var e=this._activeList.pop();e&&e.classList.remove("activeList")}}.bind(this));var d=elCreate("div");d.className="menuOverlayMobileBackdrop",d.addEventListener(WCF_CLICK_EVENT,this.close.bind(this)),o.insertAfter(d,this._menu),this._updateButtonState(),"android"===t.platform()&&this._initializeAndroid()}},open:function(e){return this._enabled?(e instanceof Event&&e.preventDefault(),this._menu.classList.add("open"),this._menu.classList.add("allowScroll"),this._menu.children[0].classList.add("activeList"),s.scrollDisable(),c.classList.add("menuOverlay-"+this._menu.id),document.documentElement.classList.add("pageOverlayActive"),!0):!1},close:function(e){return e instanceof Event&&e.preventDefault(),this._menu.classList.contains("open")?(this._menu.classList.remove("open"),s.scrollEnable(),c.classList.remove("menuOverlay-"+this._menu.id),document.documentElement.classList.remove("pageOverlayActive"),!0):!1},enable:function(){this._enabled=!0},disable:function(){this._enabled=!1,this.close(!0)},_initializeAndroid:function(){var t,i,n,a=20,r=5,o=20;switch(this._menu.id){case"pageUserMenuMobile":t="right";break;case"pageMainMenuMobile":t="left";break;default:return}i=this._menu.nextElementSibling,n=null,document.addEventListener("touchstart",function(i){var r,o,s,l;if(r=i.touches,o=this._menu.classList.contains("open"),"left"===t?(s=!o&&r[0].clientX1)return void(d&&e.triggerEvent(document,"touchend"));if(!d&&(s||l)){if(document.documentElement.classList.contains("pageOverlayActive")){for(var u=!1,h=0;hn.x+100&&this.close(),"right"===d&&a>n.x-100&&this.close()),n=null,d=""}}.bind(this)),document.addEventListener("touchmove",function(e){if(d&&null!==n){var a=e.touches,s=!1,l=!1;"left"===d&&(s=a[0].clientX>n.x+r),"right"===d&&(s=a[0].clientXo;var c=this._menu.classList.contains("open");if(c||!s||l||(this.open(),c=!0),c){var u=a[0].clientX;"right"===t&&(u=document.body.clientWidth-u),u>this._menu.offsetWidth&&(u=this._menu.offsetWidth),0>u&&(u=0),this._menu.style.setProperty("transform","translateX("+("left"===t?1:-1)*(u-this._menu.offsetWidth)+"px)"),i.style.setProperty(t,Math.min(this._menu.offsetWidth,u)+"px")}}}.bind(this))},_initItems:function(){elBySelAll(".menuOverlayItemLink",this._menu,this._initItem.bind(this))},_initItem:function(e){var t=e.parentNode,n=elData(t,"more");if(n)return void e.addEventListener(WCF_CLICK_EVENT,function(a){a.preventDefault(),a.stopPropagation(),i.fire(this._eventIdentifier,"more",{handler:this,identifier:n,item:e,parent:t})}.bind(this));var a,o=e.nextElementSibling;if(null!==o)if("OL"!==o.nodeName&&o.classList.contains("menuOverlayItemLinkIcon"))for(a=elCreate("span"),a.className="menuOverlayItemWrapper",t.insertBefore(a,e),a.appendChild(e);a.nextElementSibling;)a.appendChild(a.nextElementSibling);else{var s="#"!==elAttr(e,"href"),l=t.parentNode,c=elData(o,"title");this._items.set(e,{itemList:o,parentItemList:l}),""===c&&(c=r.childByClass(e,"menuOverlayItemTitle").textContent,elData(o,"title",c));var d=this._showItemList.bind(this,e);if(s){a=elCreate("span"),a.className="menuOverlayItemWrapper",t.insertBefore(a,e),a.appendChild(e);var u=elCreate("a");elAttr(u,"href","#"),u.className="menuOverlayItemLinkIcon"+(e.classList.contains("active")?" active":""),u.innerHTML='',u.addEventListener(WCF_CLICK_EVENT,d),a.appendChild(u)}else e.classList.add("menuOverlayItemLinkMore"),e.addEventListener(WCF_CLICK_EVENT,d);var h=elCreate("li");h.className="menuOverlayHeader",a=elCreate("span"),a.className="menuOverlayItemWrapper";var p=elCreate("a");elAttr(p,"href","#"),p.className="menuOverlayItemLink menuOverlayBackLink",p.textContent=elData(l,"title"),p.addEventListener(WCF_CLICK_EVENT,this._hideItemList.bind(this,e));var f=elCreate("a");if(elAttr(f,"href","#"),f.className="menuOverlayItemLinkIcon",f.innerHTML='',f.addEventListener(WCF_CLICK_EVENT,this.close.bind(this)),a.appendChild(p),a.appendChild(f),h.appendChild(a),o.insertBefore(h,o.firstElementChild),!h.nextElementSibling.classList.contains("menuOverlayTitle")){var m=elCreate("li");m.className="menuOverlayTitle";var g=elCreate("span");g.textContent=c,m.appendChild(g),o.insertBefore(m,h.nextElementSibling)}}},_initHeader:function(){var e=elCreate("li");e.className="menuOverlayHeader";var t=elCreate("span");t.className="menuOverlayItemWrapper",e.appendChild(t);var i=elCreate("span");i.className="menuOverlayLogoWrapper",t.appendChild(i);var n=elCreate("span");n.className="menuOverlayLogo",n.style.setProperty("background-image",'url("'+elData(this._menu,"page-logo")+'")',""),i.appendChild(n);var a=elCreate("a");elAttr(a,"href","#"),a.className="menuOverlayItemLinkIcon",a.innerHTML='',a.addEventListener(WCF_CLICK_EVENT,this.close.bind(this)),t.appendChild(a);var o=r.childByClass(this._menu,"menuOverlayItemList");o.insertBefore(e,o.firstElementChild)},_hideItemList:function(e,t){t instanceof Event&&t.preventDefault(),this._menu.classList.remove("allowScroll"),this._removeActiveList=!0;var i=this._items.get(e);i.parentItemList.classList.remove("hidden"),this._updateDepth(!1)},_showItemList:function(e,t){t instanceof Event&&t.preventDefault();var n=this._items.get(e),a=elData(n.itemList,"load");if(a&&!elDataBool(e,"loaded")){var r=t.currentTarget.firstElementChild;return r.classList.contains("fa-angle-right")&&(r.classList.remove("fa-angle-right"),r.classList.add("fa-spinner")),void i.fire(this._eventIdentifier,"load_"+a)}this._menu.classList.remove("allowScroll"),n.itemList.classList.add("activeList"),n.parentItemList.classList.add("hidden"),this._activeList.push(n.itemList),this._updateDepth(!0)},_updateDepth:function(e){this._depth+=e?1:-1;var t=-100*this._depth;"rtl"===n.get("wcf.global.pageDirection")&&(t*=-1),this._menu.children[0].style.setProperty("transform","translateX("+t+"%)","")},_updateButtonState:function(){var e=!1;elBySelAll(".badgeUpdate",this._menu,function(t){~~t.textContent>0&&(e=!0)}),this._button.classList[e?"add":"remove"]("pageMenuMobileButtonHasContent")}},l}),define("WoltLabSuite/Core/Ui/Page/Menu/Main",["Core","Dom/Traverse","./Abstract"],function(e,t,i){"use strict";function n(){this.init()}var a=null,r=null,o=null,s=null;return e.inherit(n,i,{init:function(){n._super.prototype.init.call(this,"com.woltlab.wcf.MainMenuMobile","pageMainMenuMobile","#pageHeader .mainMenu"),a=elById("pageMainMenuMobilePageOptionsContainer"),null!==a&&(o=t.childByClass(a,"menuOverlayItemList"),s=elBySel(".jsPageNavigationIcons"),elRemove(t.childByClass(o,"jsMenuOverlayItemPlaceholder")),o.addEventListener("click",function(e){e.target!==o&&null!==t.parentByClass(e.target,"menuOverlayItem",o)&&(this.close(),e.stopPropagation())}.bind(this)))},open:function(e){if(!n._super.prototype.open.call(this,e))return!1;if(null===a)return!0;if(r=s.childElementCount>0){for(var t,i;s.childElementCount;)t=s.children[0],t.classList.add("menuOverlayItem"),i=t.children[0],i.classList.add("menuOverlayItemLink"),i.classList.add("box24"),i.children[1].classList.remove("invisible"),i.children[1].classList.add("menuOverlayItemTitle"),o.appendChild(t);elShow(a)}else elHide(a);return!0},close:function(e){if(!n._super.prototype.close.call(this,e))return!1;if(r){elHide(a);for(var i,l,c=t.childByClass(o,"menuOverlayTitle");i=c.nextElementSibling;)i.classList.remove("menuOverlayItem"),l=i.children[0],l.classList.remove("menuOverlayItemLink"),l.classList.remove("box24"),l.children[1].classList.add("invisible"),l.children[1].classList.remove("menuOverlayItemTitle"),s.appendChild(i)}return!0}}),n}),define("WoltLabSuite/Core/Ui/Page/Menu/User",["Core","EventHandler","./Abstract"],function(e,t,i){"use strict";function n(){this.init()}return e.inherit(n,i,{init:function(){n._super.prototype.init.call(this,"com.woltlab.wcf.UserMenuMobile","pageUserMenuMobile","#pageHeader .userPanel"),t.add("com.woltlab.wcf.userMenu","updateBadge",function(e){elBySelAll(".menuOverlayItemBadge",this._menu,function(t){if(elData(t,"badge-identifier")===e.identifier){var i=elBySel(".badge",t);e.count?(null===i&&(i=elCreate("span"),i.className="badge badgeUpdate",t.appendChild(i)),i.textContent=e.count):null!==i&&elRemove(i),this._updateButtonState()}}.bind(this))}.bind(this))},close:function(e){var t=WCF.Dropdown.Interactive.Handler.getOpenDropdown();t?(e.preventDefault(),e.stopPropagation(),t.close()):n._super.prototype.close.call(this,e)}}),n}),define("WoltLabSuite/Core/Ui/Mobile",["Core","Environment","EventHandler","Language","List","Dom/ChangeListener","Dom/Traverse","Ui/CloseOverlay","Ui/Screen","./Page/Menu/Main","./Page/Menu/User"],function(e,t,i,n,a,r,o,s,l,c,d){"use strict";var u=elByClass("buttonGroupNavigation"),h=!1,p=new a,f=null,m=elByClass("message"),g={},v=null,b=null,_=null;return{setup:function(i){g=e.extend({enableMobileMenu:!0},i),f=elById("main"),t.touch()&&document.documentElement.classList.add("touch"),"desktop"!==t.platform()&&document.documentElement.classList.add("mobile");var n=elBySel(".messageGroupList");n&&(_=elByClass("messageGroup",n)),l.on("screen-md-down",{match:this.enable.bind(this),unmatch:this.disable.bind(this),setup:this._init.bind(this)}),l.on("screen-sm-down",{match:this.enableShadow.bind(this),unmatch:this.disableShadow.bind(this),setup:this.enableShadow.bind(this)})},enable:function(){h=!0,g.enableMobileMenu&&(v.enable(),b.enable())},enableShadow:function(){_&&this.rebuildShadow(_,".messageGroupLink"); },disable:function(){h=!1,g.enableMobileMenu&&(v.disable(),b.disable())},disableShadow:function(){_&&this.removeShadow(_)},_init:function(){h=!0,this._initSearchBar(),this._initButtonGroupNavigation(),this._initMessages(),this._initMobileMenu(),s.add("WoltLabSuite/Core/Ui/Mobile",this._closeAllMenus.bind(this)),r.add("WoltLabSuite/Core/Ui/Mobile",function(){this._initButtonGroupNavigation(),this._initMessages()}.bind(this))},_initSearchBar:function(){var e=elById("pageHeaderSearch"),n=elById("pageHeaderSearchInput"),a=null;i.add("com.woltlab.wcf.MainMenuMobile","more",function(i){"com.woltlab.wcf.search"===i.identifier&&(i.handler.close(!0),"ios"===t.platform()&&(a=document.body.scrollTop,l.scrollDisable()),e.style.setProperty("top",elById("pageHeader").offsetHeight+"px",""),e.classList.add("open"),n.focus(),"ios"===t.platform()&&(document.body.scrollTop=0))}),f.addEventListener(WCF_CLICK_EVENT,function(){e.classList.remove("open"),"ios"===t.platform()&&null!==a&&(l.scrollEnable(),document.body.scrollTop=a,a=null)})},_initButtonGroupNavigation:function(){for(var e=0,t=u.length;t>e;e++){var i=u[e];if(!i.classList.contains("jsMobileButtonGroupNavigation")){i.classList.add("jsMobileButtonGroupNavigation");var n=elBySel(".buttonList",i);if(0!==n.childElementCount){i.parentNode.classList.add("hasMobileNavigation");var a=elCreate("a");a.className="dropdownLabel";var r=elCreate("span");r.className="icon icon24 fa-ellipsis-v",a.appendChild(r),function(e,t,i){t.addEventListener(WCF_CLICK_EVENT,function(t){t.preventDefault(),t.stopPropagation(),e.classList.toggle("open")}),i.addEventListener(WCF_CLICK_EVENT,function(t){t.stopPropagation(),e.classList.remove("open")})}(i,a,n),i.insertBefore(a,i.firstChild)}}}},_initMessages:function(){Array.prototype.forEach.call(m,function(e){if(!p.has(e)){var t=elBySel(".jsMobileNavigation",e);if(t){t.addEventListener(WCF_CLICK_EVENT,function(e){e.stopPropagation(),window.setTimeout(function(){t.classList.remove("open")},10)});var i=elBySel(".messageQuickOptions",e);i&&t.childElementCount&&(i.classList.add("active"),i.addEventListener(WCF_CLICK_EVENT,function(e){h&&(e.preventDefault(),e.stopPropagation(),t.classList.toggle("open"))}))}p.add(e)}})},_initMobileMenu:function(){g.enableMobileMenu&&(v=new c,b=new d),elBySelAll(".boxMenu:not(.forceOpen)",null,function(e){e.addEventListener(WCF_CLICK_EVENT,function(t){t.stopPropagation(),t.target===e&&(t.preventDefault(),e.classList.add("open"))})})},_closeAllMenus:function(){elBySelAll(".jsMobileButtonGroupNavigation.open, .jsMobileNavigation.open, .boxMenu.open",null,function(e){e.classList.remove("open")})},rebuildShadow:function(e,t){for(var i,n,a,r=0,s=e.length;s>r;r++)i=e[r],n=i.parentNode,a=o.childByClass(n,"mobileLinkShadow"),null===a&&elBySel(t,i).href&&(a=elCreate("a"),a.className="mobileLinkShadow",a.href=elBySel(t,i).href,n.appendChild(a),n.classList.add("mobileLinkShadowContainer"))},removeShadow:function(e){for(var t,i,n,a=0,r=e.length;r>a;a++)t=e[a],i=t.parentNode,i.classList.contains("mobileLinkShadowContainer")&&(n=o.childByClass(i,"mobileLinkShadow"),null!==n&&elRemove(n),i.classList.remove("mobileLinkShadowContainer"))}}}),define("WoltLabSuite/Core/Ui/TabMenu/Simple",["Dictionary","EventHandler","Dom/Traverse","Dom/Util"],function(e,t,i,n){"use strict";function a(t){this._container=t,this._containers=new e,this._isLegacy=null,this._store=null,this._tabs=new e}return a.prototype={validate:function(){if(!this._container.classList.contains("tabMenuContainer"))return!1;var e=i.childByTag(this._container,"NAV");if(null===e)return!1;var t=elByTag("li",e);if(0===t.length)return!1;var a,r,o,s,l=i.childrenByTag(this._container,"DIV");for(o=0,s=l.length;s>o;o++)a=l[o],r=elData(a,"name"),r||(r=n.identify(a)),elData(a,"name",r),this._containers.set(r,a);var c,d=this._container.id;for(o=0,s=t.length;s>o;o++)if(c=t[o],r=this._getTabName(c)){if(this._tabs.has(r))throw new Error("Tab names must be unique, li[data-name='"+r+"'] (tab menu id: '"+d+"') exists more than once.");if(a=this._containers.get(r),void 0===a)throw new Error("Expected content element for li[data-name='"+r+"'] (tab menu id: '"+d+"').");if(a.parentNode!==this._container)throw new Error("Expected content element '"+r+"' (tab menu id: '"+d+"') to be a direct children.");if(1!==c.childElementCount||"A"!==c.children[0].nodeName)throw new Error("Expected exactly one as children for li[data-name='"+r+"'] (tab menu id: '"+d+"').");this._tabs.set(r,c)}if(!this._tabs.size)throw new Error("Expected at least one tab (tab menu id: '"+d+"').");return this._isLegacy&&(elData(this._container,"is-legacy",!0),this._tabs.forEach(function(e,t){elAttr(e,"aria-controls",t)})),!0},init:function(e){e=e||null,this._tabs.forEach(function(t){e&&e.get(elData(t,"name"))===t||t.children[0].addEventListener(WCF_CLICK_EVENT,this._onClick.bind(this))}.bind(this));var t=null;if(!e){var i=window.location.hash.replace(/^#/,""),n=null;if(""!==i&&(n=this._tabs.get(i),n&&this._container.parentNode.classList.contains("tabMenuContainer")&&(t=this._container)),!n){var a=elData(this._container,"preselect")||elData(this._container,"active");"true"!==a&&a||(a=!0),a===!0?this._tabs.forEach(function(e){n||e.previousElementSibling||(n=e)}):"false"!==a&&(n=this._tabs.get(a))}n&&(this._containers.forEach(function(e){e.classList.add("hidden")}),this.select(null,n,!0));var r=elData(this._container,"store");if(r){var o=elCreate("input");o.type="hidden",o.name=r,this._container.appendChild(o),this._store=o}}return t},select:function(e,i,n){if(i=i||this._tabs.get(e),!i){if(~~e==e){e=~~e;var a=0;this._tabs.forEach(function(t){a===e&&(i=t),a++})}if(!i)throw new Error("Expected a valid tab name, '"+e+"' given (tab menu id: '"+this._container.id+"').")}e=e||elData(i,"name");var r=this.getActiveTab(),o=null;if(r){if(elData(r,"name")===e)return;r.classList.remove("active"),o=this._containers.get(elData(r,"name")),o.classList.remove("active"),o.classList.add("hidden"),this._isLegacy&&(r.classList.remove("ui-state-active"),o.classList.remove("ui-state-active"))}i.classList.add("active");var s=this._containers.get(e);if(s.classList.add("active"),s.classList.remove("hidden"),this._isLegacy&&(i.classList.add("ui-state-active"),s.classList.add("ui-state-active")),this._store&&(this._store.value=e),!n){t.fire("com.woltlab.wcf.simpleTabMenu_"+this._container.id,"select",{active:i,activeName:e,previous:r,previousName:r?elData(r,"name"):null});var l=this._isLegacy&&"function"==typeof window.jQuery?window.jQuery:null;l&&l(this._container).trigger("wcftabsbeforeactivate",{newTab:l(i),oldTab:l(r),newPanel:l(s),oldPanel:l(o)}),window.history.replaceState(void 0,void 0,window.location.href.replace(/#[^#]+$/,"")+"#"+e)}require(["WoltLabSuite/Core/Ui/TabMenu"],function(e){e.scrollToTab(i)})},rebuild:function(){var t=new e;t.merge(this._tabs),this.validate(),this.init(t)},hasTab:function(e){return this._tabs.has(e)},_onClick:function(e){e.preventDefault(),this.select(null,e.currentTarget.parentNode)},_getTabName:function(e){var t=elData(e,"name");return t||1===e.childElementCount&&"A"===e.children[0].nodeName&&e.children[0].href.match(/#([^#]+)$/)&&(t=RegExp.$1,null===elById(t)?t=null:(this._isLegacy=!0,elData(e,"name",t))),t},getActiveTab:function(){return elBySel("#"+this._container.id+" > nav > ul > li.active")},getContainers:function(){return this._containers},getTabs:function(){return this._tabs}},a}),define("WoltLabSuite/Core/Ui/TabMenu",["Dictionary","EventHandler","Dom/ChangeListener","Dom/Util","Ui/CloseOverlay","Ui/Screen","./TabMenu/Simple"],function(e,t,i,n,a,r,o){"use strict";var s=null,l=!1,c=new e;return{setup:function(){this._init(),this._selectErroneousTabs(),i.add("WoltLabSuite/Core/Ui/TabMenu",this._init.bind(this)),a.add("WoltLabSuite/Core/Ui/TabMenu",function(){s&&(s.classList.remove("active"),s=null)}),r.on("screen-sm-down",{enable:this._scrollEnable.bind(this,!1),disable:this._scrollDisable.bind(this),setup:this._scrollEnable.bind(this,!0)}),window.addEventListener("hashchange",function(){var e=window.location.hash.replace(/^#/,""),t=e?elById(e):null;null!==t&&t.classList.contains("tabMenuContent")&&c.forEach(function(t){t.hasTab(e)&&t.select(e)})})},_init:function(){for(var e,t,i,a,r,l=elBySelAll(".tabMenuContainer:not(.staticTabMenuContainer)"),d=0,u=l.length;u>d;d++)e=l[d],t=n.identify(e),c.has(t)||(r=new o(e),r.validate()&&(a=r.init(),c.set(t,r),a instanceof Element&&(r=this.getTabMenu(a.parentNode.id),r.select(a.id,null,!0)),i=elBySel("#"+t+" > nav > ul"),function(e){e.addEventListener(WCF_CLICK_EVENT,function(t){t.preventDefault(),t.stopPropagation(),t.target===e?(e.classList.add("active"),s=e):(e.classList.remove("active"),s=null)})}(i),elBySelAll(".tabMenu, .menu",e,function(e){var t=this._rebuildMenuOverflow.bind(this,e),i=null;elBySel("ul",e).addEventListener("scroll",function(){null!==i&&window.clearTimeout(i),i=window.setTimeout(t,10)})}.bind(this))))},_selectErroneousTabs:function(){c.forEach(function(e){var t=!1;e.getContainers().forEach(function(i){!t&&elByClass("formError",i).length&&(t=!0,e.select(i.id))})})},getTabMenu:function(e){return c.get(e)},_scrollEnable:function(e){l=!0,c.forEach(function(t){var i=t.getActiveTab();e?this._rebuildMenuOverflow(i.closest(".menu, .tabMenu")):this.scrollToTab(i)}.bind(this))},_scrollDisable:function(){l=!1},scrollToTab:function(e){if(l){var t=e.closest("ul"),i=t.clientWidth,n=t.scrollLeft,a=t.scrollWidth;if(i!==a){var r=e.offsetLeft,o=!1;n>r&&(o=!0);var s=!1;if(!o){var c=i-(r-n),d=e.clientWidth;null!==e.nextElementSibling&&(s=!0,d+=20),d>c&&(o=!0)}if(o){if(s?r-=15:r>0&&(r-=15),r=0>r?0:Math.min(r,a-i),n===r)return;t.classList.add("enableAnimation"),r>n?t.firstElementChild.style.setProperty("margin-left",n-r+"px",""):t.style.setProperty("padding-left",n-r+"px",""),setTimeout(function(){t.classList.remove("enableAnimation"),t.firstElementChild.style.removeProperty("margin-left"),t.style.removeProperty("padding-left"),t.scrollLeft=r},300)}}}},_rebuildMenuOverflow:function(e){if(l){var t=e.clientWidth,i=elBySel("ul",e),n=i.scrollLeft,a=i.scrollWidth,r=n>0,o=elBySel(".tabMenuOverlayLeft",e);r?(null===o&&(o=elCreate("span"),o.className="tabMenuOverlayLeft icon icon24 fa-angle-left",e.insertBefore(o,e.firstChild)),o.classList.add("active")):null!==o&&o.classList.remove("active");var s=a>t+n,c=elBySel(".tabMenuOverlayRight",e);s?(null===c&&(c=elCreate("span"),c.className="tabMenuOverlayRight icon icon24 fa-angle-right",e.appendChild(c)),c.classList.add("active")):null!==c&&c.classList.remove("active")}}}}),define("WoltLabSuite/Core/Ui/FlexibleMenu",["Core","Dictionary","Dom/ChangeListener","Dom/Traverse","Dom/Util","Ui/SimpleDropdown"],function(e,t,i,n,a,r){"use strict";var o=new t,s=new t,l=new t,c=new t,d={setup:function(){null!==elById("mainMenu")&&this.register("mainMenu");var e=elBySel(".navigationHeader");null!==e&&this.register(a.identify(e)),window.addEventListener("resize",this.rebuildAll.bind(this)),i.add("WoltLabSuite/Core/Ui/FlexibleMenu",this.registerTabMenus.bind(this))},register:function(e){var t=elById(e);if(null===t)throw"Expected a valid element id, '"+e+"' does not exist.";if(!o.has(e)){var i=n.childByTag(t,"UL");if(null===i)throw"Expected an