From: woltlab.com Date: Mon, 15 Aug 2016 08:17:17 +0000 (+0200) Subject: Updating minified JavaScript files X-Git-Tag: 3.0.0_Beta_1~750 X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=01fc35b22324c9a114318ff5fea8c4fe120f2e78;p=GitHub%2FWoltLab%2FWCF.git Updating minified JavaScript files --- diff --git a/wcfsetup/install/files/js/WCF.Core.min.js b/wcfsetup/install/files/js/WCF.Core.min.js index 04c8e80cf8..e6cc2456cf 100644 --- a/wcfsetup/install/files/js/WCF.Core.min.js +++ b/wcfsetup/install/files/js/WCF.Core.min.js @@ -4,7 +4,7 @@ var i=this,n=e.clone(this._options);if(this._xhr.onload=function(){this.readySta t.scrollbarYHeight=0,t.scrollbarYTop=0,e.scrollTop=0),t.scrollbarXLeft>=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/Ui/Alignment",["Core","Language","Dom/Traverse","Dom/Util"],function(e,t,i,n){"use strict";return{set:function(a,r,o){o=e.extend({verticalOffset:0,pointer:!1,pointerOffset:4,pointerClassNames:[],refDimensionsElement:null,horizontal:"left",vertical:"bottom",allowFlip:"both"},o),Array.isArray(o.pointerClassNames)&&o.pointerClassNames.length===(o.pointer?1:2)||(o.pointerClassNames=[]),-1===["left","right","center"].indexOf(o.horizontal)&&(o.horizontal="left"),"bottom"!==o.vertical&&(o.vertical="top"),-1===["both","horizontal","vertical","none"].indexOf(o.allowFlip)&&(o.allowFlip="both"),n.setStyles(a,{bottom:"auto !important",left:"0 !important",right:"auto !important",top:"0 !important",visibility:"hidden !important"});var s=n.outerDimensions(a),l=n.outerDimensions(o.refDimensionsElement instanceof Element?o.refDimensionsElement:r),c=n.offset(r),d=window.innerHeight,u=document.body.clientWidth,h={result:null},p=!1;if("center"===o.horizontal&&(p=!0,h=this._tryAlignmentHorizontal(o.horizontal,s,l,c,u),h.result||("both"===o.allowFlip||"horizontal"===o.allowFlip?o.horizontal="left":h.result=!0)),"rtl"===t.get("wcf.global.pageDirection")&&(o.horizontal="left"===o.horizontal?"right":"left"),!h.result){var f=h;if(h=this._tryAlignmentHorizontal(o.horizontal,s,l,c,u),!h.result&&("both"===o.allowFlip||"horizontal"===o.allowFlip)){var m=this._tryAlignmentHorizontal("left"===o.horizontal?"right":"left",s,l,c,u);m.result?h=m:p&&(h=f)}}var g=h.left,v=h.right,b=this._tryAlignmentVertical(o.vertical,s,l,c,d,o.verticalOffset);if(!b.result&&("both"===o.allowFlip||"vertical"===o.allowFlip)){var _=this._tryAlignmentVertical("top"===o.vertical?"bottom":"top",s,l,c,d,o.verticalOffset);_.result&&(b=_)}var y=b.bottom,w=b.top;if(o.pointer){var C=i.childrenByClass(a,"elementPointer");if(C=C[0]||null,null===C)throw new Error("Expected the .elementPointer element to be a direct children.");"center"===h.align?(C.classList.add("center"),C.classList.remove("left"),C.classList.remove("right")):(C.classList.add(h.align),C.classList.remove("center"),C.classList.remove("left"===h.align?"right":"left")),"top"===b.align?C.classList.add("flipVertical"):C.classList.remove("flipVertical")}else if(2===o.pointerClassNames.length){var L=0,E=1;a.classList["auto"===w?"add":"remove"](o.pointerClassNames[L]),a.classList["auto"===g?"add":"remove"](o.pointerClassNames[E])}"auto"!==y&&(y=Math.round(y)+"px"),"auto"!==g&&(g=Math.ceil(g)+"px"),"auto"!==v&&(v=Math.floor(v)+"px"),"auto"!==w&&(w=Math.round(w)+"px"),n.setStyles(a,{bottom:y,left:g,right:v,top:w}),elShow(a),a.style.removeProperty("visibility")},_tryAlignmentHorizontal:function(e,t,i,n,a){var r="auto",o="auto",s=!0;return"left"===e?(r=n.left,r+t.width>a&&(s=!1)):"right"===e?(o=a-(n.left+i.width),0>o&&(s=!1)):(r=n.left+i.width/2-t.width/2,r=~~r,(0>r||r+t.width>a)&&(s=!1)),{align:e,left:r,right:o,result:s}},_tryAlignmentVertical:function(e,t,i,n,a,r){var o="auto",s="auto",l=!0;if("top"===e){var c=document.body.clientHeight;o=c-n.top+r,c-(o+t.height)a&&(l=!1);return{align:e,bottom:o,top:s,result:l}}}}),define("WoltLabSuite/Core/Ui/CloseOverlay",["CallbackList"],function(e){"use strict";var t=new e,i={setup:function(){document.body.addEventListener(WCF_CLICK_EVENT,this.execute.bind(this))},add:t.add.bind(t),remove:t.remove.bind(t),execute:function(){t.forEach(null,function(e){e()})}};return i.setup(),i}),define("WoltLabSuite/Core/Ui/Dropdown/Simple",["CallbackList","Core","Dictionary","Ui/Alignment","Dom/ChangeListener","Dom/Traverse","Dom/Util","Ui/CloseOverlay"],function(e,t,i,n,a,r,o,s){"use strict";var l=null,c=new e,d=!1,u=new i,h=new i,p=null;return{setup:function(){d||(d=!0,p=elCreate("div"),p.className="dropdownMenuContainer",document.body.appendChild(p),l=elByClass("dropdownToggle"),this.initAll(),s.add("WoltLabSuite/Core/Ui/Dropdown/Simple",this.closeAll.bind(this)),a.add("WoltLabSuite/Core/Ui/Dropdown/Simple",this.initAll.bind(this)),document.addEventListener("scroll",this._onScroll.bind(this)),window.bc_wcfSimpleDropdown=this)},initAll:function(){for(var e=0,t=l.length;t>e;e++)this.init(l[e],!1)},init:function(e,i){if(this.setup(),e.classList.contains("jsDropdownEnabled")||elData(e,"target"))return!1;var n=r.parentByClass(e,"dropdown");if(null===n)throw new Error("Invalid dropdown passed, button '"+o.identify(e)+"' does not have a parent with .dropdown.");var a=r.nextByClass(e,"dropdownMenu");if(null===a)throw new Error("Invalid dropdown passed, button '"+o.identify(e)+"' does not have a menu as next sibling.");p.appendChild(a);var s=o.identify(n);if(!u.has(s)&&(e.classList.add("jsDropdownEnabled"),e.addEventListener(WCF_CLICK_EVENT,this._toggle.bind(this)),u.set(s,n),h.set(s,a),s.match(/^wcf\d+$/)||elData(a,"source",s),a.childElementCount&&a.children[0].classList.contains("scrollableDropdownMenu"))){a=a.children[0],elData(a,"scroll-to-active",!0);var l=null,c=null;a.addEventListener("wheel",function(e){null===l&&(l=a.clientHeight),null===c&&(c=a.scrollHeight),e.wheelDelta>0&&0===a.scrollTop?e.preventDefault():e.wheelDelta<0&&a.scrollTop+l===c&&e.preventDefault()})}elData(e,"target",s),i&&setTimeout(function(){t.triggerEvent(e,WCF_CLICK_EVENT)},10)},initFragment:function(e,t){this.setup();var i=o.identify(e);u.has(i)||(u.set(i,e),p.appendChild(t),h.set(i,t))},registerCallback:function(e,t){c.add(e,t)},getDropdown:function(e){return u.get(e)},getDropdownMenu:function(e){return h.get(e)},toggleDropdown:function(e,t){this._toggle(null,e,t)},setAlignment:function(e,t,i){var a,r=elBySel(".dropdownToggle",e);null!==r&&r.parentNode.classList.contains("inputAddonTextarea")&&(a=r),n.set(t,i||e,{pointerClassNames:["dropdownArrowBottom","dropdownArrowRight"],refDimensionsElement:a||null,horizontal:"right"===elData(t,"dropdown-alignment-horizontal")?"right":"left",vertical:"top"===elData(t,"dropdown-alignment-vertical")?"top":"bottom"})},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;this.close(e);var t=h.get(e);return h.parentNode.removeChild(t),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))}this._notifyCallbacks(n,"open"),this.setAlignment(e,r,i)}}.bind(this)),window.WCF.Dropdown.Interactive.Handler.closeAll(),null===e}}}),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))}}}),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/Screen",["Core","Dictionary"],function(e,t){"use strict";var i=new t,n=0,a=t.fromObject({"screen-xs":"(max-width: 544px)","screen-sm":"(min-width: 545px) and (max-width: 768px)","screen-sm-down":"(max-width: 768px)","screen-sm-up":"(min-width: 545px)","screen-sm-md":"(min-width: 545px) and (max-width: 1024px)","screen-md":"(min-width: 769px) and (max-width: 1024px)","screen-md-down":"(max-width: 1024px)","screen-md-up":"(min-width: 1024px)","screen-lg":"(min-width: 1025px)"});return{on:function(t,i){var n=e.getUuid(),a=this._getQueryObject(t);return"function"==typeof i.match&&a.callbacksMatch.set(n,i.match),"function"==typeof i.unmatch&&a.callbacksUnmatch.set(n,i.unmatch),"function"==typeof i.setup&&(a.mql.matches?i.setup():a.callbacksSetup.set(n,i.setup)),n},remove:function(e,t){var i=this._getQueryObject(e);i.callbacksMatch["delete"](t),i.callbacksUnmatch["delete"](t),i.callbacksSetup["delete"](t)},is:function(e){return this._getQueryObject(e).mql.matches},scrollDisable:function(){0===n&&document.documentElement.classList.add("disableScrolling"),n++},scrollEnable:function(){n&&(n--,0===n&&document.documentElement.classList.remove("disableScrolling"))},_getQueryObject:function(e){if("string"!=typeof e||""===e.trim())throw new TypeError("Expected a non-empty string for parameter 'query'.");a.has(e)&&(e=a.get(e));var n=i.get(e);return n||(n={callbacksMatch:new t,callbacksUnmatch:new t,callbacksSetup:new t,mql:window.matchMedia(e)},n.mql.addListener(this._mqlChange.bind(this)),i.set(e,n)),n},_mqlChange:function(e){var i=this._getQueryObject(e.media);e.matches?(i.callbacksSetup.size&&(i.callbacksSetup.forEach(function(e){e()}),i.callbacksSetup=new t),i.callbacksMatch.forEach(function(e){e()})):i.callbacksUnmatch.forEach(function(e){e()})}}}),define("WoltLabSuite/Core/Ui/Page/Menu/Abstract",["Environment","EventHandler","ObjectMap","Dom/Traverse","Dom/Util","Ui/Screen"],function(e,t,i,n,a,r){"use strict";function o(e,t,i){this.init(e,t,i)}var s=elById("pageContainer");return o.prototype={init:function(e,n,r){this._activeList=[],this._depth=0,this._enabled=!0,this._eventIdentifier=e,this._items=new i,this._menu=elById(n),this._removeActiveList=!1;var o=this.open.bind(this),s=elBySel(r);s.addEventListener(WCF_CLICK_EVENT,o),this._initItems(),this._initHeader(),t.add(this._eventIdentifier,"open",o),t.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)),a.insertAfter(d,this._menu)},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"),r.scrollDisable(),s.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"),r.scrollEnable(),s.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)},_initItems:function(){elBySelAll(".menuOverlayItemLink",this._menu,this._initItem.bind(this))},_initItem:function(e){var i=e.parentNode,a=elData(i,"more");if(a)return void e.addEventListener(WCF_CLICK_EVENT,function(n){n.preventDefault(),n.stopPropagation(),t.fire(this._eventIdentifier,"more",{handler:this,identifier:a,item:e,parent:i})}.bind(this));var r,o=e.nextElementSibling;if(null!==o)if("OL"!==o.nodeName&&o.classList.contains("menuOverlayItemLinkIcon"))for(r=elCreate("span"),r.className="menuOverlayItemWrapper",i.insertBefore(r,e),r.appendChild(e);r.nextElementSibling;)r.appendChild(r.nextElementSibling);else{var s="#"!==elAttr(e,"href"),l=i.parentNode,c=elData(o,"title");this._items.set(e,{itemList:o,parentItemList:l}),""===c&&(c=n.childByClass(e,"menuOverlayItemTitle").textContent,elData(o,"title",c));var d=this._showItemList.bind(this,e);if(s){r=elCreate("span"),r.className="menuOverlayItemWrapper",i.insertBefore(r,e),r.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),r.appendChild(u)}else e.classList.add("menuOverlayItemLinkMore"),e.addEventListener(WCF_CLICK_EVENT,d);var h=elCreate("li");h.className="menuOverlayHeader",r=elCreate("span"),r.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)),r.appendChild(p),r.appendChild(f),h.appendChild(r),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 a=elCreate("span");a.className="menuOverlayLogo",a.style.setProperty("background-image",'url("'+elData(this._menu,"page-logo")+'")',""),i.appendChild(a);var r=elCreate("a");elAttr(r,"href","#"),r.className="menuOverlayItemLinkIcon",r.innerHTML='',r.addEventListener(WCF_CLICK_EVENT,this.close.bind(this)),t.appendChild(r);var o=n.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,i){i instanceof Event&&i.preventDefault();var n=this._items.get(e),a=elData(n.itemList,"load");if(a&&!elDataBool(e,"loaded")){var r=i.currentTarget.firstElementChild;return r.classList.contains("fa-angle-right")&&(r.classList.remove("fa-angle-right"),r.classList.add("fa-spinner")),void t.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,this._menu.children[0].style.setProperty("transform","translateX("+-100*this._depth+"%)","")}},o}),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,l=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"),l=a.nextElementSibling,elRemove(t.childByClass(o,"jsMenuOverlayItemPlaceholder")))},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),elShow(l)}else elHide(a),elHide(l);return!0},close:function(e){if(!n._super.prototype.close.call(this,e))return!1;if(r){elHide(a),elHide(l);for(var i,c,d=t.childByClass(o,"menuOverlayTitle");i=d.nextElementSibling;)i.classList.remove("menuOverlayItem"),c=i.children[0],c.classList.remove("menuOverlayItemLink"),c.classList.remove("box24"),c.children[1].classList.add("invisible"),c.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")}}),n}),define("WoltLabSuite/Core/Ui/Mobile",["Core","Environment","EventHandler","Language","List","Dom/ChangeListener","Ui/CloseOverlay","Ui/Screen","./Page/Menu/Main","./Page/Menu/User"],function(e,t,i,n,a,r,o,s,l,c){"use strict";var d=elByClass("buttonGroupNavigation"),u=!1,h=new a,p=null,f=elByClass("message"),m={},g=null,v=null;return{setup:function(i){m=e.extend({enableMobileMenu:!0},i),p=elById("main"),t.touch()&&document.documentElement.classList.add("touch"),"desktop"!==t.platform()&&document.documentElement.classList.add("mobile"),s.on("screen-md-down",{match:this.enable.bind(this),unmatch:this.disable.bind(this),setup:this._init.bind(this)})},enable:function(){u=!0,m.enableMobileMenu&&(g.enable(),v.enable())},disable:function(){u=!1,m.enableMobileMenu&&(g.disable(),v.disable())},_init:function(){u=!0,this._initSearchBar(),this._initButtonGroupNavigation(),this._initMessages(),this._initMobileMenu(),o.add("WoltLabSuite/Core/Ui/Mobile",this._closeAllMenus.bind(this)),r.add("WoltLabSuite/Core/Ui/Mobile",this._initButtonGroupNavigation.bind(this))},_initSearchBar:function(){var e=elById("pageHeaderSearch"),t=elById("pageHeaderSearchInput");i.add("com.woltlab.wcf.MainMenuMobile","more",function(i){"com.woltlab.wcf.search"===i.identifier&&(e.style.setProperty("top",elById("pageHeader").offsetHeight+"px",""),e.classList.add("open"),t.focus(),i.handler.close(!0))}),p.addEventListener(WCF_CLICK_EVENT,function(){e.classList.remove("open")})},_initButtonGroupNavigation:function(){for(var e=0,t=d.length;t>e;e++){var i=d[e];if(!i.classList.contains("jsMobileButtonGroupNavigation")){i.classList.add("jsMobileButtonGroupNavigation"),i.parentNode.classList.add("hasMobileNavigation");var n=elCreate("a");n.className="dropdownLabel";var a=elCreate("span");a.className="icon icon24 fa-ellipsis-v",n.appendChild(a);var r=elBySel(".buttonList",i);r.addEventListener(WCF_CLICK_EVENT,function(e){e.stopPropagation()}),function(e,t){t.addEventListener(WCF_CLICK_EVENT,function(t){t.preventDefault(),t.stopPropagation(),e.classList.toggle("open")})}(i,n),i.insertBefore(n,i.firstChild)}}},_initMessages:function(){Array.prototype.forEach.call(f,function(e){if(!h.has(e)){var t=elBySel(".jsMobileNavigation",e),i=elBySel(".messageQuickOptions",e);i&&(i.addEventListener(WCF_CLICK_EVENT,function(e){u&&(e.preventDefault(),e.stopPropagation(),t.classList.toggle("open"))}),t.addEventListener(WCF_CLICK_EVENT,function(e){e.stopPropagation()})),h.add(e)}})},_initMobileMenu:function(){m.enableMobileMenu&&(g=new l,v=new c),elBySelAll(".boxMenu",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")})}}}),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)}},rebuild:function(){var t=new e;t.merge(this._tabs),this.validate(),this.init(t)},_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","Dom/ChangeListener","Dom/Util","Ui/CloseOverlay","./TabMenu/Simple"],function(e,t,i,n,a){"use strict";var r=null,o=new e;return{setup:function(){this._init(),this._selectErroneousTabs(),t.add("WoltLabSuite/Core/Ui/TabMenu",this._init.bind(this)),n.add("WoltLabSuite/Core/Ui/TabMenu",function(){r&&(r.classList.remove("active"),r=null)})},_init:function(){for(var e,t,n,s,l,c=elBySelAll(".tabMenuContainer:not(.staticTabMenuContainer)"),d=0,u=c.length;u>d;d++)e=c[d],t=i.identify(e),o.has(t)||(l=new a(e),l.validate()&&(s=l.init(),o.set(t,l),s instanceof Element&&(l=this.getTabMenu(s.parentNode.id),l.select(s.id,null,!0)),n=elBySel("#"+t+" > nav > ul"),function(e){e.addEventListener(WCF_CLICK_EVENT,function(t){t.preventDefault(),t.stopPropagation(), t.target===e?(e.classList.add("active"),r=e):(e.classList.remove("active"),r=null)})}(n)))},_selectErroneousTabs:function(){o.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 o.get(e)}}}),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